glassfish
  1. glassfish
  2. GLASSFISH-17278

invalid setting imq.cluster.masterbroker=mq: //localhost:27676/ for a broker running on different machine is passed to brokers in cluster

    Details

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

      Description

      This issue is reported from the following glassfish forum thread (attached query.txt from the posting)
      http://forums.java.net/node/840957

      GlassFish JMS module+JMSRA passes the following invalid cluster configuration settings to broker for a remote broker, in this case the master broker, running on a different machine from this broker
      imq.cluster.masterbroker=mq://localhost:27676/
      imq.cluster.brokerlist=mq://ubu2:27676/,mq://localhost:27676/

      When a remote broker in a cluster runs on different machine, 'localhost' in imq.cluster.brokerlist or imq.cluster.masterbroker for that broker would not make sense. For example 2 brokers, 1 on machine1 and another on machine2, it doesn't make sense to set

      imq.cluster.brokerlist=localhost:broker1-port,localhost:broker2-port

      because it would mean broker1 should look for broker2 on its own machine1 -ie. 'localhost', and broker2 should look for broker1 on its own machine2.

        Issue Links

          Activity

          amyk created issue -
          Satish Kumar made changes -
          Field Original Value New Value
          Tags 3_1_2-review
          Hide
          Satish Kumar added a comment -

          The value - localhost is picked-up from the default domain.xml config for jms-host.host. The reason we default the value to localhost is so that we can support zip based installation. Hence, this is really not a bug but a limitation as a consequence of the the zip based installer.

          To get JMS to work correctly in a virtual env such as the one described in the bug and the related forum posts, the value of jms-host.host for the cluster config will need to be manually modified to reflect the correct host name on which it is intended to run. This can be done by using the asadmin set command.

          This is not a bug, hence closing the issue.

          Show
          Satish Kumar added a comment - The value - localhost is picked-up from the default domain.xml config for jms-host.host. The reason we default the value to localhost is so that we can support zip based installation. Hence, this is really not a bug but a limitation as a consequence of the the zip based installer. To get JMS to work correctly in a virtual env such as the one described in the bug and the related forum posts, the value of jms-host.host for the cluster config will need to be manually modified to reflect the correct host name on which it is intended to run. This can be done by using the asadmin set command. This is not a bug, hence closing the issue.
          Satish Kumar made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          Hide
          poisond added a comment -

          Hello,
          I'm having the exact same problem, but cannot figure out which configuration value to set.

          If this is supposed to be it, setting it doesn't work (still sends localhost):

          $GF_HOME/glassfish/nodes/localhost-domain1/instance-web1/config/domain.xml:
          <jms-host host="web1" name="default_JMS_host"></jms-host>

          Show
          poisond added a comment - Hello, I'm having the exact same problem, but cannot figure out which configuration value to set. If this is supposed to be it, setting it doesn't work (still sends localhost): $GF_HOME/glassfish/nodes/localhost-domain1/instance-web1/config/domain.xml: <jms-host host="web1" name="default_JMS_host"></jms-host>
          Hide
          Nigel Deakin added a comment -

          Please don't try to start a discussion on a closed issue. Please use the Glassfish forum https://www.java.net/forums/glassfish/glassfish

          Show
          Nigel Deakin added a comment - Please don't try to start a discussion on a closed issue. Please use the Glassfish forum https://www.java.net/forums/glassfish/glassfish
          Hide
          amyk added a comment - - edited

          This issue needs to be re-evaluated, hence re-opened from 'Won't Fix' status, minimum it should be documented with workaround if 'Won't Fix'

          Show
          amyk added a comment - - edited This issue needs to be re-evaluated, hence re-opened from 'Won't Fix' status, minimum it should be documented with workaround if 'Won't Fix'
          amyk made changes -
          Resolution Won't Fix [ 2 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Satish Kumar [ sats ] David Zhao [ liang.x.zhao ]
          amyk made changes -
          Affects Version/s 4.0.1 [ 16061 ]
          Affects Version/s 3.1.1 [ 14740 ]
          amyk made changes -
          Summary invalid setting imq.cluster.masterbroker=mq: //localhost:27676/ is passed to brokers in cluster invalid setting imq.cluster.masterbroker=mq: //localhost:27676/ for a broker running on different machine is passed to brokers in cluster
          Description This issue is reported from the following glassfish forum thread (attached query.txt from the posting)
          http://forums.java.net/node/840957

          GlassFish JMS module+JMSRA passes the following invalid cluster configuration settings to broker
          imq.cluster.masterbroker=mq://localhost:27676/
          imq.cluster.brokerlist=mq://ubu2:27676/,mq://localhost:27676/

          This issue is reported from the following glassfish forum thread (attached query.txt from the posting)
          http://forums.java.net/node/840957

          GlassFish JMS module+JMSRA passes the following invalid cluster configuration settings to broker for a remote broker, in this case the master broker, running on a different machine from this broker
          imq.cluster.masterbroker=mq://localhost:27676/
          imq.cluster.brokerlist=mq://ubu2:27676/,mq://localhost:27676/

          When a remote broker in a cluster runs on different machine, 'localhost' in imq.cluster.brokerlist or imq.cluster.masterbroker for that broker would not make sense. For example 2 brokers, 1 on machine1 and another on machine2, it doesn't make sense to set

          imq.cluster.brokerlist=localhost:broker1-port,localhost:broker2-port

          because it would mean broker1 should look for broker2 on its own machine1 -ie. 'localhost', and broker2 should look for broker1 on its own machine2.
          Hide
          David Zhao added a comment -

          When configuring glassfish jms cluster with master broker in EMBEDDED or LOCAL mode, glassfish jms module will generate properties of 'imq.cluster.brokerlist' and 'imq.cluster.masterbroker' and passes those to MQ for bootstrap. For example,

          imq.cluster.brokerlist=mq://host2:3076/,mq://host1:2076/
          imq.cluster.masterbroker=mq://host1:2076/

          The hostnames used in the properties are got from glassfish cluster nodes on which the glassfish instances reside. So at any time, please use unique hostnames which can be resolved at any physical servers on the network. Don't use localhost except that all the cluster instances are located in the same physical server.

          D:\glassfish4\glassfish\bin>asadmin create-node-config --help
          create-node-config(1) asadmin Utility Subcommands create-node-config(1)

          NAME
          create-node-config - creates a node that is not enabled for remote
          communication

          SYNOPSIS
          create-node-config [--help]
          [--nodehost node-host]
          [--installdir as-install-parent] [--nodedir node-dir] node-name

          DESCRIPTION
          The create-node-config subcommand creates a node that is not enabled
          for remote communication. The create-node-config subcommand does not
          require the Distributed Component Object Model (DCOM) remote protocol
          or secure shell (SSH) to be configured to create the node.

          A node represents a host on which the GlassFish Server software is
          installed. A node must exist for every host on which GlassFish Server
          instances reside.

          Note
          ---------------------------------------

          To represent the host where
          the DAS is running,
          GlassFish Server provides
          the predefined node
          localhost-domain. The
          predefined node
          localhost-domain is not
          enabled for remote
          communication.

          ---------------------------------------

          All administration of instances on a node that is not enabled for
          remote communication must be performed on the host that the node
          represents. The domain administration server (DAS) on a remote host
          cannot contact the node. To administer instances on a node that
          represents a host that is remote from the DAS, you must use the
          following subcommands:

          • create-local-instance(1)
          • delete-local-instance(1)
          • start-local-instance(1)

          However, you may use stop-local-instance(1) or stop-instance(1) to stop
          the instances.

          This subcommand is supported in remote mode only.

          OPTIONS

          --nodehost
          The name of the host that the node represents. If this option is
          omitted, no host is specified for the node.

          Show
          David Zhao added a comment - When configuring glassfish jms cluster with master broker in EMBEDDED or LOCAL mode, glassfish jms module will generate properties of 'imq.cluster.brokerlist' and 'imq.cluster.masterbroker' and passes those to MQ for bootstrap. For example, imq.cluster.brokerlist=mq://host2:3076/,mq://host1:2076/ imq.cluster.masterbroker=mq://host1:2076/ The hostnames used in the properties are got from glassfish cluster nodes on which the glassfish instances reside. So at any time, please use unique hostnames which can be resolved at any physical servers on the network. Don't use localhost except that all the cluster instances are located in the same physical server. D:\glassfish4\glassfish\bin>asadmin create-node-config --help create-node-config(1) asadmin Utility Subcommands create-node-config(1) NAME create-node-config - creates a node that is not enabled for remote communication SYNOPSIS create-node-config [--help] [--nodehost node-host] [--installdir as-install-parent] [--nodedir node-dir] node-name DESCRIPTION The create-node-config subcommand creates a node that is not enabled for remote communication. The create-node-config subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured to create the node. A node represents a host on which the GlassFish Server software is installed. A node must exist for every host on which GlassFish Server instances reside. Note --------------------------------------- To represent the host where the DAS is running, GlassFish Server provides the predefined node localhost-domain. The predefined node localhost-domain is not enabled for remote communication. --------------------------------------- All administration of instances on a node that is not enabled for remote communication must be performed on the host that the node represents. The domain administration server (DAS) on a remote host cannot contact the node. To administer instances on a node that represents a host that is remote from the DAS, you must use the following subcommands: create-local-instance(1) delete-local-instance(1) start-local-instance(1) However, you may use stop-local-instance(1) or stop-instance(1) to stop the instances. This subcommand is supported in remote mode only. OPTIONS --nodehost The name of the host that the node represents. If this option is omitted, no host is specified for the node.
          Hide
          David Zhao added a comment -

          It would be fine if glassfish node doesn't use localhost. Created doc issue for it.

          Show
          David Zhao added a comment - It would be fine if glassfish node doesn't use localhost. Created doc issue for it.
          David Zhao made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Works as designed [ 7 ]
          David Zhao made changes -
          Fix Version/s 4.0.1 [ 16061 ]
          Fix Version/s 3.1.2 [ 15100 ]
          Hide
          amyk added a comment -

          From David Zhao:
          I created doc issue https://java.net/jira/browse/GLASSFISH-20602 for that.

          Show
          amyk added a comment - From David Zhao: I created doc issue https://java.net/jira/browse/GLASSFISH-20602 for that.
          amyk made changes -
          Link This issue is duplicated by MQ-118 [ MQ-118 ]
          Romain Grécourt made changes -
          Affects Version/s 4.1 [ 16387 ]
          Affects Version/s 4.0.1 [ 16061 ]
          Fix Version/s 4.1 [ 16387 ]
          Fix Version/s 4.0.1 [ 16061 ]

            People

            • Assignee:
              David Zhao
              Reporter:
              amyk
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: