1 Reply Latest reply on Jan 20, 2009 8:20 PM by Ji-Woong Choi

    Can't connect to JBoss Messaging behind firewall

    Ji-Woong Choi Newbie

      Hello.
      I posted this topic to remoting forum, however there is no reply.

      I'm testing on below configuration under firewall. The problem is that secondaryBindPort doesn't work on our configuration.

      JBoss Messaging : JBoss Messaging 1.4.0.SP3-CP04
      JBoss Remoting : JBoss remoting 2.2.2 SP-10

      I appended secondary port attributes to the configuration file, because I use the "ports-02" in sample-bindings.xml under docs/examples/binding-manager/, :


      <attribute name="secondaryBindPort">14000</attribute>
      <attribute name="secondaryConnectPort">14001</attribute>




      When I run client to JBoss Messaging over firewall, I've got this message :

      Exception in thread "main" java.lang.RuntimeException: Failed to download and/or install client side AOP stack
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java
      :199)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
       at com.jboss.jms.client.SimpleSender.send(SimpleSender.java:34)
       at com.jboss.jms.client.SimpleSender.main(SimpleSender.java:97)
      Caused by: org.jboss.jms.exception.MessagingNetworkFailureException
       at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
       at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
       at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$Clie
      ntConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:237)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnection
      FactoryDelegate.java)
       at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java
      :192)
       ... 4 more
      Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem esta
      blishing socket connection for InvokerLocator [bisocket://mydomain.com:4657//?JBM_clientMaxPoolSize=
      200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=4000]
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.
      java:579)
       at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java
      :422)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.remoting.Client.invoke(Client.java:536)
       at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
       ... 9 more
      Caused by: java.net.NoRouteToHostException: No route to host
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
       at java.net.Socket.connect(Socket.java:520)




      I think this doesn't work with secondaryBindPort and secondaryConnectPort attributes.
      bisocket://mydomain.com:4657//?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=4000




      Which configuratoin do I have to check and how do I solve this?
      Thank you.

        • 1. Re: Can't connect to JBoss Messaging behind firewall
          Ji-Woong Choi Newbie

          In addtion, I opened 4657 port in the Messaging server side, error message was changed as below

          Exception in thread "main" org.jboss.jms.exception.MessagingNetworkFailureException
           at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:245)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:191)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
           at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:81)
           at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
           at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
           at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
           at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
           at com.jboss.jms.client.SimpleSender.send(SimpleSender.java:34)
           at com.jboss.jms.client.SimpleSender.main(SimpleSender.java:95)
          Caused by: java.net.ConnectException: Connection refused
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
           at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
           at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
           at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
           at java.net.Socket.connect(Socket.java:520)
           at java.net.Socket.connect(Socket.java:470)
           at java.net.Socket.<init>(Socket.java:367)
           at java.net.Socket.<init>(Socket.java:180)
           at org.jboss.remoting.transport.bisocket.BisocketServerInvoker.createControlConnection(BisocketServerInvoker.java:260)
           at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:411)
           at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
           at org.jboss.remoting.Client.invoke(Client.java:1634)
           at org.jboss.remoting.Client.addCallbackListener(Client.java:1703)
           at org.jboss.remoting.Client.addListener(Client.java:921)
           at org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:259)
           at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:375)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:158)
           ... 10 more


          I think while messagine server open a callback port and try to communicate with client, client can't connect the new port in the JBM sever because of firewall.

          tcp 0 0 0.0.0.0:1299 0.0.0.0:* LISTEN
          tcp 0 0 10.64.160.107:1299 10.64.160.179:36870 TIME_WAIT


          It seems that secondary port of remoting doesn't work correctly.