Question

When i run startup.bat file of Tomcat 7 i m getting the following error.

INFO: Initializing ProtocolHandler ["http-apr-8080"] Mar 01, 2014 12:18:22 PM org.apache.coyote.AbstractProtocol init SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] 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: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:981) 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:814) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:639) at org.apache.catalina.startup.Catalina.load(Catalina.java:664) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Mar 01, 2014 12:18:22 PM org.apache.catalina.core.StandardService initInternal SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) 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:814) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:639) at org.apache.catalina.startup.Catalina.load(Catalina.java:664) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455) Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:983) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more Caused by: 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: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:981) ... 13 more

When I run the url http://localhost:8080, I get the prompt for authentication. If i give default username and password as 'tomcat', it prompts me again without successful login.
Here is my tomcat-users.xml file

  <role rolename="tomcat"/>
  <role rolename="manager-gui"/>
  <user username="tomcat" password="tomcat" roles="tomcat,manager-gui"/>

Can anybody help me please?

Was it helpful?

Solution

You may have another instance of Tomcat already running in the background and using port 8080. Try shutting it down with shutdown.bat, or look for a java process in the Windows Task Manager. You can also reboot if you really want to be sure that there's no other instance running.

OTHER TIPS

the port 8080 might be used by other application. go to server.xml in tomcat and change the port number, and restart the tomcat. To change port follow http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/

I had the same problem and I ran netstat -ano > output.txt In output.txt file, I saw the the System process with PID 4 was holding onto that 8080 port. I could not release it in any way so I restarted the system. After that it was fine.

An error like Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] means that Tomcat cannot start bind to (use) port 8080.

I had a silar Failed to initialize end point associated with ProtocolHandler ["http-apr-80"] on port 80 the other day.

Try to connect with telnet on 8080 (or whatever port this error occurs on) to figure out what process is using this port.

  1. Open a telnet connection telnet localhost 8080 (or whatever host and port you are using)
  2. Expect to see a blank screen with blinking cursor. If you get a Could not open connection to the host or similar error nothing is using this port after all.
  3. Type a command like GET (assuming HTTP protocol)
  4. See if the server responds whith a HTTP responds which could reveil a bit about what process is serving this port.

You may have another instance of Tomcat already running in the background and using port 8080. Go to Task Manager and end all the java*.exe processes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top