4 Replies Latest reply on Sep 28, 2009 8:02 AM by mrkmrk

    Local Port in JBoss Messaging

    mrkmrk

      Hi

      We are using JBoss Messaging. In our new setup there is a firewall between the server and client. Therefore we do not want to use random ports in our JMS setup. We have set

      <attribute name="secondaryBindPort">44580</attribute>
       <attribute name="secondaryConnectPort">44590</attribute>

      in our server setup. This seems to work fine. However the client then says "OK, you can contact me on this port nnn". And nnn seems to be random. I have googled this issue and it seems that under jboss.mq UIL2 you could set a "client" local port. Is this same possible with JBoss Messang and JBoss Remoting?

      Thanks in advance,
      Morten


        • 1. Re: Local Port in JBoss Messaging
          mrkmrk

          By the way we are using JBoss 4.2.3 GA with JBoss Messaging 1.4.4 installed.

          • 2. Re: Local Port in JBoss Messaging
            gaohoward

            My impression is that remoting don't have such a param that control the client port. You need to confirm with remoting team I think.

            Howard

            • 3. Re: Local Port in JBoss Messaging
              mrkmrk

              By the way I'm unable to make it work even if start the setup without a firewall between. As soon as I enable secondaryBindPort and secondaryConnectPort on the JMS server, the setup fails:
              Here is the log:

              2009-09-28 11:12:57,398 DEBUG [org.jboss.remoting.Client] Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6].connect(ConsolidatedListener(UNINITIALIZED))
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting maxPoolSize to 200
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] constructed
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting maxPoolSize to 200
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Setting ping frequency to: 214748364
              2009-09-28 11:12:57,413 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] connecting
              2009-09-28 11:12:57,414 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] Creating semaphore with size 200
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] added new pool ([]) as ServerAddress[10.44.41.61:4557, NO enableTcpNoDelay timeout 0 ms, maxPoolSize=200]
              2009-09-28 11:12:57,414 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] connected
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.Client] Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] enableLease: true
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.Client] Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] calling MicroRemoteClientInvoker.establishLease()
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] sending initial lease ping to server to determine if server has leasing enabled.
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] initiating lease for leasePingerId 5c4o13w-3h0dq-g05023zr-1-g0504qiu-9
              2009-09-28 11:12:57,414 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](1) invoking InvocationRequest[26b12ba3, $PING$]
              2009-09-28 11:12:57,415 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] obtained semaphore: 199
              2009-09-28 11:12:57,415 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] creating socket
              2009-09-28 11:12:57,417 INFO [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/admin-1.34-SNAPSHOT.ear/admin-webapp-1.34-SNAPSHOT.war/
              2009-09-28 11:12:57,440 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] created socket: Socket[addr=/10.44.41.61,port=4557,localport=52114]
              2009-09-28 11:12:57,440 TRACE [org.jboss.remoting.transport.socket.SocketWrapper] constructing org.jboss.jms.client.remoting.ClientSocketWrapper instance for Socket[addr=/10.44.41.61,port=4557,localport=52114], using timeout 0
              2009-09-28 11:12:57,440 TRACE [org.jboss.remoting.transport.socket.SocketWrapper] ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522] setting timeout to 0
              2009-09-28 11:12:57,440 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing version 22 on output stream
              2009-09-28 11:12:57,440 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing invocation to marshaller
              2009-09-28 11:12:57,442 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] done writing invocation to marshaller
              2009-09-28 11:12:57,442 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading version from input stream
              2009-09-28 11:12:57,470 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] read version 22 from input stream
              2009-09-28 11:12:57,470 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading response from unmarshaller
              2009-09-28 11:12:57,476 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] returned ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522] to pool
              2009-09-28 11:12:57,476 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] released semaphore: 200
              2009-09-28 11:12:57,476 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received response InvocationResponse[26c9af95, InvocationResponse[3267318, true]]
              2009-09-28 11:12:57,476 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received InvocationResponse so going to return response's return value of InvocationResponse[3267318, true]
              2009-09-28 11:12:57,476 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] server does have leasing enabled (with default lease period of 10000) and will start a new lease pinger.
              2009-09-28 11:12:57,478 TRACE [org.jboss.remoting.LeasePinger] LeasePinger[5c4o13w-3h0dq-g05023zr-1-g0504qiu-9:SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](5c4o13w-3h0dq-g05023zr-1-g0504qie-8)] adding new client with session ID 5c4o13w-3h0dq-g05023zr-1-g0504qi9-6 and lease period 10000
              2009-09-28 11:12:57,482 TRACE [org.jboss.remoting.LeasePinger] LeasePinger[5c4o13w-3h0dq-g05023zr-1-g0504qiu-9:SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](5c4o13w-3h0dq-g05023zr-1-g0504qie-8)] sending ping to server. Currently managing lease for following clients:
               5c4o13w-3h0dq-g05023zr-1-g0504qi9-6
              
              2009-09-28 11:12:57,483 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](1) invoking InvocationRequest[31ffc182, $PING$]
              2009-09-28 11:12:57,483 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] obtained semaphore: 199
              2009-09-28 11:12:57,483 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reusing pooled connection: ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522]
              2009-09-28 11:12:57,483 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing version 22 on output stream
              2009-09-28 11:12:57,483 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing invocation to marshaller
              2009-09-28 11:12:57,487 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] done writing invocation to marshaller
              2009-09-28 11:12:57,487 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading version from input stream
              2009-09-28 11:12:57,521 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] read version 22 from input stream
              2009-09-28 11:12:57,521 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading response from unmarshaller
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] returned ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522] to pool
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] released semaphore: 200
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received response InvocationResponse[6aadb91b, InvocationResponse[3353d254, true]]
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received InvocationResponse so going to return response's return value of InvocationResponse[3353d254, true]
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.LeasePinger] LeasePinger[5c4o13w-3h0dq-g05023zr-1-g0504qiu-9:SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](5c4o13w-3h0dq-g05023zr-1-g0504qie-8)] successfully pinged the server
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.LeasePinger] LeasePinger[5c4o13w-3h0dq-g05023zr-1-g0504qiu-9:SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](5c4o13w-3h0dq-g05023zr-1-g0504qie-8)] starting lease timer with ping period of 10000
              2009-09-28 11:12:57,522 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557]: client = Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6], listener = ConsolidatedListener(UNINITIALIZED)
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=2000 ms] InvokerLocator: InvokerLocator [bisocket://AMISQL02:4557/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&failureDisconnectTimeout=0&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&useClientConnectionIdentity=true&validatorPingPeriod=10000&validatorPingTimeout=5000]
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=2000 ms] "failureDisconnectTimeout" set to null
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms] InvokerLocator: InvokerLocator [bisocket://AMISQL02:4557/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&failureDisconnectTimeout=0&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&useClientConnectionIdentity=true&validatorPingPeriod=10000&validatorPingTimeout=5000]
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms] "failureDisconnectTimeout" set to 0
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms] setting failureDisconnectTimeout to 0
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms]: sharedInvoker = SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557], leasePinger = LeasePinger[5c4o13w-3h0dq-g05023zr-1-g0504qiu-9:SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](5c4o13w-3h0dq-g05023zr-1-g0504qie-8)]
              2009-09-28 11:12:57,529 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms] created
              2009-09-28 11:12:57,529 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms] added ConnectionListener: ConsolidatedListener(UNINITIALIZED) for Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6]
              2009-09-28 11:12:57,529 TRACE [org.jboss.remoting.ConnectionValidator] config timeout: null
              2009-09-28 11:12:57,530 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms]: pingPeriod: 10000
              2009-09-28 11:12:57,530 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms]: pingTimeout: 5000
              2009-09-28 11:12:57,530 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:null, pingPeriod=10000 ms]: ping retries: 1
              2009-09-28 11:12:57,558 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting maxPoolSize to 200
              2009-09-28 11:12:57,558 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,558 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,558 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] constructed
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting maxPoolSize to 200
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Setting ping frequency to: 214748364
              2009-09-28 11:12:57,559 TRACE [org.jboss.remoting.ConnectionValidator] inner client invoker not connected, connecting ...
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] connecting
              2009-09-28 11:12:57,559 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] using pool ([ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522]]) already defined for ServerAddress[10.44.41.61:4557, NO enableTcpNoDelay timeout 0 ms, maxPoolSize=200]
              2009-09-28 11:12:57,559 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[46828972, bisocket://AMISQL02:4557] connected
              2009-09-28 11:12:57,560 DEBUG [org.jboss.remoting.ConnectionValidator] ConnectionValidator[618257c2:SocketClientInvoker[46828972, bisocket://AMISQL02:4557], pingPeriod=10000 ms] started
              2009-09-28 11:12:57,561 DEBUG [org.jboss.remoting.Client] Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6]: created ConnectionValidator[618257c2:SocketClientInvoker[46828972, bisocket://AMISQL02:4557], pingPeriod=10000 ms]
              2009-09-28 11:12:57,561 DEBUG [org.jboss.remoting.Client] Client[343601588:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] connected to InvokerLocator [bisocket://AMISQL02:4557/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&failureDisconnectTimeout=0&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&useClientConnectionIdentity=true&validatorPingPeriod=10000&validatorPingTimeout=5000]
              2009-09-28 11:12:57,561 DEBUG [org.jboss.remoting.Client] Client[493230442:5c4o13w-3h0dq-g05023zr-1-g0504qi9-7].connect(null)
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting maxPoolSize to 1
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] constructed
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting maxPoolSize to 1
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting client socket wrapper class name to org.jboss.jms.client.remoting.ClientSocketWrapper
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting shouldCheckConnection to false
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.SocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] setting timeout to 0
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] Setting ping frequency to: 214748364
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] connecting
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] Creating semaphore with size 1
              2009-09-28 11:12:57,565 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] added new pool ([]) as ServerAddress[10.44.41.61:4557, NO enableTcpNoDelay timeout 0 ms, maxPoolSize=1]
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[16433db4, bisocket://AMISQL02:4557] connected
              2009-09-28 11:12:57,565 TRACE [org.jboss.remoting.Client] Client[493230442:5c4o13w-3h0dq-g05023zr-1-g0504qi9-7] enableLease: false
              2009-09-28 11:12:57,565 DEBUG [org.jboss.remoting.Client] Client[493230442:5c4o13w-3h0dq-g05023zr-1-g0504qi9-7] connected to InvokerLocator [bisocket://AMISQL02:4557/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&failureDisconnectTimeout=0&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&useClientConnectionIdentity=true&validatorPingPeriod=10000&validatorPingTimeout=5000]
              2009-09-28 11:12:57,566 DEBUG [org.jboss.remoting.Client] starting callback Connector: InvokerLocator [bisocket://192.168.1.140:2111826720/callback?guid=5c4o13w-3h0dq-g05023zr-1-g0504qn1-c&callbackServerProtocol=bisocket&callbackServerHost=192.168.1.140&serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper&datatype=jms&callbackServerPort=2111826720&clientMaxPoolSize=1&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&onewayThreadPool=org.jboss.jms.server.remoting.DirectThreadPool&isCallbackServer=true]
              2009-09-28 11:12:57,566 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] SocketServerInvoker[UNINITIALIZED] setting pingFrequency to 214748364
              2009-09-28 11:12:57,566 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] SocketServerInvoker[UNINITIALIZED] setting pingWindowFactor to 10
              2009-09-28 11:12:57,592 DEBUG [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] did not find server socket factory configuration as mbean service or classname. Creating default server socket factory.
              2009-09-28 11:12:57,592 DEBUG [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] created server socket factory javax.net.DefaultServerSocketFactory@22e38fca
              2009-09-28 11:12:57,603 DEBUG [org.jboss.remoting.transport.Connector] org.jboss.remoting.transport.Connector@8ad88d6 started
              2009-09-28 11:12:57,610 DEBUG [org.jboss.remoting.Client] Client[1895304836:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6].connect(null)
              2009-09-28 11:12:57,610 DEBUG [org.jboss.remoting.Client] Client[1895304836:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] connected to InvokerLocator [bisocket://192.168.1.140:2111826720/callback?callbackServerHost=192.168.1.140&callbackServerPort=2111826720&callbackServerProtocol=bisocket&clientMaxPoolSize=1&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&datatype=jms&guid=5c4o13w-3h0dq-g05023zr-1-g0504qn1-c&isCallbackServer=true&onewayThreadPool=org.jboss.jms.server.remoting.DirectThreadPool&serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper]
              2009-09-28 11:12:57,610 TRACE [org.jboss.remoting.transport.local.LocalClientInvoker] Using local client invoker for invocation.
              2009-09-28 11:12:57,611 TRACE [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] received InternalInvocation[2d81360d]
              2009-09-28 11:12:57,611 TRACE [org.jboss.remoting.ServerInvoker] handling InternalInvocation where method name = addClientListener
              2009-09-28 11:12:57,627 DEBUG [org.jboss.remoting.ServerInvoker] ServerInvoker (SocketServerInvoker[UNINITIALIZED]) added client callback handler CallbackManager[1887ffd7] with session id of 5c4o13w-3h0dq-g05023zr-1-g0504qi9-6+5c4o13w-3h0dq-g05023zr-1-g0504qoa-d and callback handle object of null.
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.ServerInvoker] SocketServerInvoker[UNINITIALIZED] successfully dispatched invocation, returning null from subsystem 'JMS' to client 5c4o13w-3h0dq-g05023zr-1-g0504qi9-6
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.Client] Client[1895304836:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] entering disconnect()
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.InvokerRegistry] destroying client invoker InvokerLocator [bisocket://192.168.1.140:2111826720/callback?callbackServerHost=192.168.1.140&callbackServerPort=2111826720&callbackServerProtocol=bisocket&clientMaxPoolSize=1&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&datatype=jms&guid=5c4o13w-3h0dq-g05023zr-1-g0504qn1-c&isCallbackServer=true&onewayThreadPool=org.jboss.jms.server.remoting.DirectThreadPool&serverSocketClass=org.jboss.jms.server.remoting.ServerSocketWrapper], config {}
              2009-09-28 11:12:57,627 DEBUG [org.jboss.remoting.InvokerRegistry] removed org.jboss.remoting.transport.local.LocalClientInvoker@105a1a81 from registry
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.InvokerRegistry] disconnecting org.jboss.remoting.transport.local.LocalClientInvoker@105a1a81
              2009-09-28 11:12:57,627 DEBUG [org.jboss.remoting.Client] Client[1895304836:5c4o13w-3h0dq-g05023zr-1-g0504qi9-6] is disconnected
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](1) invoking InvocationRequest[b82138a, JMS, InternalInvocation[8d0ceed]]
              2009-09-28 11:12:57,627 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] getting secondary locator
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557](1) invoking InvocationRequest[44c12e20, InternalInvocation[66bb5a23]]
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] obtained semaphore: 199
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reusing pooled connection: ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522]
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing version 22 on output stream
              2009-09-28 11:12:57,627 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] writing invocation to marshaller
              2009-09-28 11:12:57,628 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] done writing invocation to marshaller
              2009-09-28 11:12:57,628 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading version from input stream
              2009-09-28 11:12:57,638 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] read version 22 from input stream
              2009-09-28 11:12:57,638 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] reading response from unmarshaller
              2009-09-28 11:12:57,645 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] returned ClientSocketWrapper[Socket[addr=/10.44.41.61,port=4557,localport=52114].752bb522] to pool
              2009-09-28 11:12:57,645 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] released semaphore: 200
              2009-09-28 11:12:57,645 TRACE [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received response InvocationResponse[2eca0e67, InvokerLocator [null://AMISQL02:45590/null]]
              2009-09-28 11:12:57,645 TRACE [org.jboss.remoting.MicroRemoteClientInvoker] SocketClientInvoker[536cf1d3, bisocket://AMISQL02:4557] received InvocationResponse so going to return response's return value of InvokerLocator [null://AMISQL02:45590/null]
              2009-09-28 11:12:57,647 DEBUG [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] secondary locator: InvokerLocator [null://AMISQL02:45590/null]
              2009-09-28 11:12:57,647 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] creating control connection: InvokerLocator [null://AMISQL02:45590/null]
              2009-09-28 11:12:57,728 INFO [org.apache.struts.util.PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
              2009-09-28 11:12:57,729 INFO [org.apache.struts.util.PropertyMessageResources] Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
              2009-09-28 11:12:58,699 DEBUG [org.jboss.remoting.transport.bisocket.BisocketServerInvoker] Error creating a control socket
              java.net.ConnectException: Connection refused: connect
               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:525)
               at java.net.Socket.connect(Socket.java:475)
               at java.net.Socket.<init>(Socket.java:372)
               at java.net.Socket.<init>(Socket.java:186)
               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:141)
               at org.jboss.remoting.Client.invoke(Client.java:1858)
               at org.jboss.remoting.Client.addCallbackListener(Client.java:1927)
               at org.jboss.remoting.Client.addListener(Client.java:1090)
               at org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:259)
               at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:388)
               at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:165)
               at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
               at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:80)
               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 dk.autocom.lib.jms.ConsumerService.initConnectionInt(ConsumerService.java:120)
               at dk.autocom.lib.jms.ConsumerService.initConnection(ConsumerService.java:70)
               at dk.autocom.lib.jms.ConsumerService.<init>(ConsumerService.java:58)
               at dk.autocom.trading.core.services.AxPollConsumerService.<init>(AxPollConsumerService.java:17)
               at dk.autocom.trading.core.services.AxPollConsumerService.init(AxPollConsumerService.java:25)
               at dk.autocom.trading.core.services.AdminTradingService$1.run(AdminTradingService.java:255)
               at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
               at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
               at java.util.concurrent.FutureTask.run(FutureTask.java:138)
               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
               at java.lang.Thread.run(Thread.java:619)
              


              • 4. Re: Local Port in JBoss Messaging
                mrkmrk

                Solved it. I just set the secondaryBindPort and not the secondaryConnectPort, then it seems to work.