Home JBoss Server Solving java.net.BindException: Address already in use: JVM_Bind
11 | 03 | 2010
JBoss 5 AS Book
"JBoss AS 5 development" reviews
Please share your feedback/review with other readers!
Banner
Dashboard
Advertise with Us
Banner
RSS Feed
Login
Sign here for the NewsLetter.



Poll
What book could be in your wish list next XMas ?
 
JBoss admin resources
Banner
JBoss howto

How can you solve deployment errors caused by large war/jar/ear files ?

jboss recipe of the day ...
Read More

How do you configure your .war to be deployed after your EJB ?

jboss recipe of the day ...
Read More

How do I configure a Queue/Topic to work in a cluster?

JBoss recipe of the day ...
Read More
Solving java.net.BindException: Address already in use: JVM_Bind PDF Print E-mail
Written by F.Marchioni   
Saturday, 09 May 2009 20:05

Have you got "java.net.BindException: Address already in use: JVM_Bind " when you start JBoss ?
Here's how to solve it.

The most likely option is that you have still one instance of JBoss running, maybe because of an unclean shutdown.
Verify from the Windows Task Manager or (Unix User) with a ps -ef that you don't have any jboss server running.

In the unfortunate circumstance that jboss is not active then there's a process which has stolen some of JBoss
default ports. In the following table you can find a list of JBoss default ports for some common services:
 

Port

Type

Service Descriptor

Service Name

Attribute Name

 

1098

TCP

conf/jboss-service.xml

jboss:service=Naming

RmiPort

1099

TCP

conf/jboss-service.xml

jboss:service=Naming

Port

3873

TCP

deploy/ejb3.deployer/META-INF/jboss-service.xml

jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3

InvokerLocator

4444

TCP

conf/jboss-service.xml

jboss:service=invoker,type=jrmp (legacy 4.0.x invoker)

RMIObjectPort

4445

TCP

conf/jboss-service.xml

jboss:service=invoker,type=pooled (legacy 4.0.x invoker)

ServerBindPort

4446

TCP

conf/jboss-service.xml

jboss.remoting:service=Connector,transport=socket (EJB2 beans in AS/EAP 4.2+)

serverBindPort on Configuration

8009

TCP

deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml

jboss.web:service=WebServer

port on AJP Connector

8080

TCP

deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml

jboss.web:service=WebServer

port on HTTP Connector

8083

TCP

conf/jboss-service.xml

jboss:service=WebService

Port

8090

TCP

deploy/jms/oil-service.xml

jboss.mq:service=InvocationLayer,type=OIL

ServerBindPort

8092

TCP

deploy/jms/oil2-service.xml

jboss.mq:service=InvocationLayer,type=OIL2

ServerBindPort

8093

TCP

deploy/jms/uil2-service.xml

jboss.mq:service=InvocationLayer,type=UIL2

ServerBindPort

0(a)

TCP

deploy/jms/rmi-il-service.xml

jboss.mq:service=InvocationLayer,type=RMI

NONE

0(b)

UDP

deploy/snmp-adaptor.sar/META-INF/jboss-service.xml

jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor

One frequent cause is MS Office or MS OfficeCommunicator that sometimes engage port 1098 and 1099.
If you don't want to shut down these tools then your only option is using a different bind address

run -b xx.xx.xx.xx

Where xx.xx.xx.xx is JBoss bind address.
If the cause of problem cannot still cannot be found you have to resort to a few admin tricks.

Windows users:

1. In MS-DOS, send command "netstat -ao". You can get network information for all processes.
2. Find out the one using port 1098, get the PID.
3. Find out the process with the PID you just got from windows task manager and shut it down. (By default the Task Manager doesn't show the PID. You have to add it from the menu View | Select columns)
4. Restart JBoss.
5. Restart the application you've just shutdown.

Unix users:

Most Unix systems have the built-in fuser command that returns the process which is engaging a port :


fuser -v -n (tcp | udp) <port#>


JBoss.org Search
Custom Search
Comments
Search
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Saturday, 09 May 2009 20:22 )