Tag Archives: The server

[Solved] Eclipse SVN Plug-in Submit Error: org.eclipse.team.svn.core.connector.SVNConnectorException…

Error Message:

org.eclipse.team.svn.core.connector.SVNConnectorException: svn: E175002: SSL handshake failed: 'The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]'

Solution:

Open Eclipse Setting:
Preference->Version Control(Team)->SVN
Check [SVN Connector] on the right tab
Inside the SVN Connector dropdown box to change an option, I am choosing Native Java HL 1.8… The problem was solved.

[Solved] Tomcat startup error: sub-container startup failed

Tomcat Startup Error:

When reviewing Java Web, I want to make my workspace cleaner, so I cleaned up the web projects left in the Tomcat installation directory webapps, and double-click start Bat file, the CMD window flashes by, and I feel strange at once. This situation is usually JAVA_Home environment variable is not configured correctly.


Then open start.bat in text mode, add “pause” after the end statement at the end, and double-click start.bat again after saving, the following results appear:

It is found that the paths are correct, indicating that there is no problem with my environment variable configuration.


Open start.bat again as text, call call "%EXECUTABLE%" start %CMD_LINE_ARGS% statement is changed to run. After saving, double-click start.bat, the following message appears:

A series of errors are shown later, and I only cut one illustratively.

The main information observed is that the sub-container failed to start, and a specified resource set is invalid. The service component necessary Catalina.start fails to start; When you look carefully, you find that it shows an invalid resource set path (at the end of the figure above). You can see that there is no relevant folder under this path.

So I looked at the server.xml file in the conf directory and saw the following configuration (only the code was intercepted):

<Service name="Catalina">
    <Engine defaultHost="localhost" name="Catalina">
        <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
            <Context docBase="E:apache-tomcat-9.0.20webappsSSM" path="/SSM" reloadable="true" source="org.eclipse.jst.jee.server:SSM"/>
            <Context docBase="E:apache-tomcat-9.0.20webappsSpring" path="/Spring" reloadable="true" source="org.eclipse.jst.jee.server:Spring"/>
            <Context docBase="E:apache-tomcat-9.0.20webappsPressRelease" path="/PressRelease" reloadable="true" source="org.eclipse.jst.jee.server:PressRelease"/>
        </Host>
    </Engine>
</Service>

In the Context tag, docBase specifies the path of the project, which is accessed through the virtual path path. Because I deleted these three folders together when cleaning the project before, there was an error when Tomcat started.

Delete the contents of the three Context tags in the server.xml file, double-click start.bat after saving, and find that Tomcat has started normally and can access port 8080;

Or create the corresponding SSM, Spring, and PressRelease folders in the webapps directory, and Tomcat can also be started normally.

How to Solve Svn upload so File Error

Cause of the problem: since the so file is a binary file, it is ignored by default. You need to modify the configuration before uploading

Solution:

find   / -name .subversion # find SVN configuration file path

cd to find the path of .subversion

VIM config finds these two lines:

#global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *pyo

#  *.rej *~#*# .#* .*.swp.DS_Store

Modified as:

###global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *pyo

###  *.rej *~#*# .#* .*.swp.DS_Store

global-ignores = .*.swp.DS_Store

It can be solved after saving!

[Solved] org.springframework.beans.factory.UnsatisfiedDependencyException

It can be understood that the dependency failed, and the dependency could not be found

Some errors are reported as follows:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pageService': Unsatisfied dependency expressed through field 'pageInfoMepper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pageInfoMepper' defined in file [D:projectIDEAProjectdemoPageoutartifactsWEB-INFclassescomligleimapperPageInfoMepper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:projectIDEAProjectdemoPageoutartifactsWEB-INFclassesapplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.github.pagehelper.PageInterceptor'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageInterceptor
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:843)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4643)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1737)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    .......
    .......

Solution:

1. First, see if the annotation on the Service layer class is added or wrong, it should be @Service, whether the annotation refers to the Spring class, do not import it into another package, and see the path of the package.

2. Also, if the Service layer is divided into interfaces and implementation classes, see if the implementation class is annotated (@Service), and see if there is an implementation class.

3. Take a look at the configuration file. xml, is there any package where the automatic scan service is started?

<context:component-scan base-package="com.liglei.service"></context:component-scan>

4. Check if the jar package is downloaded completely and if there is this jar package

5. Just to see if there are any packages in the red box in the figure below that have not been imported, and if so, follow the steps below:

File–> Project Structure–> Artifacts–> Right click demopage –> Put into Output Root–> OK

Make sure the above steps are OK. Restart the project and try again~

[Solved] Linux WebService Startup Error: BindException: Cannot assign requested address

Linux deploys the WebService service and starts the error bindexception: cannot assign requested address

code

Question

The windows local test is normal. When it is deployed to the Linux server, an error is reported when it is started: BindException: Cannot assign requested address

Cause of problem

There is a problem with the IP in the URL. If Alibaba cloud and other cloud servers are used, you need to check the address of the network card eth0, and then change the IP in the URL to the IP of eth0

if not, check whether the IP of eth0 is configured or not in /etc/hosts. If not, add: IP + hostname
if you do not know the hostname, you can use the hostname command to check. If not, vim /etc/hosts, and then insert the data: IP hostname. Note that there is a space in the middle

Finally, when accessing WebService, the service can be accessed through public IP

[Solved] Log Error: kernel: blk_update_request: I/O error, dev fd0, sector 0

Environment: Center OS 7.6 virtual machine

