aspose file tools*
The moose likes Servlets and the fly likes What's this error:  FATAL:java.net.BindException: Address in use: JVM_Bind Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What Watch "What New topic
Author

What's this error: FATAL:java.net.BindException: Address in use: JVM_Bind

Linda Xu
Ranch Hand

Joined: Feb 14, 2000
Posts: 51
I got an error message when I want to run a servlet in JBuilder 5 which have Tomcat 3.2 built in:
FATAL:java.net.BindException: Address in use: JVM_Bind
What's this error? How to solve it?
Thx!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Assuming you are using Tomcat at port 8080, there is already an instance of Tomcat running on your machine - presumably an orphan from a previous execution.
If you are using Tomcat at port 80, maybe you have a web server already running.
Bill
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
I installed the tomcat 4.01 and tried to start it got same error. There is no instance of Tomcat running currently and I went ahead and changed it to run at port other than 8080. restart the machine . Still same error. I uninstalled the Tomcat and leaves the bootstrap.jar and other .jar files then i tried to delete bootstrap.jar and I get sharing violation ?! So I can not delete it. I tried to reinstall it then i get an error complaining about bootstrap.jar existing I skipped that part and tried to start Tomcat same damn error !
here is the out put( Does something behind the scene start Tomcat ? i checked the running processes and could not see it . )

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:243)
----- 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:243)

[This message has been edited by ersin eser (edited October 23, 2001).]
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072
ersin eser
Ranch Hand

Joined: Feb 22, 2001
Posts: 1072

I don't know what but somehow Tomcat.exe kicks in that's why this was happenning . It is not in win.ini, not in startup pgm list ,I just don't know what starts it May be the new 4.01 feature ?
The reason I could not find it on the running processes list was: I kicks in kind of little late and Damn it certainly caused a lot of headache. How do I know ?!
Anyways If you use 4.01 and get JVM bind error watch for auto kick in ...
ersin
[This message has been edited by ersin eser (edited October 23, 2001).]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

JBuilder 5 is smart enough to start Tomcat in a new process, or stop and restart the same process. At least it does for me, anyways.

Tomcat 4.0.1 can be installed as a service, so on a Windows machine, you'd need to examine what services are running.

on NT - Start|Control Panel|Services

on 2000 - Start|Control Panel|Administrative Tools|Services
Change it from 'Automatic' to 'Manual'
linda lichelli
Greenhorn

Joined: Aug 07, 2002
Posts: 11
although this post is very old, i experienced this problem today all the morning. just as help for future mistakes. i run Jbuilder 7 and tomcat was on port 8080, addressing port 8081, which was locked by another program. just go to the project properties, and change the port to whatever you like and know it's open. then your program will run without BindException. to find out which program ist locking your port, you simply can browse http://localhost:#yourportnumber (e.g. 8081). if there is an interface to your browser, you'll probably discover the program. cheers, linda. (btw. it works with JBuilder 5.0 as well.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's this error: FATAL:java.net.BindException: Address in use: JVM_Bind