Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LifeCycleException and java.net.BindException while Start

 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
when i start tomcat from the menu "Start Tomcat" ,I get an error
in the Start Tomcat Console as follows.This problem welcomes
me in the morning when I start my machine.Yesterday when I faced
this problem I reinstalled Tomcat and restarted the machine.I tried now restarting the machine,to release memory if the problem is memory.No use.Help me.The error message is:
Catalina.start: LifecycleException: null.open: java.net.BindException: Address
in use: JVM_Bind
LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bin
d
at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
ctor.java:1116)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:552)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
----- Root Cause -----
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Defau
ltServerSocketFactory.java:118)
at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
ava:946)
at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
ctor.java:1114)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:552)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:218)
Thanks
madhu
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by madhu gun:
LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bind


Tomcat will attempt to 'bind' to port 8080. Something else has beat Tomcat to it. In server.xml, change all occurences of 8080 to some other, unused port, and attempt to restart Tomcat.

Whenever you access Tomcat, you will then need to use localhost:xxxx Where xxxx = the port you changed 8080 into.
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Mike
Thanks a lot.Changing only the http port 8080 did not work.WarpConnector port too had to be changed from the default
8008 to some other value in server.xml.Changing merely either
one did not work.I dont know what is this warpconnector!But
now it's fine.I thaq Mike.
With regards
madhu
 
Joe Felchlin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem, so I took your suggestion and changed the port to something else, but no amount of changing (anwhere in server.xml) works. I continually get the java.net.BindException,
and at this point, I'm fairly frustrated. Is there any way to debug this to find out how there is a conflict. In the past, I've run Apache, but I shut it down, and changed the port anyway. Is there maybe a chance Catalina is picking up the old Apache config
'magically' and causing some problems? Thanks a million!
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi joe
how r u stopping your tomcat.i suggest u not to stop it using ctrl+c.Change the port numbers of both httpconnector and warp connector in server.xml and try.Or try restarting too.Try.
madhu
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot about the warp connector thing.

This should only really be a problem if you are running two instances of Tomcat though. ie: 8080 is a common port (eg: Zope uses it by default). But the warp connector port? Anyone know what else uses 8008?

Joe: One thing that I did to run two instances of Tomcat 4.x, is I went through server.xml and replaced all occurences of the string '80' with '90'.

Also, did you try before or after madhu wrote back about also changing 8008 to something else?
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
the problem now is:: though changing both the httpconnector port
and the warpconnector port solves the problem ,it has become a solution for the day .i mean the next time i start the machine
after a shutdown ,the same error pops up at Tomcat startup and it is getting solved by changing both the above stated ports .
Ports have got to be changed once for every machine-startup.
It requires a complete solution.pl suggest what could be the problem.
thaq.
madhu
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
joe
No reply from you after last post!!!.Have you got the solution?The Tomcat( in my case) gets started as a Service automatically at startup.That was the reason it was giving problem at startup only.(In other cases we will be starting the Tomcat after stopping it.)See this in control panel under Services.So dont start again explicitly if started automatically.After startup when we try to explicitly start it,we are trying to create two instances servicing for the same port.That's why the error:
Catalina.start: LifecycleException: null.open: java.net.BindException: Address
in use: JVM_Bind
LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bin
d
at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConne
ctor.java:1116)
regards
madhu

[This message has been edited by madhu gun (edited December 07, 2001).]
 
Chris Victor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ur right some proces is not giving it's port free...on most OS'es you just can kill the process that keeps the port unavailable...As Tomcat has default 8080 and 8008 (WarpConnector),
do the following steps:
1. Analysis
2. Troubleshoot
1. Analysis
1.1 Check the listening/ open ports
type: netstat -vatn
this will give you for e.g.:
tcp 0 0 0.0.0.0:8008
Meaning that this port is still open
1.1 Check what processes are running:
type: ps -ef or ps -fu <here goes username>
2. Troubleshooting
Since you probably wont see any clear Tomcat procesname in the list, Just kill the java process which are still running
type: kill -9 <processId goes here>, for e.g.
kill -9 9330
good luck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic