jQuery in Action, 2nd edition
The moose likes JBoss/WildFly and the fly likes CommunicationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "CommunicationException" Watch "CommunicationException" New topic


Bijoy Sivan

Joined: Jan 30, 2003
Posts: 6
Hi all,
I am doing development on a W2K machine and have developed an ejb and it is working fine in the local machine. Now I have deployed the ejb in JBOSS server which is running in a Redhad machine. In the redhad machine I am able to access the ejb. When I try to access it from some other machine I get the following exception.

J:\jboss-3.0.3_tomcat-4.1.12\JBOSS Sample\bean1\classes>java FirstClient
Exception in thread "main" javax.naming.CommunicationException. Root exception
is java.rmi.ConnectException: Connection refused to host:; nested exce
ption is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at FirstClient.main(FirstClient.java:11)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.<init>(Socket.java:290)
at java.net.Socket.<init>(Socket.java:118)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 8 more
I have set the jndi.properties file to point to the Redhad machine.
Please help me.
Thanks in advance
Bijoy Sivan K
Bijoy Sivan

Joined: Jan 30, 2003
Posts: 6
Please refer the following links for answers
Robert Fuller

Joined: Jul 30, 2004
Posts: 1
My problem had similar manifestations and was resolved by passing the following option to the jvm:

rocket mass heater kickstarter
subject: CommunicationException