1. 程式人生 > >快速解決修改tomcat埠為80佔用問題

快速解決修改tomcat埠為80佔用問題

問題: 今天把tomcat的預設埠8080改80,然後報了這樣的錯誤

嚴重: Failed to initialize end point associated with ProtocolHandler ["http-apr-80"]
java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×?
	at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:430)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
	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:559)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
2018-4-26 9:53:12 org.apache.catalina.core.StandardService initInternal
嚴重: 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:106)

顯然是80埠被佔用了

解決方法:

開啟cmd 執行net stop http命令


把上面服務都關掉


tomcat可以正常啟動了。