页面无法显示,老师可以帮我看看问题出在哪里吗?

来源:10-2 项目打包发布与域名解析

晨L

2020-04-08

Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
… 12 more
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:823)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
… 13 more
图片描述
图片描述
图片描述
图片描述
图片描述
图片描述

写回答

4回答

晨L

提问者

2020-04-16

老师,我又带着问题来找您了o(╥﹏╥)o

打开页面后没有数据,但是数据库已经上传。日志中显示以下问题://img1.sycdn.imooc.com/szimg/5e98368309ffc8a613660736.jpg

16-Apr-2020 17:01:50.276 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina

16-Apr-2020 17:01:50.333 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [o2o] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

16-Apr-2020 17:01:50.340 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [logback-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

16-Apr-2020 17:01:50.340 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->1bqqp2ea910374i91tlycvf|6a7e36e]-AdminTaskTimer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 java.lang.Object.wait(Native Method)

 java.util.TimerThread.mainLoop(Timer.java:552)

 java.util.TimerThread.run(Timer.java:505)

16-Apr-2020 17:01:50.341 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->1bqqp2ea910374i91tlycvf|6a7e36e]-HelperThread-#0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 java.lang.Object.wait(Native Method)

 com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)

16-Apr-2020 17:01:50.341 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->1bqqp2ea910374i91tlycvf|6a7e36e]-HelperThread-#1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 java.lang.Object.wait(Native Method)

 com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)

16-Apr-2020 17:01:50.342 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->1bqqp2ea910374i91tlycvf|6a7e36e]-HelperThread-#2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 java.lang.Object.wait(Native Method)

 com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)

16-Apr-2020 17:01:50.342 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [o2o] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 java.lang.Object.wait(Native Method)

//img1.sycdn.imooc.com/szimg/5e98351d09341b2a06700578.jpg

0
1
翔仔
同学的服务器redis也部署上去了?然后服务器连的是服务器的Redis吧?如果是,用redis-cli登录到服务器的redis上面 执行 flushall指令试试
2020-04-17
共1条回复

晨L

提问者

2020-04-14

老师,之前命名已经可可以打开页面了,但是现在又不行了。好像是tomcat启动不了,可以再帮忙看一下怎么解决吗?

14-Apr-2020 19:02:35.120 SEVERE [Catalina-startStop-1] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start

 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/upload]]

        at java.util.concurrent.FutureTask.report(FutureTask.java:122)

        at java.util.concurrent.FutureTask.get(FutureTask.java:192)

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)

        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)

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

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/upload]]

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

        ... 6 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@6caea6f7]

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

        at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4969)

        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099)

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

        ... 6 more

Caused by: java.lang.IllegalArgumentException: The main resource set specified [/root/apache-tomcat-8.0.46/webapps/o2oImage/image/upload] is not valid

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

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

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

        ... 9 more

14-Apr-2020 19:02:35.124 SEVERE [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start

        at java.util.concurrent.FutureTask.report(FutureTask.java:122)

        at java.util.concurrent.FutureTask.get(FutureTask.java:192)

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)

        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

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

        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)

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

        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)

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

        at org.apache.catalina.startup.Catalina.start(Catalina.java:630)

        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.start(Bootstrap.java:351)

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

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

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

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)

        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)

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

        ... 6 more

14-Apr-2020 19:02:35.125 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.

 org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]

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

        at org.apache.catalina.startup.Catalina.start(Catalina.java:630)

        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.start(Bootstrap.java:351)

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

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]

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

        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)

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

        ... 7 more

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]

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

        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)

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

        ... 9 more

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)

        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)

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

        ... 11 more

14-Apr-2020 19:02:35.125 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]

14-Apr-2020 19:02:35.125 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]

14-Apr-2020 19:02:35.125 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina

14-Apr-2020 19:02:35.129 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]

14-Apr-2020 19:02:35.129 SEVERE [main] org.apache.coyote.AbstractProtocol.destroy Failed to destroy end point associated with ProtocolHandler ["http-nio-80"]

 java.lang.NullPointerException

        at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)

        at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)

        at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)

        at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)

        at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:634)

        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.start(Bootstrap.java:351)

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


14-Apr-2020 19:02:35.130 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]

14-Apr-2020 19:02:35.130 SEVERE [main] org.apache.coyote.AbstractProtocol.destroy Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]

 java.lang.NullPointerException

        at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:315)

        at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:491)

        at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:896)

        at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:551)

        at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:879)

        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:634)

        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.start(Bootstrap.java:351)

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

0
1
翔仔
The main resource set specified [/root/apache-tomcat-8.0.46/webapps/o2oImage/image/upload] is not valid 不建议同学把图片放到/root/目录下,放到别的,可以是/home/work下面,也就是Server.xml里面得docBase路径。。 然后确保已经创建出来了
2020-04-14
共1条回复

晨L

提问者

2020-04-09

老师,查询到了8080端口被占用,也kill了此进程。但是任然显示不出来页面,还是报相同错误。能麻烦您再帮我看看是什么情况吗?

08-Apr-2020 12:13:11.058 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

08-Apr-2020 12:13:11.076 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8080"]

 java.net.BindException: Address already in use

        at sun.nio.ch.Net.bind0(Native Method)

        at sun.nio.ch.Net.bind(Net.java:433)

        at sun.nio.ch.Net.bind(Net.java:425)

        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)

        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:823)

        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)

        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)

        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)

        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)

        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568)

        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)

        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:871)

        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)

        at org.apache.catalina.startup.Catalina.load(Catalina.java:581)

        at org.apache.catalina.startup.Catalina.load(Catalina.java:604)

        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.load(Bootstrap.java:310)

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

Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed

        at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)

        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)

        ... 12 more

Caused by: java.net.BindException: Address already in use

        at sun.nio.ch.Net.bind0(Native Method)

        at sun.nio.ch.Net.bind(Net.java:433)

        at sun.nio.ch.Net.bind(Net.java:425)

        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:350)

        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:823)

        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:476)

        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)

        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)

        ... 13 more

//img.mukewang.com/szimg/5e8f27a009d2fea107510322.jpg

//img.mukewang.com/szimg/5e8f27a0099ce5e207520303.jpg

//img.mukewang.com/szimg/5e8f27a00923feb906180126.jpg

0
3
翔仔
回复
晨L
同学好,这里报的是你的server.xml的解析有问题呢,应该是写得格式不对,你是不是做了什么改动,建议先还原成原先的。
2020-04-12
共3条回复

翔仔

2020-04-09

同学好,Caused by: java.net.BindException: Address already in use

主要是端口被别的程序占用了,同学看看 80 8080 或者你server.xml里面出现的所有端口 看看哪个被占用了

通过netstat -apn | grep 端口号  来看看

0
0

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

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

5113 学习 · 8144 问题

查看课程