glassfish
  1. glassfish
  2. GLASSFISH-20945

Glassfish 3.1.1 enhanced broker cluster

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: None
    • Component/s: jms
    • Labels:
      None

      Description

      Hi,

      This is regarding glassfish IMQ JMS enhanced broker cluster.

      The official documentation says that a enhanced broker cluster can be made by running the below command.

      asadmin --passwordfile password-file configure-jms-cluster --clustertype=enhanced --configstoretype=shareddb --messagestoretype=jdbc --dbvendor database-vendor-name --dbuser database-user-name --dburl database-url
      --property list-of-database-specific-properties glassfish-cluster-name

      But it throws this error while running. "remote failure: configstoretype option is not configurable for Enhanced clusters."

      Creating an enhanced broker cluster without starting glassfish at all is working fine. But then am doing that with imq commands. But i want my glassfish cluster to use this imq brokers.

      The official documentation also says to start the imqbroker for the first time so that it creates the file glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties. I have modified that config.properties file with the below stuff for db and broker id details.

      imq.persist.jdbc.mysql.user=root
      imq.cluster.ha=true
      imq.persist.jdbc.dbVendor=mysql
      imq.brokerid=broker1
      imq.persist.jdbc.mysql.password=password
      imq.persist.jdbc.vendorName.tableoption=CHARSET\=latin1
      imq.persist.jdbc.mysql.property.url=jdbc\:mysql\://dbhost\:3306/mydb
      imq.cluster.clusterid=mycluster
      imq.persist.store=jdbc

      But after starting glassfish and trying to do a imqcmd list bkr, am getting the following.

      Error while connecting to the broker on host 'localhost' and port '7676'.
      com.sun.messaging.jms.JMSException: [C4098]: Unknown broker service: admin
      Please verify that there is a broker running on the specified host and port or
      use the '-b' option to specify the correct broker host and port.

      Please help me out in getting a glassfish IMQ enhanced broker cluster (where brokers are on different hosts) running. Please let me know if am doing something wrong here.

      Regards
      Sarath

        Activity

        Hide
        David Zhao added a comment -

        You are talking about 2 things here.

        For the first one, it is like a doc defect to me about configure-jms-cluster. But the configstoretype and messagestoretype are ignored if clustertype is set to enhanced according to the command description (http://docs.oracle.com/cd/E26576_01/doc.312/e24938/configure-jms-cluster.htm#GSRFM00008). So you can just ignore those options when you are creating enhanced local broker cluster as a workaround.

        For the second one, please make sure you are changing the correct imqbroker property files. In general, glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties is for default server's use unless you add the server to the cluster specifically.

        Normally, the steps to create a jms cluster of glassfish is as follows:

        asadmin start-domain
        asadmin create-cluster
        asadmin configure-jms-cluster
        asadmin create-local-instance --cluster ...
        asadmin create-local-instance --cluster ...
        asadmin start-cluster

        Show
        David Zhao added a comment - You are talking about 2 things here. For the first one, it is like a doc defect to me about configure-jms-cluster. But the configstoretype and messagestoretype are ignored if clustertype is set to enhanced according to the command description ( http://docs.oracle.com/cd/E26576_01/doc.312/e24938/configure-jms-cluster.htm#GSRFM00008 ). So you can just ignore those options when you are creating enhanced local broker cluster as a workaround. For the second one, please make sure you are changing the correct imqbroker property files. In general, glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties is for default server's use unless you add the server to the cluster specifically. Normally, the steps to create a jms cluster of glassfish is as follows: asadmin start-domain asadmin create-cluster asadmin configure-jms-cluster asadmin create-local-instance --cluster ... asadmin create-local-instance --cluster ... asadmin start-cluster
        Hide
        sp88 added a comment -

        HI David Zhao,

        Thanks for your response.

        So the thing am trying to achieve is this. I need a glassfish cluster with two instances (one local and one remote instance on another host). And this cluster must be enahanced broker cluster. Similar to instances, one broker must be on local instance and the other broker must be on the another host.

        How am trying to do this. First am trying to create the config.properties file by starting imqbroker by using imqbrokerd command (this is official documented in glassfish)

        Once the config.properties file is created, am modifying it with the following content so that a shareddb can be used by all brokers in the cluster (as soon as a new broker is added with the same DB config, it automatically gets detected)

        imq.persist.jdbc.mysql.user=root
        imq.cluster.ha=true
        imq.persist.jdbc.dbVendor=mysql
        imq.brokerid=broker1
        imq.persist.jdbc.mysql.password=password
        imq.persist.jdbc.vendorName.tableoption=CHARSET\=latin1
        imq.persist.jdbc.mysql.property.url=jdbc\:mysql\://mydb.mydomain.com\:3306/vidispine
        imq.cluster.clusterid=vsha
        imq.persist.store=jdbc

        But after adding the above stuff to the config file glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties. Restarting glassfish domain is working fine. But am getting an error while listing the brokers locally.

        Username: admin
        Password:
        Listing all the brokers in the cluster that the following broker is a member of:

        -------------------------
        Host Primary Port
        -------------------------
        localhost 7676

        Error while connecting to the broker on host 'localhost' and port '7676'.
        com.sun.messaging.jms.JMSException: [C4098]: Unknown broker service: admin
        Please verify that there is a broker running on the specified host and port or
        use the '-b' option to specify the correct broker host and port.

        Listing the brokers in the cluster failed.

        Can u help me get this done..Or am i doing some mistake here...

        Thanks & Regards
        sarath

        Show
        sp88 added a comment - HI David Zhao, Thanks for your response. So the thing am trying to achieve is this. I need a glassfish cluster with two instances (one local and one remote instance on another host). And this cluster must be enahanced broker cluster. Similar to instances, one broker must be on local instance and the other broker must be on the another host. How am trying to do this. First am trying to create the config.properties file by starting imqbroker by using imqbrokerd command (this is official documented in glassfish) Once the config.properties file is created, am modifying it with the following content so that a shareddb can be used by all brokers in the cluster (as soon as a new broker is added with the same DB config, it automatically gets detected) imq.persist.jdbc.mysql.user=root imq.cluster.ha=true imq.persist.jdbc.dbVendor=mysql imq.brokerid=broker1 imq.persist.jdbc.mysql.password=password imq.persist.jdbc.vendorName.tableoption=CHARSET\=latin1 imq.persist.jdbc.mysql.property.url=jdbc\:mysql\://mydb.mydomain.com\:3306/vidispine imq.cluster.clusterid=vsha imq.persist.store=jdbc But after adding the above stuff to the config file glassfish/domains/domain1/imq/instances/imqbroker/props/config.properties. Restarting glassfish domain is working fine. But am getting an error while listing the brokers locally. Username: admin Password: Listing all the brokers in the cluster that the following broker is a member of: ------------------------- Host Primary Port ------------------------- localhost 7676 Error while connecting to the broker on host 'localhost' and port '7676'. com.sun.messaging.jms.JMSException: [C4098] : Unknown broker service: admin Please verify that there is a broker running on the specified host and port or use the '-b' option to specify the correct broker host and port. Listing the brokers in the cluster failed. Can u help me get this done..Or am i doing some mistake here... Thanks & Regards sarath
        Hide
        David Zhao added a comment -

        According to the error message, it seems no broker is running on port 7676. You can check the imq logs to see the broker status.

        Show
        David Zhao added a comment - According to the error message, it seems no broker is running on port 7676. You can check the imq logs to see the broker status.
        Hide
        amyk added a comment -

        If you start broker with imqbrokerd, then you need to configure the GlassFish JMS service to use REMOTE type, otherwise GlassFish instance will start its own broker instance on self-generated port if you didn't configure the port
        http://docs.oracle.com/cd/E18930_01/html/821-2416/beaof.html#scrolltoc

        Show
        amyk added a comment - If you start broker with imqbrokerd, then you need to configure the GlassFish JMS service to use REMOTE type, otherwise GlassFish instance will start its own broker instance on self-generated port if you didn't configure the port http://docs.oracle.com/cd/E18930_01/html/821-2416/beaof.html#scrolltoc

          People

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

            Dates

            • Created:
              Updated: