你的位置:首页 > Java教程

[Java教程]java.lang.Exception: Socket bind failed: [730013] An attempt was made to acc


在CMD命令行中启动运行startup.bat,启运程序总是闪退,查看日志发现如下错误:

26-Jan-2016 18:12:34.463 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["ajp-apr-8009"]java.lang.Exception: Socket bind failed: [730013] An attempt was made to access a socket in a way forbidden by its access permissions. at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:471)at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:737)at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)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:567)at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851)at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)at org.apache.catalina.startup.Catalina.load(Catalina.java:576)at org.apache.catalina.startup.Catalina.load(Catalina.java:599)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:497)at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

仔细查了一遍,端口号也没有被占用。

网上查得:

原因:是端口已被占用.之前的tomcat进程没有被完全关闭掉.
避免方法:首先关闭tomcat再修改配置文件
解决方法:任务管理器或者kill杀死javaw进程重启tomcat即