After tomcat restart, the web page cannot be displayed!

restart tomcat. using tomcat"s startup.sh and shutdown.sh
restart because you want to put a new file in webapps.
step is:
first shutdown, then put the webapps file, then startup start,
the first time startup did not report an error

[root@iz2zea0v6yzqrn1lbze76iz ~]-sharp sh tom.sh 1
Using CATALINA_BASE:   /usr/local/tomcat/tomcat907_1
Using CATALINA_HOME:   /usr/local/tomcat/tomcat907_1
Using CATALINA_TMPDIR: /usr/local/tomcat/tomcat907_1/temp
Using JRE_HOME:        /usr/local/java/jdk9
Using CLASSPATH:       /usr/local/tomcat/tomcat907_1/bin/bootstrap.jar:/usr/local/tomcat/tomcat907_1/bin/tomcat-juli.jar
**Tomcat started.**
tom.sh run succeed. 
< hr >

shutdown, but there is no error.

[root@iz2zea0v6yzqrn1lbze76iz ~]-sharp sh tom.sh 0
Using CATALINA_BASE:   /usr/local/tomcat/tomcat907_1
Using CATALINA_HOME:   /usr/local/tomcat/tomcat907_1
Using CATALINA_TMPDIR: /usr/local/tomcat/tomcat907_1/temp
Using JRE_HOME:        /usr/local/java/jdk9
Using CLASSPATH:       /usr/local/tomcat/tomcat907_1/bin/bootstrap.jar:/usr/local/tomcat/tomcat907_1/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
tom.sh run succeed.
< hr >

but in the end, there was a problem, and then I changed the webapps file, and then I had to start again. The
startup did not report an error as before, but I went to the web page
and was unable to visit this site
www.ykmimi.com refused our connection request.

< hr >

then I want to restart it again. When I shut down tomcat, I get an error message from bug:

[root@iz2zea0v6yzqrn1lbze76iz ~]-sharp sh tom.sh 0
Using CATALINA_BASE:   /usr/local/tomcat/tomcat907_1
Using CATALINA_HOME:   /usr/local/tomcat/tomcat907_1
Using CATALINA_TMPDIR: /usr/local/tomcat/tomcat907_1/temp
Using JRE_HOME:        /usr/local/java/jdk9
Using CLASSPATH:       /usr/local/tomcat/tomcat907_1/bin/bootstrap.jar:/usr/local/tomcat/tomcat907_1/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
May 07, 2018 8:03:27 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact [localhost:[8005]]. Tomcat may not be running.
May 07, 2018 8:03:27 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: 
java.net.ConnectException: Connection refused (Connection refused)
    at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:400)
    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:243)
    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:225)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
    at java.base/java.net.Socket.connect(Socket.java:591)
    at java.base/java.net.Socket.connect(Socket.java:540)
    at java.base/java.net.Socket.<init>(Socket.java:436)
    at java.base/java.net.Socket.<init>(Socket.java:213)
    at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:403)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)

tom.sh run succeed. 

add: the CVM has been restarted. If you perform the above steps, the problem remains?

Mar.09,2021

has this line:
SEVERE: Could not contact [localhost: [8005]]. Tomcat may not be running.
tomcat startup did not report an error but did not start.
the easiest way to do this is to restart your computer and try it.


the most important thing for server maintenance is to learn to look at the log output. There may be a logs directory under your / usr/local/tomcat/tomcat907_1 . Check the log output below and you will find the cause of the error.

Menu