glassfish
  1. glassfish
  2. GLASSFISH-18966

Connection refused when remote client tries to connect to JMS queue on cluster

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: jms
    • Labels:
      None
    • Environment:

      Ubuntu 12.04

      Description

      I've created a cluster of two nodes and have a JMS queue. I'm having issues trying to connect to this JMS queue using a remote standalone client.
      The cluster JMS listener is on port 27676 and the queue is deployed to the cluster.

      mq://Glassfish2:27676/,mq://Glassfish3:27676

      When I connect to the server using IIOP port of 23700 which is the one the cluster (DAS) is using I get a connection refused exception as it is trying to connect to localhost:27676.

      WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect

      I've also updated the jms-host and node-host values in node config file (domain.xml) to remove references to localhost.

      I had this issue before with a stand alone instance and it was resolved by adding entries to the /etc/hosts file.
      However, this does not seem to resolve the issue. I also have all server instance IPs in the hosts file.

        Activity

        Hide
        David Zhao added a comment -

        schaffer1969,

        I suspect this is for the same reason as GLASSFISH-18983. Can you please upload domain.xml and server log, imq log of each instance for review?

        Thanks,
        David Zhao

        Show
        David Zhao added a comment - schaffer1969, I suspect this is for the same reason as GLASSFISH-18983 . Can you please upload domain.xml and server log, imq log of each instance for review? Thanks, David Zhao
        Hide
        schaffer1969 added a comment -

        I thought that GLASSFISH-18983 might have solved it as well.
        However, I'm still getting the same error message on connection.

        I've attached the requested logs.

        Thanks

        Show
        schaffer1969 added a comment - I thought that GLASSFISH-18983 might have solved it as well. However, I'm still getting the same error message on connection. I've attached the requested logs. Thanks
        Hide
        schaffer1969 added a comment -

        logs

        Show
        schaffer1969 added a comment - logs
        Hide
        David Zhao added a comment -

        schaffer1969,

        Your uploaded domain.xml and log files look fine. Can you confirm the following things?

        1. In your case, there are 3 domain.xml, one for DAS, one for config node and one for ssh node. Can you confirm all of them do not use localhost as node-host?

        2. On which box your jms client is running? Glassfish2, Glassfish3, or other one?

        3. What is the error message and exception stack trace reported by your jms client?

        Plus, your configuration may have issues which we do not know till. So can you try recreate domain1 and create nodes with real machine names (Glassfish2 and Glassfish3) from scratch to see if it works (without updating jms-host and node-host manually)?

        -
        David Zhao

        Show
        David Zhao added a comment - schaffer1969, Your uploaded domain.xml and log files look fine. Can you confirm the following things? 1. In your case, there are 3 domain.xml, one for DAS, one for config node and one for ssh node. Can you confirm all of them do not use localhost as node-host? 2. On which box your jms client is running? Glassfish2, Glassfish3, or other one? 3. What is the error message and exception stack trace reported by your jms client? Plus, your configuration may have issues which we do not know till. So can you try recreate domain1 and create nodes with real machine names (Glassfish2 and Glassfish3) from scratch to see if it works (without updating jms-host and node-host manually)? - David Zhao
        Hide
        schaffer1969 added a comment -

        1. All domain.xml contain the following 3 nodes. However I'm not allowed to remove "localhost-domain1".
        <nodes>
        <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="$

        {com.sun.aas.productRoot}

        "></node>
        <node node-host="Glassfish3" name="Glassfish3" type="SSH" install-dir="/usr/glassfish3">
        <ssh-connector>
        <ssh-auth password="password"></ssh-auth>
        </ssh-connector>
        </node>
        <node node-host="Glassfish2" name="Glassfish2" type="CONFIG" install-dir="/usr/glassfish3"></node>
        </nodes>

        2. The JMS client is running on a separate windows development box, IP address 192.168.0.25 .

        3. Error message is:
        09-Aug-2012 12:20:01 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient
        INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
        09-Aug-2012 12:20:04 com.sun.enterprise.connectors.ActiveRAFactory getActiveRA
        INFO: Deployed RAR [ jmsra ] has inbound artifacts, but the runtime does not support it. Providing only outbound support
        09-Aug-2012 12:20:04 org.hibernate.validator.util.Version <clinit>
        INFO: Hibernate Validator 4.1.0.Final
        09-Aug-2012 12:20:04 org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
        INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
        09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start
        INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version: 4.5 (Build 29-b) Compile: Wed Feb 9 22:53:30 PST 2011
        09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start
        INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is TCP
        [09/Aug/2012:12:20:04 IST] WARNING [B2001]: Unable to load default property file C:\usr\glassfish3\mq\lib\props\broker\default.properties:
        java.io.FileNotFoundException: C:\usr\glassfish3\mq\lib\props\broker\default.properties (The system cannot find the path specified)
        [09/Aug/2012:12:20:04 IST] ERROR [B3001]: Defaulting to use the fallback properties. The Broker will only run in a minimal configuration using these settings. Fallback properties are being used because the defaults.property files could not be loaded. Please check the value of IMQ_HOME
        [09/Aug/2012:12:20:04 IST]
        ================================================================================
        Open Message Queue 4.5
        Oracle
        Version: 4.5 (Build 29-b)
        Compile: Wed Feb 9 22:53:30 PST 2011

        Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
        ================================================================================
        Java Runtime: 1.6.0_31 Sun Microsystems Inc. C:\glassfish3\jdk\jre
        [09/Aug/2012:12:20:04 IST] ERROR Failed to create default files:
        java.io.FileNotFoundException: C:\usr\glassfish3\glassfish\nodes\Glassfish2\i1\imq\instances\BeaconClusteri1\etc\accesscontrol.properties (The system cannot find the path specified)
        09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start
        INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:EMBEDDED
        09-Aug-2012 12:20:05 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:11 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:17 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:23 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:29 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:35 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:41 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:47 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:53 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:20:59 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:06 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:12 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:18 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:24 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:30 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:36 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:42 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:48 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:21:54 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:00 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:06 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:12 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:18 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:24 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:30 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:36 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
        09-Aug-2012 12:22:42 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
        WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect

        4. Sample connection code

        jndiContext = new InitialContext();
        connectionFactory = (ConnectionFactory) jndiContext.lookup("jms/BusinessLogicServerConnectionFactory");
        queue = (Queue) jndiContext.lookup("jms/TagUpdatesIn");
        connection = connectionFactory.createConnection();
        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        messageProducer = session.createProducer(queue);

        5. jndi.properties file

        java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
        java.naming.provider.url=iiop://192.168.0.20:23700
        org.omg.CORBA.ORBInitialHost=192.168.0.20
        org.omg.CORBA.ORBInitialPort=23700
        java.naming.factory.url.pkgs=com.sun.enterprise.naming
        java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl

        (The Glassfish2 server is 192.168.0.20)

        6. I recreated the domain from scratch and created the nodes again. The same error is occuring.
        I noticed that where as I can create a new node on Glassfish 2 using

        ./asadmin create-node-config --nodehost Glassfish2 --installdir /usr/glassfish3 Glassfish2
        ./asadmin create-local-instance --node Glassfish2 --cluster Beacon-Cluster i1

        I cannot do similar from the remote instance on the cli
        ./asadmin --host glassfish2 --port 4848 create-local-instance --cluster Beacon-Cluster i2
        will create the node as localhost. However,
        ./asadmin --host glassfish2 --port 4848 create-local-instance --node Glassfish3 --cluster Beacon-Cluster i2
        fails with the following error: "remote failure: Attribute mismatch for node 'Glassfish3' : the value for the 'nodehost' attribute from the command (localhost) does not match in the DAS configuration (Glassfish3)".

        I can create this correctly through the web console selecting Glassfish3 as the node.

        Show
        schaffer1969 added a comment - 1. All domain.xml contain the following 3 nodes. However I'm not allowed to remove "localhost-domain1". <nodes> <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="$ {com.sun.aas.productRoot} "></node> <node node-host="Glassfish3" name="Glassfish3" type="SSH" install-dir="/usr/glassfish3"> <ssh-connector> <ssh-auth password="password"></ssh-auth> </ssh-connector> </node> <node node-host="Glassfish2" name="Glassfish2" type="CONFIG" install-dir="/usr/glassfish3"></node> </nodes> 2. The JMS client is running on a separate windows development box, IP address 192.168.0.25 . 3. Error message is: 09-Aug-2012 12:20:01 com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl findDerbyClient INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default. 09-Aug-2012 12:20:04 com.sun.enterprise.connectors.ActiveRAFactory getActiveRA INFO: Deployed RAR [ jmsra ] has inbound artifacts, but the runtime does not support it. Providing only outbound support 09-Aug-2012 12:20:04 org.hibernate.validator.util.Version <clinit> INFO: Hibernate Validator 4.1.0.Final 09-Aug-2012 12:20:04 org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. 09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version: 4.5 (Build 29-b) Compile: Wed Feb 9 22:53:30 PST 2011 09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is TCP [09/Aug/2012:12:20:04 IST] WARNING [B2001] : Unable to load default property file C:\usr\glassfish3\mq\lib\props\broker\default.properties: java.io.FileNotFoundException: C:\usr\glassfish3\mq\lib\props\broker\default.properties (The system cannot find the path specified) [09/Aug/2012:12:20:04 IST] ERROR [B3001] : Defaulting to use the fallback properties. The Broker will only run in a minimal configuration using these settings. Fallback properties are being used because the defaults.property files could not be loaded. Please check the value of IMQ_HOME [09/Aug/2012:12:20:04 IST] ================================================================================ Open Message Queue 4.5 Oracle Version: 4.5 (Build 29-b) Compile: Wed Feb 9 22:53:30 PST 2011 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. ================================================================================ Java Runtime: 1.6.0_31 Sun Microsystems Inc. C:\glassfish3\jdk\jre [09/Aug/2012:12:20:04 IST] ERROR Failed to create default files: java.io.FileNotFoundException: C:\usr\glassfish3\glassfish\nodes\Glassfish2\i1\imq\instances\BeaconClusteri1\etc\accesscontrol.properties (The system cannot find the path specified) 09-Aug-2012 12:20:04 com.sun.messaging.jms.ra.ResourceAdapter start INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:EMBEDDED 09-Aug-2012 12:20:05 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:11 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:17 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:23 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:29 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:35 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:41 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:47 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:53 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:20:59 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:06 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:12 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:18 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:24 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:30 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:36 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:42 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:48 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:21:54 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:00 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:06 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:12 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:18 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:24 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:30 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:36 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 09-Aug-2012 12:22:42 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException WARNING: [C4003] : Error occurred on connection creation [localhost:27676] . - cause: java.net.ConnectException: Connection refused: connect 4. Sample connection code jndiContext = new InitialContext(); connectionFactory = (ConnectionFactory) jndiContext.lookup("jms/BusinessLogicServerConnectionFactory"); queue = (Queue) jndiContext.lookup("jms/TagUpdatesIn"); connection = connectionFactory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); messageProducer = session.createProducer(queue); 5. jndi.properties file java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory java.naming.provider.url=iiop://192.168.0.20:23700 org.omg.CORBA.ORBInitialHost=192.168.0.20 org.omg.CORBA.ORBInitialPort=23700 java.naming.factory.url.pkgs=com.sun.enterprise.naming java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl (The Glassfish2 server is 192.168.0.20) 6. I recreated the domain from scratch and created the nodes again. The same error is occuring. I noticed that where as I can create a new node on Glassfish 2 using ./asadmin create-node-config --nodehost Glassfish2 --installdir /usr/glassfish3 Glassfish2 ./asadmin create-local-instance --node Glassfish2 --cluster Beacon-Cluster i1 I cannot do similar from the remote instance on the cli ./asadmin --host glassfish2 --port 4848 create-local-instance --cluster Beacon-Cluster i2 will create the node as localhost. However, ./asadmin --host glassfish2 --port 4848 create-local-instance --node Glassfish3 --cluster Beacon-Cluster i2 fails with the following error: "remote failure: Attribute mismatch for node 'Glassfish3' : the value for the 'nodehost' attribute from the command (localhost) does not match in the DAS configuration (Glassfish3)". I can create this correctly through the web console selecting Glassfish3 as the node.
        Hide
        David Zhao added a comment -

        schaffer1969,

        Your client program logs following info, which is not quite right.

        INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is TCP

        Instead, it should reports REMOTE if connecting to the broker on a separate server, sth. like that:

        INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:REMOTE

        Please confirm if your jndi.properties work well? Try hardcode the jndi properties into the client program:

        Properties jndiProps = new Properties();
        jndiProps.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory");
        jndiProps.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
        jndiProps.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
        jndiProps.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.0.20");
        jndiProps.setProperty("org.omg.CORBA.ORBInitialPort", "23700");
        Context jndiContext = new InitialContext(jndiProps);

        And it is also strange why it reports "java.io.FileNotFoundException: C:\usr\glassfish3\mq\lib\props\broker\default.properties (The system cannot find the path specified)" and "java.io.FileNotFoundException: C:\usr\glassfish3\glassfish\nodes\Glassfish2\i1\imq\instances\BeaconClusteri1\etc\accesscontrol.properties". Did you get a fresh glassfish installation on that win box?

        -
        David Zhao

        Show
        David Zhao added a comment - schaffer1969, Your client program logs following info, which is not quite right. INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is TCP Instead, it should reports REMOTE if connecting to the broker on a separate server, sth. like that: INFO: MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:REMOTE Please confirm if your jndi.properties work well? Try hardcode the jndi properties into the client program: Properties jndiProps = new Properties(); jndiProps.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory"); jndiProps.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); jndiProps.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); jndiProps.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.0.20"); jndiProps.setProperty("org.omg.CORBA.ORBInitialPort", "23700"); Context jndiContext = new InitialContext(jndiProps); And it is also strange why it reports "java.io.FileNotFoundException: C:\usr\glassfish3\mq\lib\props\broker\default.properties (The system cannot find the path specified)" and "java.io.FileNotFoundException: C:\usr\glassfish3\glassfish\nodes\Glassfish2\i1\imq\instances\BeaconClusteri1\etc\accesscontrol.properties". Did you get a fresh glassfish installation on that win box? - David Zhao
        Hide
        schaffer1969 added a comment -

        The version on Win box was a 3.1 version that had been updated using the update tool.
        However once I cleaned it and reinstalled the latest version 3.1.2.2 on the box and updated all the client jars it connected.

        I did not realise the that client jars changed so greatly between minor versions.

        It is also load balancing fine as well.

        I still have the issue regarding the creating of the remote instance and it incorrectly using localhost for the node-host.
        The work around is to either edit the domain.xml file or use the console.
        Ho can this be done form the commandline?

        Thanks again

        Show
        schaffer1969 added a comment - The version on Win box was a 3.1 version that had been updated using the update tool. However once I cleaned it and reinstalled the latest version 3.1.2.2 on the box and updated all the client jars it connected. I did not realise the that client jars changed so greatly between minor versions. It is also load balancing fine as well. I still have the issue regarding the creating of the remote instance and it incorrectly using localhost for the node-host. The work around is to either edit the domain.xml file or use the console. Ho can this be done form the commandline? Thanks again
        Hide
        David Zhao added a comment -

        To create an instance on a remote SSH node, please use create-instance instead of create-local-instance.

        Show
        David Zhao added a comment - To create an instance on a remote SSH node, please use create-instance instead of create-local-instance.
        Hide
        David Zhao added a comment - - edited

        Close it for it is the configuration issue.

        Show
        David Zhao added a comment - - edited Close it for it is the configuration issue.

          People

          • Assignee:
            David Zhao
            Reporter:
            schaffer1969
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: