Question

I got issues connecting to our remote HornetQ JMS-Provider (2.2.5, standalone) via JNDI on the standard port 1099. I try this not by code but via the tool JMS Browser. When connecting against a local hornetq instance everything works fine.

The error I get is:

10:10:38.805 Error connecting to head-sa: Connection refused to host: 127.0.0.1; nested exception is: 

And that's it. No stacktrace in the ui or in any log. Testing with telnet give me another insight, it works fine and gave me (beside of the cryptic serialized rmi objects) the following String:

# telnet remoteserver 1099
Trying 193.164.8.162...
Connected to remoteserver.
Escape character is '^]'.
��srjava.rmi.MarshalledObject|���c�>.. and so on
UnicastRef2 127.0.0.1Jk��`�w�xConnection closed by foreign host.

Now the interessting part is UnicastRef2 127.0.0.1, which might be (but hasn't to be) a configuration issue with hornetq-configuration.xml or hornetq-jms.xml. Those are very standard on my remote host, except on hornetq-configuration.xml:

<acceptor name="netty">
    <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
    <param key="host"  value="${hornetq.remoting.netty.host:0.0.0.0}"/>
    <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>

I even tried a tunnel to the remote host, but this gave me the same result. Any ideas? Thanks.

Was it helpful?

Solution

I am having similar problems.

What worked for me was to configure JNDI settings in hornetq-bean.xml and the hornetq server ip as binding addresses values.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top