请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

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

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

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

https://img1.sycdn.imooc.com//szimg/5c0881440001ba2705380064.jpg

https://img1.sycdn.imooc.com//szimg/5c0881bc0001f76e05220031.jpg

https://img1.sycdn.imooc.com//szimg/5c0881450001829208530618.jpg

https://img1.sycdn.imooc.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回答

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

0 回复 有任何疑惑可以回复我~
  • 提问者 幕布斯0397034 #1
    老师,您看一下我的tomcat logs/catalina.log的日志,报了这个异常
    回复 有任何疑惑可以回复我~ 2018-12-06 10:04:04
  • 提问者 幕布斯0397034 #2
    非常感谢!
    回复 有任何疑惑可以回复我~ 2018-12-06 10:23:23
  • 翔仔 回复 提问者 幕布斯0397034 #3
    /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 20:10:06
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信