Failed to create netty connection: java.net.NoRouteToHostException in HornetQ

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.1.1
  • HornetQ
    • 2.2.5-GA
  • Red Hat Enterprise Linux (RHEL)

Issue

  • Saw the error: "Failed to create netty connection: java.net.NoRouteToHostException" exception when attempting to setup a HornetQ cluster.

Resolution

  • Please make sure HornetQ servers are bound to valid IP addresses.

  • Verify the configuration at /etc/hosts.

  • Configure the firewall to accept netty connections. The default netty connector port is 5445

Diagnostic Steps

Please verify the following exception on the server log :

    ERROR [NettyConnector] Failed to create netty connection: java.net.NoRouteToHostException: No route to host
            at java.net.PlainSocketImpl.socketConnect(Native Method) [:1.6.0_25]
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) [:1.6.0_25]
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) [:1.6.0_25]
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) [:1.6.0_25]
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) [:1.6.0_25]
            at java.net.Socket.connect(Socket.java:529) [:1.6.0_25]
            at  org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.connect(OioClientSocketPipelineSink.java:114)  [:6.0.0.Final]
            at  org.jboss.netty.channel.socket.oio.OioClientSocketPipelineSink.eventSunk(OioClientSocketPipelineSink.java:74)  [:6.0.0.Final]
            at org.jboss.netty.channel.Channels.connect(Channels.java:541) [:6.0.0.Final]
            at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:217) [:6.0.0.Final]
            at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227) [:6.0.0.Final]
            at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188) [:6.0.0.Final]

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

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