• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM_BIND Exception in JBOSS-Port already in use.

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
pandu ranga
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
pandu ranga
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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:

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pandu,
Simple solution is to restart your machine
It works for most of the time.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
< 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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic