java.rmi.server.ExportException: Port already in use : while starting JBoss Instance in a Cluster

Solution Verified - Updated -

Issue

  • We have created multiple instances of JBoss EAP on single machine with one IP address. When I try to run them, only node1 starts properly. node2 refused to start and it gives me the following error.
    java.rmi.server.ExportException: Port already in use: 1098; nested exception is: 
     java.net.BindException: Address already in use
     at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
     at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
     at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
     at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
     at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
     at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
     at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
     at org.jnp.server.Main.initJnpInvoker(Main.java:462)
     at org.jnp.server.Main.start(Main.java:422)
     at org.jboss.naming.NamingService.startService(NamingService.java:320)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
     at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
     at $Proxy38.start(Unknown Source)

Also I have difficulty shutting down node2 as it wont shutdown with the commands I use and I always have to kill the PID.

Environment

  • Enterprise Application Platform (EAP)
    • JBoss 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.