项目工程文件已自动解析出来 tomcat运行后访问网页 Catalina报错如下

来源:10-1 阿里云初始化与执行环境安装

qq_友人A_12

2019-03-29

项目工程文件已自动解析出来 tomcat运行后访问网页 Catalina报错如下
29-Mar-2019 10:06:47.398 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“http-nio-80”]
29-Mar-2019 10:06:47.398 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“ajp-nio-8009”]
29-Mar-2019 10:06:47.398 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
29-Mar-2019 10:06:47.400 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“http-nio-80”]
29-Mar-2019 10:06:47.402 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“ajp-nio-8009”]

写回答

4回答

qq_友人A_12

提问者

2019-03-30

查询log信息

[root@izvokgokt9kfpdz admin]# cd apache-tomcat-8.5.39

[root@izvokgokt9kfpdz apache-tomcat-8.5.39]# tail -f logs/catalina.out

 at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)

 at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)

 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

 ... 9 more


30-Mar-2019 09:45:49.518 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]

30-Mar-2019 09:45:49.518 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]

30-Mar-2019 09:45:49.518 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]

30-Mar-2019 09:45:49.525 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]

30-Mar-2019 09:45:49.530 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]


0
0

qq_友人A_12

提问者

2019-03-30

启动服务器得时候显示

[root@izvokgokt9kfpdz admin]# ./apache-tomcat-8.5.39/bin/startup.sh

Using CATALINA_BASE:   /home/admin/apache-tomcat-8.5.39

Using CATALINA_HOME:   /home/admin/apache-tomcat-8.5.39

Using CATALINA_TMPDIR: /home/admin/apache-tomcat-8.5.39/temp

Using JRE_HOME:        /

Using CLASSPATH:       /home/admin/apache-tomcat-8.5.39/bin/bootstrap.jar:/home/admin/apache-tomcat-8.5.39/bin/tomcat-juli.jar

Tomcat started.


0
0

qq_友人A_12

提问者

2019-03-30

关闭服务器得时候显示

Last login: Sat Mar 30 09:39:08 2019 from 120.78.45.33


Welcome to Alibaba Cloud Elastic Compute Service !


[admin@izvokgokt9kfpdz ~]$ sudo su root

[root@izvokgokt9kfpdz admin]# ./apache-tomcat-8.5.39/bin/shutdown.sh

Using CATALINA_BASE:   /home/admin/apache-tomcat-8.5.39

Using CATALINA_HOME:   /home/admin/apache-tomcat-8.5.39

Using CATALINA_TMPDIR: /home/admin/apache-tomcat-8.5.39/temp

Using JRE_HOME:        /

Using CLASSPATH:       /home/admin/apache-tomcat-8.5.39/bin/bootstrap.jar:/home/admin/apache-tomcat-8.5.39/bin/tomcat-juli.jar

Mar 30, 2019 9:41:42 AM org.apache.catalina.startup.Catalina stopServer

SEVERE: Could not contact [localhost:[8005]]. Tomcat may not be running.

Mar 30, 2019 9:41:42 AM org.apache.catalina.startup.Catalina stopServer

SEVERE: Catalina.stop: 

java.net.ConnectException: Connection refused (Connection refused)

 at java.net.PlainSocketImpl.socketConnect(Native Method)

 at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

 at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

 at java.net.Socket.connect(Socket.java:589)

 at java.net.Socket.connect(Socket.java:538)

 at java.net.Socket.<init>(Socket.java:434)

 at java.net.Socket.<init>(Socket.java:211)

 at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:504)

 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.catalina.startup.Bootstrap.stopServer(Bootstrap.java:406)

 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:498)


0
1
翔仔
同学好,日志里面并没有在tomcat启动后,出现tomcat started at xxxx ms呢。这里的tomcat start只是说开启,但是并没有显示已经解析项目成功,而后面同学在tomcat还没完全跑成功的情况下关闭,就会报connection refused的错误,这个时候就应该ps -ef | grep tomcat 然后kill 掉对应的tomcat进程号 即 kill pid ,之后再tail -f logs/catalina.out,然后重启tomcat,看看会报什么错,或者等到出现tomcat started at xxx ms 为止
2019-03-31
共1条回复

翔仔

2019-03-30

这里没错误呀。。正常的信息。。。同学你同样的问题不要新开了哈,现在我又不知道问题究竟是啥了。。一个个问题解决,在一处能有很多信息来回交互这样方便我跟踪问题呢。。。

0
3
qq_友人A_12
回复
翔仔
老师字数太多我回复到该问题得回答里
2019-03-30
共3条回复

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程