Friday, July 20, 2012

Tomcat Server startup failed


The below error occurs when the Tomcat Server port is used by some other application.

July 20, 2012 3:07:22 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use: JVM_Bind
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
   at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

In Windows, go to Start --> Run --> Enter ‘cmd’. Go to the root directory by entering ‘netstat  -ano’. This command would list all the ports in use by Windows. Check if the Tomcat port is used by some other application.  If yes, try modifying the tomcat port as follows
  • Go to Tomcat root folder /conf/server.xml 
  • Look for the server port in use and modify to a port number not in use
   <Server port="8005" shutdown="SHUTDOWN">
  • Go to eclipse and double click on the Tomcat server in the server tab. Changed the port number to the new port number. Save Configurations, close ecplise and launch again. Restart server.

No comments:

Post a Comment