1. 程式人生 > >阿里雲海外伺服器80埠無法啟動

阿里雲海外伺服器80埠無法啟動

1.防火牆關了
2.安全組允許80了
3.測試8080,8081,8082都成功了
4.改為80失敗了
5.網上有人說centos7  只有root賬號才能開啟tomcat,普通使用者只能監聽1024以上的埠(我是用root登入的)

6.問題至此沒發解決

最終:

1.把系統yum安裝的tomcat解除安裝

2.tomcat官網重新下載,手動安裝

run success perfect!

附:伺服器錯誤日誌

 Permission denied (Bind failed)
第5點是主要原因
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Server version:       
 Apache Tomcat/7.0.76
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Server built:          Oct 30 2017 10:21:55 UTC
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Server number:         7.0.76.0
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: OS Name:               Linux
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: OS Version:            3.10.0-693.2.2.el7.x86_64
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Architecture:          amd64
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: JVM Version:           1.8.0_151-b12
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: CATALINA_BASE:         /usr/share/tomcat
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: CATALINA_HOME:         /usr/share/tomcat
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Dcatalina.base=/usr/share/tomcat
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Dcatalina.home=/usr/share/tomcat
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Djava.endorsed.dirs=
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Djava.io.tmpdir=/var/cache/tomcat/temp
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
Nov 13, 2017 3:21:22 PM org.apache.catalina.startup.VersionLoggerListener 
log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Nov 13, 2017 3:21:22 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Nov 13, 2017 3:21:23 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Nov 13, 2017 3:21:23 PM org.apache.coyote.AbstractProtocol 
init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-80"]
java.net.BindException: Permission denied (Bind failed) <null>:80
	
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:413)
	
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:715)
	
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:452)
	
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
	
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
	
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560)
	
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:840)
	
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	
at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
	
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
	
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:253)
	
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)

Caused by: java.net.BindException: Permission denied (Bind failed)
	
at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at java.net.ServerSocket.<init>(ServerSocket.java:181)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
	at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:400)
	... 17 more

Nov 13, 2017 3:21:23 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-80]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-80]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:840)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
	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:253)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	... 12 more
Caused by: java.net.BindException: Permission denied (Bind failed) <null>:80
	at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:413)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:715)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:452)
	at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
	... 13 more
Caused by: java.net.BindException: Permission denied (Bind failed)
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at java.net.ServerSocket.<init>(ServerSocket.java:181)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
	at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:400)
	... 17 more

Nov 13, 2017 3:21:23 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 13, 2017 3:21:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 818 ms
Nov 13, 2017 3:21:23 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 13, 2017 3:21:23 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.76
Nov 13, 2017 3:21:23 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat/webapps/hao.war
Nov 13, 2017 3:21:23 PM org.apache.catalina.deploy.WebXml setVersion
WARNING: Unknown version string [3.1]. Default version will be used.
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags/form is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.springframework.org/tags is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Nov 13, 2017 3:21:25 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.