云服务器配置的tomcat8080端口可以访问,改成80端口就无法访问了

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

幕布斯0397034

2018-12-05

云服务器配置的tomcat8080端口可以访问,改成80端口就无法访问tomcat了

我已经在防火墙中开启了这个端口,不过这个好像是默认开启的端口,但是tomcat的关闭时报了图三的异常

http://img.mukewang.com/szimg/5c0881440001ba2705380064.jpg

http://img.mukewang.com/szimg/5c0881bc0001f76e05220031.jpg

http://img.mukewang.com/szimg/5c0881450001829208530618.jpg

http://img.mukewang.com/szimg/5c0881450001c91e09510384.jpg

报了以下下异常

Dec 06, 2018 9:42:37 AM org.apache.catalina.core.StandardContext resourcesStart

SEVERE: Error starting static Resources

java.lang.IllegalArgumentException: Document base /usr/local/src/java/tomcat7/webapps/upload does not exist or is not a readable directory

at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)

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

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

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

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

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

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

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

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

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


Dec 06, 2018 9:42:37 AM org.apache.catalina.core.ContainerBase startInternal

SEVERE: 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:188)

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

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

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

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

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

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

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

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

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

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:154)

... 6 more

Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()

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

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

... 6 more


Dec 06, 2018 9:42:37 AM org.apache.catalina.core.ContainerBase startInternal

SEVERE: A child container failed during start

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

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

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

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

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

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

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

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

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)

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

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

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

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

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

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

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

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

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

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

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

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

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

... 6 more


Dec 06, 2018 9:42:37 AM org.apache.catalina.startup.Catalina start

SEVERE: 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:154)

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

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)

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

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

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

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

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

... 7 more

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

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

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

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

... 9 more

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

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

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

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

... 11 more


Dec 06, 2018 9:42:37 AM org.apache.coyote.AbstractProtocol pause

INFO: Pausing ProtocolHandler ["http-bio-80"]

Dec 06, 2018 9:42:37 AM org.apache.coyote.AbstractProtocol pause

INFO: Pausing ProtocolHandler ["ajp-bio-8009"]

Dec 06, 2018 9:42:37 AM org.apache.catalina.core.StandardService stopInternal

INFO: Stopping service Catalina

Dec 06, 2018 9:42:37 AM org.apache.coyote.AbstractProtocol destroy

INFO: Destroying ProtocolHandler ["http-bio-80"]

Dec 06, 2018 9:42:37 AM org.apache.coyote.AbstractProtocol destroy

INFO: Destroying ProtocolHandler ["ajp-bio-8009"]



写回答

1回答

翔仔

2018-12-06

同学好,需要你查看下80端口的时候tomcat有没有启动成功,看看tomcat logs/catalina.log尾部是否报错,如果启动成功,那么请你检查相关服务器的安全组策略,确保80端口已经开放

0
3
翔仔
回复
幕布斯0397034
/usr/local/src/java/tomcat7/webapps/upload does not exist or is not a readable directory 这个错误说的是同学你的/usr/local/src/java/tomcat7/webapps/upload这个目录地址不是可读的,你可以用root帐号chmod 777 -R /usr/local/src/java/tomcat7/webapps/upload 修改下目录权限,前提是这些目录已经创建好了
2018-12-06
共3条回复

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

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

5113 学习 · 8144 问题

查看课程