aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JVM_BIND Exception in JBOSS-Port already in use. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JVM_BIND Exception in JBOSS-Port already in use." Watch "JVM_BIND Exception in JBOSS-Port already in use." New topic
Author

JVM_BIND Exception in JBOSS-Port already in use.

pandu ranga
Greenhorn

Joined: Oct 22, 2007
Posts: 23
Hi

I am trying to start the jboss server in eclipse IDE.But while starting, the server throws an exception namely " JVM_BIND Exception -Port already in use 8080" . I am also using the tomcat in eclipse IDE but on different port9080 and it is in shut down mode.I have tried changing the port of jboss from 8080 to 8081 still no use.There is no other server running other than JOBOSS on port 8080. Can some body help me in resolving this issue?

Thanks in advance

Regards
Pandu
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

In the command line type "netstat -na" and chech whether you see 8080. Also check whether you have forgotten to shut down previous instance of Jboss started from the IDE.


Groovy
pandu ranga
Greenhorn

Joined: Oct 22, 2007
Posts: 23
HI

Thanks for the reply. I have checked the command prompt by giving the netstat -na but I couldnt find 8080.Also I made sure that I shut down the previous instance of JBOSS.Is there any other way to resolve this

Pandu
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Be aware that (if this is Windows) there are some nasty things out there that can invalidate the output of netstat, for example anything that acts as a proxy - such as Google desktop. It can hold on to a port and netstat will not report this.

Being Windows, you could just use the classic fix of restarting your machine.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
pandu ranga
Greenhorn

Joined: Oct 22, 2007
Posts: 23
hi

i found that there was some port 0.0.0.8080 which is in listening mode through netn command when jboss is started.how i can i disable this port.

thanks

pandu
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by pandu ranga:
hi

i found that there was some port 0.0.0.8080 which is in listening mode through netn command when jboss is started.how i can i disable this port.

thanks

pandu


You will have to find out which application is running at that port. Not easy I think. Tomcat and Oracle XE have 8080 as default port. Go to windows services and stop application one by one and check netstat output. The simplest option would be to run jboss on some other port
pandu ranga
Greenhorn

Joined: Oct 22, 2007
Posts: 23
HI

I have tried changing the port number to some other number.But can you please let me know where do I need to change the port number for jboss

pandu
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10290
    
168

Originally posted by Prad Bhat:


You will have to find out which application is running at that port. Not easy I think.


That's what i thought a few days back, until i looked at the arguments that can be passed to the netstat command. The following command will show the port and also the application which is using that port:



[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10290
    
168

Originally posted by pandu ranga:
HI

I have tried changing the port number to some other number.But can you please let me know where do I need to change the port number for jboss



If you are trying to change only port 8080 to some other port, then you can do it in server.xml file which you will find in %JBOSS_HOME%\server\< serverName>\deploy\jboss-web.deployer (for JBoss 4.2.x) or %JBOSS_HOME%\server\< serverName>\deploy\jbossweb-tomcatXX.sar (for earlier versions of JBoss)

You might also want to have a look at DebugBindException
[ December 22, 2007: Message edited by: Jaikiran Pai ]
Suresh Gopi
Ranch Hand

Joined: Mar 08, 2007
Posts: 49
Pandu,
Simple solution is to restart your machine
It works for most of the time.


Regards<br />Suresh
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by Jaikiran Pai:


That's what i thought a few days back, until i looked at the arguments that can be passed to the netstat command. The following command will show the port and also the application which is using that port:



Thanks, it was useful.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10290
    
168

< Hijack>
I'm sorry, i am hijacking this thread.

Pradip, could you please delete some messages from your Private Messages? I'm trying to send you a PM since a few months now, but looks like your message box has reached the maximum limit of PMs.

< /Hijack>
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

While netstat -nb is useful it has limitations.It just prints out the exe name but not the path of the application. This would be problematic when there are sevaral instance of the application running for e.g. java.exe and you dont know which process to shutdown. Better option would be to find out the process id which is using a port number so that you can kill it.
I haven't tried it out but this may be useful
http://www.rekk.de/bloggy/?p=18
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by Jaikiran Pai:
< Hijack>
I'm sorry, i am hijacking this thread.

Pradip, could you please delete some messages from your Private Messages? I'm trying to send you a PM since a few months now, but looks like your message box has reached the maximum limit of PMs.

< /Hijack>

I have deleted some PMs
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I have found out a simpler way in windows OS
[B][/B]

The last column in output contains Process ID. Just kill it to free the port.
pandu ranga
Greenhorn

Joined: Oct 22, 2007
Posts: 23
HI

Thanks for the inputs.Yup I started working now.There are two solutions to this problem.

1) change the port number of jboss to some other number
2) by using command netstat -nao|find "8080" find the process id for the port 8080 and use the tskill "processid" for killing the process

Pandu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM_BIND Exception in JBOSS-Port already in use.