Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 7 startup.bat exception

Tags:

tomcat7

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?

like image 288
Tjs Avatar asked Mar 01 '14 07:03

Tjs


People also ask

How do I stop Tomcat from restarting?

Call shutdown.bat to stop it if necessary. Otherwise you should be able to access that manager at http://localhost:8080/html/manager. Before doing that you might need to configure a user/password first then restart tomcat. See tomcat documentation to learn more about it.

Does Tomcat use the CLASSPATH environment variable?

However, the standard Tomcat startup scripts ( $CATALINA_HOME/bin/catalina.sh or %CATALINA_HOME%\bin\catalina.bat) totally ignore the contents of the CLASSPATH environment variable itself, and instead build the System class loader from the following repositories:

What is Tomcat-util-jar?

tomcat-util.jar — Common classes used by various components of Apache Tomcat. WebappX — A class loader is created for each web application that is deployed in a single Tomcat instance.

Are Tomcat classes visible to web applications?

All such classes are visible to both Tomcat internal classes, and to web applications.


2 Answers

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/

like image 194
sudarshan Avatar answered Nov 11 '22 18:11

sudarshan


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.

like image 20
David Levesque Avatar answered Nov 11 '22 18:11

David Levesque