Log error: kernel: BLK_ update_ request: I/O error, dev fd0, sector 0

Query the error information and find that there may be no floppy disk, and the floppy disk drive is loaded when the system is started.

Verification: lsmod | grep float

Step 1: (Not Work)

Try creating nofloppy.conf in the /etc/modprobe.d/ directory to disable the floppy module from loading on boot

vim /etc/modprobe.d/blacklist.conf

#Add command line
blacklist floppy

Or

echo "blacklist floppy" | tee /etc/modprobe.d/blacklist-floppy.conf

reboot

Step 2: The use of blacklist does not disable the way, and finally choose to add the following code in grub to boot disable

vim /boot/grub2/grub.cfg
 
#Add code
modprobe.blacklist=floppy
#Disable floppy drive
 
reboot

After rebooting and checking the logs, no errors were reported.

[Solved] fatal error: openssl/hmac.h: No such file or directory

Background

Error in compiling MSOffice encryption binary file on Debian 10 server

GitHub address: https://github.com/herumi/msoffice

report errors:

root@e0fef8daa858:/var/www/msoffice# make -j RELEASE=1
/usr/bin/make -C src
make[1]: Entering directory '/var/www/msoffice/src'
g++ -c msoffice-crypt.cpp -o release/msoffice-crypt.o -g -D_FILE_OFFSET_BITS=64 -msse2 -fno-operator-names -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith  -Ofast -fomit-frame-pointer -DNDEBUG -march=native -msse4 -I/var/www/msoffice/include -I/var/www/msoffice/../cybozulib/include -I/var/www/msoffice/../mie/include
g++ -c attack.cpp -o release/attack.o -g -D_FILE_OFFSET_BITS=64 -msse2 -fno-operator-names -Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith  -Ofast -fomit-frame-pointer -DNDEBUG -march=native -msse4 -I/var/www/msoffice/include -I/var/www/msoffice/../cybozulib/include -I/var/www/msoffice/../mie/include
In file included from /var/www/msoffice/include/decode.hpp:14,
                 from msoffice-crypt.cpp:16:
/var/www/msoffice/../cybozulib/include/cybozu/crypto.hpp:30:10: fatal error: openssl/hmac.h: No such file or directory
   30 | #include <openssl/hmac.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [../common.mk:57: release/msoffice-crypt.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /var/www/msoffice/include/attack.hpp:14,
                 from attack.cpp:14:
/var/www/msoffice/../cybozulib/include/cybozu/crypto.hpp:30:10: fatal error: openssl/hmac.h: No such file or directory
   30 | #include <openssl/hmac.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [../common.mk:57: release/attack.o] Error 1
make[1]: Leaving directory '/var/www/msoffice/src'
make: *** [Makefile:7: all] Error 2

Solution:

To solve this problem, you need to install the OpenSSL development package, execute the following command to install it, and then recompile it

apt update && apt install libssl-dev

If it is CentOS, you can execute the following command to solve the problem

yum install openssl-dev -y

[Solved] Virtual machine Failed to restart network Error: Error:Failed to start LSB: Bring up/down networking

Problem description

A virtual machine that has been running normally. After a shutdown and restart, it is found that SSH cannot connect

Restart network discovery failed

service networkrestart

Solution:

[root@lexsaints ~]#systemctl stop NetworkManager
[root@lexsaints ~]#systemctl disable NetworkManager
[root@lexsaints ~]#systemctl restart  network
or
[root@lexsaints ~]#systemctl  restart NetworkManager
[root@lexsaints ~]#systemctl restart  network

Cause of problem

NetworkManager is a program that detects the network and automatically connects to the network.

Whether it’s wireless or wired, it makes it easy for you to manage.

For wireless networks, the network manager can automatically switch to the most reliable wireless network.

The program using the network manager can freely switch between online and offline modes.

The network manager can preferentially select wired network and support VPN.

The network manager was originally developed by RedHat and is now managed by gnome.

[Solved] Error running tomcat8: Address localhost:80 is already in use

Error running tomcat8: Address localhost:80 is already in use

1. Problems

Tomcat startup error: Error running tomcat8: Address localhost:80 is already in use

2. Solution

2.1 port 8080 is modified

Modify the server.xml file in E:\software\apache-tomcat-8.5.81\conf back.

[Solved] openssl error: libcrypto.so.1.0.0: cannot open shared object file: Error 40

Problem Description: start to execute OpenSSL and report an error:

openssl

openssl: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Then find the corresponding file through the search instruction, and soft connect it

find/-name libcrypto.so.1.0.0    find files
/opt/acb/lib/libcrypto.so.1.0.0   search the outcome
ln -s libcrypto.so.1.0.0 /usr/lib64/  soft connect

However, it is found that the implementation of OpenSSL still reports errors, as follows

openssl
openssl: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: Error 40

Check libcrypto.so.1.0.0 that reported error, and find that libcrypto.so.1.0.0 is also a soft connection

lrwxrwxrwx 1 splunk root      15 Jan  9  2020 libssl.so -> libssl.so.1.0.0
-r-xr-xr-x 2 splunk root  485304 Jan  9  2020 libssl.so.1.0.0

The solution is to connect the source file directly and solve the problem

ln -s libcrypto.so /usr/lib64/libcrypto.so.1.0.0

[Solved] error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or

error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or

Solution:

sudo vim  /etc/ld.so.conf

Add /usr/local/lib to the file, which is the path is libjson.so.0 located

include /etc/ld.so.conf.d/*.conf 
/usr/local/lib

Finally, the terminal inputs sudo ldconfig