Category:

Problem(Abstract)

Receiving the error javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host:



Solutions


Cause


When attempting to use JMS or RMI remotely, you might run across an exception that looks like this:

javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1

This is the result of a problem in the JBoss server side configuration. You're successfully talking to the correct server, but it does not know it's own hostname or IP address.

Resolving the problem

-b option for run.bat/run.sh enables us to tell JBoss the host it is running on. That solves this problem.

Eg. run.bat -b192.168.9.6 -Djboss.bind.address=0.0.0.0

(the 2nd parameter makes jboss server accessible from remote clients)

Comments (0)

Post a Comment