5 Replies Latest reply on Jul 23, 2010 2:45 AM by 807581

    Strange OpenMQ behaviour to perl STOMP client

    807581
      Hi All,

      The scenario is like this. I have a receiving client in perl using Net::STOMP::Client library to receive messages from OpenMQ. During the process of retrieval, I paused the broker followed by shutting down the broker. After which I restarted the broker and resumed the broker. Upon shutting down the broker, the client exits from running. However when i tried to connect again, I had the following error as below. However if I shutdown the broker w/o pausing and then restart, the client is able to connect fine. Does anyone encounter this before? Or rather what is the correct way of handling reconnection in STOMP client? Thanks.

      SEVERE: [BSS3002]: CONNECT failed: [C4003]: Error occurred on connection creation [server:0]. - cause: java.net.ConnectException: Connection refused on STOMP connection
      com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [server:0]. - cause: java.net.ConnectException: Connection refused
      at com.sun.messaging.jmq.jmsclient.ExceptionHandler.throwConnectionException(ExceptionHandler.java:274)
      at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:220)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:241)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:150)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:92)
      at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:165)
      at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:135)
      at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:778)
      at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionNew(ConnectionInitiator.java:254)
      at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:208)
      at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:158)
      at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:836)
      at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1528)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2366)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1047)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:433)
      at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
      at com.sun.messaging.BasicConnectionFactory.createConnection(BasicConnectionFactory.java:147)
      at com.sun.messaging.bridge.service.stomp.StompConnection.connect(StompConnection.java:96)
      at com.sun.messaging.bridge.service.stomp.StompProtocolHandler.onCONNECT(StompProtocolHandler.java:141)
      at com.sun.messaging.bridge.service.stomp.StompProtocolFilter.execute(StompProtocolFilter.java:101)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
      at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
      at java.lang.Thread.run(Thread.java:619)
      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:519)
      at java.net.Socket.connect(Socket.java:469)
      at java.net.Socket.<init>(Socket.java:366)
      at java.net.Socket.<init>(Socket.java:180)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.makeSocketWithTimeout(PortMapperClient.java:268)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:220)
      ... 27 more