Thursday, July 24, 2008

Reason: java.rmi.server.ExportException: Port already in use: 1098; nested exception is: java.net.BindException: Address already in use: JVM_Bind

ObjectName: jboss:service=Naming
State: FAILED
Reason: java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
I Depend On:
jboss.system:service=ThreadPool
jboss:service=NamingBeanImpl
Depends On Me:
jboss.mq:service=DestinationManager
jboss.mq:service=Invoker
jboss.mq:service=InvocationLayer,type=UIL
jboss.mq:service=InvocationLayer,type=UILXA
jboss.mq:service=InvocationLayer,type=UIL2,alias=UIL2ConnectionFactory
jboss.mq:service=InvocationLayer,type=UIL2XA,alias=UIL2XAConnectionFactory
jboss.jms:alias=QueueConnectionFactory
jboss.jms:alias=TopicConnectionFactory
jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
jboss.jmx:alias=jmx/rmi/RMIAdaptor
jboss:service=Mail


at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDeployer.java:1385)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:785)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)

OR

12:04:32,117 WARN [ServiceController] Problem starting service jboss:service=Naming
java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
at org.jnp.server.Main.initJnpInvoker(Main.java:354)
at org.jnp.server.Main.start(Main.java:316)
at org.jboss.naming.NamingService.startService(NamingService.java:284)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:120)
at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:95)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
... 62 more


Solution
==========
This Exception happens because The port Number 1098 is used by some other application.In my case It was Google talk in First Exception and Microsoft Outlook 2007 in second case uses the port number 1098,
just close Google talk/Microsoft Outlook and restart the server.later the application will pick some another port.

Regards
Asker Ali M

7 comments:

Chaitanya said...

Hi Ali,
I am facing similar problem.


ObjectName: jboss:service=Mail
State: CONFIGURED
I Depend On:
jboss:service=Naming




--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss:service=Naming
State: FAILED
Reason: java.rmi.server.ExportException: Port already in use: 1198; nested exc
eption is:
java.net.BindException: Address already in use: JVM_Bind
I Depend On:
jboss.system:service=ThreadPool
jboss:service=NamingBeanImpl
Depends On Me:
jboss.mq:service=DestinationManager
jboss.mq:service=Invoker
jboss.mq:service=InvocationLayer,type=UIL
jboss.mq:service=InvocationLayer,type=UILXA
jboss.mq:service=InvocationLayer,type=UIL2,alias=UIL2ConnectionFactory
jboss.mq:service=InvocationLayer,type=UIL2XA,alias=UIL2XAConnectionFactory
jboss.jms:alias=QueueConnectionFactory
jboss.jms:alias=TopicConnectionFactory
jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
jboss.jmx:alias=jmx/rmi/RMIAdaptor
jboss:service=Mail


at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDepl
oyer.java:1385)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:785)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:662)


07:17:23,983 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
180
07:17:24,019 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8109
07:17:24,041 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
s_4_2_2_GA date=200710221139)] Started in 55s:977ms
07:17:24,210 WARN [LoggingConnectorMDB] This timer already has been cancelled!

Please give me the solution for my problem..
Thanks in advance

Asker Ali M said...

The Simple solution is stop the application and restart the machine, and restart the JBoss server first before any other application starts.
Otherwise you can kill the process which is holding the port 1098.
The Windows Kill process is as follows.execute the following command in DOS.
Step 1: "netstat -ano" command will give the process ID which is using the port 1098.
Step 2: taskkill /PID 827 where 827 is the process id uses 1098 port.

Chaitanya said...

Hi Ali,
Thanks for your feedback..

I tried to kill the process through command prompt.
It shows like this

C:\Users\vinayy>netstat -ano

Active Connections

Proto Local Address Foreign Address State PID

TCP 0.0.0.0:1198 0.0.0.0:0 LISTENING 3056

TCP 0.0.0.0:49162 0.0.0.0:0 LISTENING 632
TCP 0.0.0.0:49163 0.0.0.0:0 LISTENING 3056
TCP 0.0.0.0:49164 0.0.0.0:0 LISTENING 3056
TCP 0.0.0.0:49166 0.0.0.0:0 LISTENING 3056

TCP :: :1198 :::0 LISTENING 3056

TCP :::49163 :::0 LISTENING 3056
TCP :::49164 :::0 LISTENING 3056
TCP :::49166 :::0 LISTENING 3056
UDP 0.0.0.0:123 *:* 448


C:\Users\vinayy>taskkill/pid 3056
ERROR: The process with PID 3056 could not be terminated.
Reason: Access is denied.

Is there any other option to solve this error.
Thanks in advance..

Asker Ali M said...

I think you are working on some servers, where it have multiple users logged in, or administrators some process is running behind.

Please talk to Admin and get the process killed, If it is your machine you can restart the machine and try restart the JBoss Server.

Chaitanya said...

Hi ali,
I am working on server machine.
I check this application in my local pc.It works fine.
Is there any problem if sql server is running in the server machine.

Chaitanya said...

Hi Ali,

Now i am login as a administrator.

Iam tried to kill the process

it shows


C:\Users\Administrator>taskkill/pid 3056
ERROR: The process with PID 3056 could not be terminated.
Reason: This process can only be terminated forcefully (with /F option).


Please give me the solution to start the jboss.
I am Facing too much headache about the application.
Please do the favour to solve the issue.

Thanks in advance....

Chaitanya said...

Hi Ali,
I am stopping the process through admin. But port is using my application.i forcbly kill the process. Now how can i resstart my process? I already reinstall the application through. but when i try to run the application it shows "failed load the JNI shared library"
C:\Profram files (x86)\java\jdk1.7.0\bin...\jre\bin\client\jvm.dll

How can i start my application.

Please give me solution to solve the issue.

Thanks in advance..