|
Solving java.net.BindException: Address already in use: JVM_Bind |
|
|
|
|
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#>
|
|
Last Updated ( Saturday, 09 May 2009 20:22 )
|