2 Replies Latest reply on Feb 6, 2012 4:30 PM by dewthefifth

    ConnectionFactory returns invalid URL which causes MessagingNetworkFailureException

      Hello, and thank you in advance for any assistence you might offer.

       

      I am trying to connect two JBoss servers, executing on separate machines, to one another using JMS through JBoss Messaging. Due to network topography and proxying requirements, the each machine is referenced differently than the machine's hostname. I'll elaborate.

       

      Network one contains a machine which we will call Jboss01.

      Network two contains two machines, Jboss02 and Jboss03.

      Network one and Network two communicate through a shared domain controller which we'll call DC01.

      When Jboss01 attempts to access Jboss02 then DC01 directs Jboss01 to JbossProxy which will proxy traffic on port 443 to port 8443.

      Jboss01 is incapable of reaching Jboss02 directly

      When Jboss02 attempts to access Jboss03 then DC01 directs Jboss02 to JbossProxy which will proxy traffic on port 443 to port 8443.

      Jboss02 is capable of reaching Jboss03 directly by asking specifically for Jboss03-vm which DC01 understands to be a direct link

       

      Jboss01>hostname will return Jboss01

      Jboss02>hostname will return Jboss02

      Jboss03>hostname will return Jboss03

       

      I am trying to send JMS messages from Jboss02 to Jboss03, but the org.jboss.jms.server.connectionfactory.ConnectionFactory returned from JNDI attempts to connect to Jboss03 instead of Jboss03-vm. This causes the connection to be routed through the proxy, which does not service the JMS port, and results in the MessageNetworkingFailureException mentioned in the topic. My JNDI connection is through Jboss03-vm, and I have set several properties (bind.addres, java.rmi.server.hostname) to Jboss03-vm to facilitate the direct connection that I require, but I cannot figure out how to configure the org.jboss.remoting.transport.Connector to use Jboss03-vm instead of Jboss03.

       

      Thanks again for any help you might offer.

       

      Environment

      I am currently working within a customer controlled environment, which limits some of my options for upgrades and solutions.

       

      JbossAS

      jboss-eap-4.3

       

      JbossMessaging

      jboss.messaging.jmsVersion=1.1

      jboss.messaging.jmsMajorVersion=1

      jboss.messaging.jmsMinorVersion=1

      jboss.messaging.jmsProviderName=JBoss Messaging

      jboss.messaging.providerVersion=1.4.0.SP3-CP08.patch01

      jboss.messaging.providerMajorVersion=1

      jboss.messaging.providerMinorVersion=4

      jboss.messaging.providerIncrementingVersion=32

       

      JbossRemoting

      Name: JBossRemoting

      Specification-Title: JBossRemoting

      Implementation-Title: JBossRemoting

      Specification-Vendor: JBoss Inc.

      Specification-Version: 2.2.3

      Implementation-Vendor-Id: http://www.jboss.org

      Implementation-Version: 2.2.3

      Implementation-Vendor: JBoss Inc.

       

      Properties

      bind.address=intellex-vm

      jboss.bind.address=0.0.0.0

      java.rmi.server.hostname=intellex-vm

        • 1. Re: ConnectionFactory returns invalid URL which causes MessagingNetworkFailureException
          gaohoward

          You posted the question to the wrong forum. This forum is for HornetQ user questions.

           

          Anyway I think your question is how to configure remoting to use jboss03-vm. If so you need to do it with your remoting configure file, esp these two params:

           

                     <attribute name="serverBindAddress">jboss03-vm</attribute>
                     <attribute name="serverBindPort">your port</attribute>

           

          Howard

          • 2. Re: ConnectionFactory returns invalid URL which causes MessagingNetworkFailureException

            Thank you for your assistence Howard.

             

            I marked your response as the correct answer, because it is the correct answer, but I want to clarify how to configure these attributes. On JBoss EAP 4.3 these attributes are configured in the ${jboss.home}/docs/examples/binding-manager/sample-bindings.xml file and not in the ${jboss.server.home}/deploy/jboss-messaging.sar/remoting-bisocket-service.xml. I had already tried the attributes you suggested before posting, but they did not resolve the problem until I found the correct place to set them. I ultimately ended up tracing the JBoss initialization code line by  line in order to notice that my changes were being ignored.

             

            Good luck to anybody else who runs into this!