users@glassfish.java.net

Re: Could not received JMS messages sent from remote GF 3.x servers

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 May 2010 00:13:01 PDT

Hi Nigel,

Please refer to the following correct Customer Application Client output (apologies for the confusion) which does the sending of messages on PC2:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
09/05/2010 12:32:53 AM com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
09/05/2010 12:33:16 AM org.hibernate.validator.util.Version <clinit>
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
09/05/2010 12:33:16 AM org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
09/05/2010 12:33:16 AM com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: REMOTE
09/05/2010 12:33:17 AM com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: SJSMQ JMSRA Started:REMOTE
09/05/2010 12:33:22 AM com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
WARNING: [C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
09/05/2010 12:34:10 AM com.sun.messaging.jms.ra.ManagedConnection <init>
SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
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.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:58)
at com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:91)
at com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:194)
at com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:223)
at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:141)
at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:841)
at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1110)
at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:277)
at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1404)
at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:869)
at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:229)
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:455)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:369)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:226)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:150)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:321)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:290)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:227)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:159)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:154)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:179)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:166)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:148)
at client.remoteCustomerproducer.sendJMSMessageToMyQueue(remoteCustomerproducer.java:87)
at client.remoteCustomerproducer.addCustomers(remoteCustomerproducer.java:621)
at client.remoteCustomerproducer.main(remoteCustomerproducer.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:424)
at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:151)
at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:64)
Caused by: 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:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.makeSocketWithTimeout(PortMapperClient.java:268)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:220)
... 48 more
09/05/2010 12:34:10 AM com.sun.enterprise.resource.allocator.ConnectorAllocator createResource
WARNING: poolmgr.create_resource_error
09/05/2010 12:34:10 AM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
WARNING: poolmgr.get_connection_failure
09/05/2010 12:34:10 AM client.remoteCustomerproducer addCustomers
SEVERE: null
com.sun.messaging.jms.JMSException: MQRA:CFA:allocation failure:createConnection:Error in allocating a connection. Cause: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:183)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:166)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createConnection(ConnectionFactoryAdapter.java:148)
at client.remoteCustomerproducer.sendJMSMessageToMyQueue(remoteCustomerproducer.java:87)
at client.remoteCustomerproducer.addCustomers(remoteCustomerproducer.java:621)
at client.remoteCustomerproducer.main(remoteCustomerproducer.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:424)
at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:151)
at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:64)
Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:296)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:227)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:159)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:154)
at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateConnection(ConnectionFactoryAdapter.java:179)
... 12 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:131)
at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:277)
at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1404)
at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:869)
at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:229)
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:455)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:369)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:226)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:150)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:321)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:290)
... 16 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4003]: Error occurred on connection creation [pc1:7676]. - cause: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:849)
at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1110)
at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121)
... 26 more
BUILD STOPPED (total time: 2 minutes 47 seconds)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nigel>I don't quite follow your message.
Nigel>Please give more information about the Glassfish instance on which the MQ broker was running
Nigel>Which machine was this?

          The target JMS MQ resides on PC1.

Nigel>Was this a LOCAL or EMBEDDED broker?

           It must be LOCAL since I don't know how to implement an EMBEDDED broker.

Nigel>Which version(s) of GF was this?

           3.0.1-b14.

Nigel<Are you sure the broker had started? (There would be a message SJSMQ JMS Resource Adapter starting: EMBEDDED or SJSMQ JMS Resource Adapter starting: LOCAL).

                [u]GF 2.x[/u]
                ADM1506: Status of Standard JMX Connector: Active = [true]
                JMS Service Connection URL is :mq://PC1:7676/
                MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
                MQJMSRA_EB1101: EMBEDDED broker started with code =0
                MQJMSRA_RA1101: SJSMQ JMSRA Started:DIRECT

                [u]GF3.x (3.0.1-b14)[/u]
                glassfish3.0|null|_ThreadID=14;_ThreadName=Thread-1;|Grizzly Framework 1.9.18-k started in: 703ms listening on port 7676|#]
                glassfish3.0|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=20;_ThreadName=Thread-1;|MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: DIRECT|#]
                glassfish3.0|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=20;_ThreadName=Thread-1;|MQJMSRA_RA1101: SJSMQ JMSRA Started:DIRECT|#]

However, I am not sure whether it is working though.

Nigel>Can you connect to it using a simple client, say, "imqcmd list dst" running on either machine?

         Please provide instruction on how to find "imqcmd list dst"?

Nigel>Now tell me more about the machine that showed "Connection refused:":

         PC2 (showed "Connection refused") is a Windows XP, SP3, JDK 1.6.0_16, NB 6.7, GF 2.1. Nevertheless, I have got the same message from another identical system running NB6.9beta, GF3.0.1 (3.0.1-b14). Can send and received SJSMQ JMS messages via message queue. This solution is working on GF 2.x servers.

Please refer to the new GF3.x server log attached.

Thanks,

Jack
[Message sent by forum member 'htran_888']

http://forums.java.net/jive/thread.jspa?messageID=469325