面临这样的问题。 Tomkat 7.0部署在服务器上,运行正常。我对server.hmml文件进行了更改,并决定重新启动Tomcat。 由于我只能通过putty访问服务器,因此我输入了命令{tomcat patch} / bin / shoudovn.sh和{tomat patch} / bin / startup.sh。通过没有错误。 但现在我无法在浏览器中打开服务器。试图再次关闭它会产生错误
SEVERE: Could not contact localhost: 8005. Tomcat may not be running.
Jun 13, 2018 5:46:11 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 (AbstractPlainSoc ketImpl.java:400)
at java.base / java.net.AbstractPlainSocketImpl.connectToAddress (AbstractP lainSocketImpl.java:243)
at java.base / java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocke tImpl.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:505)
at java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Nativ e Method)
at java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke (Native MethodAccessorImpl.java:62)
at java.base / jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (De legatingMethodAccessorImpl.java:43)
at java.base / java.lang.reflect.Method.invoke (Method.java:564)
at org.apache.catalina.startup.Bootstrap.stopServer (Bootstrap.java:343)
at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:430)
如果你做startup.sh一切顺利
admin@test-ubuntu:~$ /home/admin/apache-tomcat-7.0.88/bin/shutdown.sh^C
admin@test-ubuntu:~$ /home/admin/apache-tomcat-7.0.88/bin/startup.sh
Using CATALINA_BASE: /home/admin/apache-tomcat-7.0.88
Using CATALINA_HOME: /home/admin/apache-tomcat-7.0.88
Using CATALINA_TMPDIR: /home/admin/apache-tomcat-7.0.88/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/admin/apache-tomcat-7.0.88/bin/bootstrap.jar:/home/admin/apache-tomcat-7.0.88/bin/tomcat-juli.jar
Tomcat started.
抱歉英语不好,也许是愚蠢的问题。我以前从未遇到过服务器。 在哪里以及可能是我的错误? 提前谢谢!