6 Replies Latest reply: Feb 20, 2013 6:08 AM by 986609 RSS

    Sun Messaging Queue (Sun MQ) Connectivity Error - recv failed

    986609
      Dear Readers

      I am using following code to connect to SUN MQ Server.

      I only have IP Address, Port number and username password of server. JMS Server has three brokers having their own ports.

      com.sun.messaging.ConnectionFactory myConnFactory = new com.sun.messaging.ConnectionFactory();
      myConnFactory.setProperty(com.sun.messaging.ConnectionConfiguration.imqBrokerHostName,"19.11.12.3");
      myConnFactory.setProperty(com.sun.messaging.ConnectionConfiguration.imqBrokerHostPort,"141");
      myConnFactory.setProperty(com.sun.messaging.ConnectionConfiguration.imqDefaultUsername,"ad1min");
      myConnFactory.setProperty(com.sun.messaging.ConnectionConfiguration.imqDefaultPassword,"ad1min");
      Connection myConn = myConnFactory.createConnection();

      but when i try to run this code the exception comes given below


      After then i just commented Hostname and Port section and added following to it:
      myConnFactory.setProperty(com.sun.messaging.ConnectionConfiguration.imqAddressList,  "mq://19.11.12.3:141");

      but i got same exception with slight difference:

      Exception:
      +15 Feb, 2013 12:32:08 PM com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException+
      +Exception occurred : com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [19.11.12.3:141]. - cause: java.net.SocketException: Software caused connection abort: recv failed+
      +WARNING: [C4003]: Error occurred on connection creation [19.11.12.3:141]. - cause: java.net.SocketException: Software caused connection abort: recv failed+
      +com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [19.11.12.3:141]. - cause: java.net.SocketException: Software caused connection abort: recv failed+
      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:164)
      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:816)
      at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1529)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2327)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1024)
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:418)
      at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:60)
      at com.sun.messaging.BasicConnectionFactory.createConnection(BasicConnectionFactory.java:147)
      at com.sun.messaging.BasicConnectionFactory.createConnection(BasicConnectionFactory.java:132)
      at demo.JAMS.main(JAMS.java:31)
      Caused by: java.net.SocketException: Software caused connection abort: recv failed
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
      at com.sun.messaging.jmq.io.PortMapperTable.readLine(PortMapperTable.java:310)
      at com.sun.messaging.jmq.io.PortMapperTable.read(PortMapperTable.java:266)
      at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:235)
      +... 17 more+

      I also used imqadmin command and tried same credentials from console but i got same error

      Anyone please guide me what issue is actually?
      Is this server side issue? Is this access rights issue.
      Tried to google it but unable to find correct solutions