Skip to main content

Broker configuration

4 replies [Last post]
lxs2
Offline
Joined: 2010-02-17
Points: 0

Hi, from reading the doc it seems GlassFish is meant to configure a master-broker cluster fully automatically. However this does not seem to be working - both nodes are using mq://localhost:27676 as master broker so they squabble when connected. What do I need to do to make this work?

If I put "imq.cluster.url" in nodes/ubu2/i2/imq/instances/clusteri2/props/config.properties, start the broker then execute `imqcmd query bkr` I can see that that config file is being read. However I've tried many configuration permutations, including the following, and none achieve a masterbroker on ubu1. I also tried some configurations including "imq.cluster.hostname" and "imq.cluster.port" but they didn't seem to help. I've applied each config to both instances.

imq.cluster.masterbroker=ubu1

imq.cluster.masterbroker=ubu1<br />
imq.cluster.brokerlist=ubu1,ubu2

imq.cluster.masterbroker=ubu1:27676<br />
imq.cluster.brokerlist=ubu1:27676,ubu2:27676

imq.cluster.masterbroker=ubu1:20676<br />
imq.cluster.brokerlist=ubu1:20676,ubu2:20676

I've been reading http://download.oracle.com/docs/cd/E18930_01/html/821-2438/aeooa.html#gbnmu .

My setup is two Ubuntu 10.10 VirtualBoxes, ubu1 and ubu2, with domain 'cms' on ubu1 portbase 5000 running cluster 'cluster'. Nodes 'localhost-cms' and 'ubu2' with instances 'i1' and 'i2' respectively. I can post a log of all the asadmin commands used to initialise the environment if that would help.

The attached file includes the logfile from i2 after trying to deploy my application and the results from `imqcmd query bkr -b ubu2:27676` (with the default unedited configuration set up by GlassFish). I notice ubu1 at least has both nodes in its brokerlist. I can query each broker from the other node and get the same results as querying that node locally.

AttachmentSize
query.txt10.2 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Amy Kang Guest
Offline
Joined: 2010-11-13
Points: 0

Your attached broker log shows the following invalid cluster
configuration setting is passed to broker from GlassFish JMS module+JMSRA
imq.cluster.masterbroker=mq://localhost:27676/

filed bug http://java.net/jira/browse/GLASSFISH-17278. This setting
will resolve the masterbroker to different masterbroker IP addresses
when passed to ubu1 and ubu2, which explains the following broker error
log message,

[07/Sep/2011:15:08:15 BST] ERROR [B3097]: Configuration mismatch:
Aborting connection with broker [ mq://192.168.56.101:27676/?instName=c
lusteri1&brokerSessionUID=8727186921443670528 ] because master broker
does not match. This broker has master broker mq://192.168.56.102:2
7676/, broker [
mq://192.168.56.101:27676/?instName=clusteri1&brokerSessionUID=8727186921443670528
] has master broker mq://192.168.56.10
1:27676/

also please note that when a broker is started by GlassFish server, the
cluster configuration settings imq.cluster.masterbroker,
imq.cluster.brokerlist are passed to the broker from GlassFish server,
therefore manually setting these properties in broker's
config.properties will not take effect.

amy

On 11-09-07 08:49 AM, forums@java.net wrote:
> Hi, from reading the doc it seems GlassFish is meant to configure a
> master-broker cluster fully automatically. However this does not seem
> to be
> working - both nodes are using mq://localhost:27676 as master broker
> so they
> squabble when connected. What do I need to do to make this work?
> If I put "imq.cluster.url" in
> nodes/ubu2/i2/imq/instances/clusteri2/props/config.properties, start the
> broker then execute `imqcmd query bkr` I can see that that config file is
> being read. However I've tried many configuration permutations,
> including the
> following, and none achieve a masterbroker on ubu1. I also tried some
> configurations including "imq.cluster.hostname" and "imq.cluster.port"
> but
> they didn't seem to help. I've applied each config to both instances.
> imq.cluster.masterbroker=ubu1
>

imq.cluster.masterbroker=ubu1<br />
> imq.cluster.brokerlist=ubu1,ubu2

>
imq.cluster.masterbroker=ubu1:27676<br />
> imq.cluster.brokerlist=ubu1:27676,ubu2:27676

>
imq.cluster.masterbroker=ubu1:20676<br />
> imq.cluster.brokerlist=ubu1:20676,ubu2:20676

> I've been reading
> http://download.oracle.com/docs/cd/E18930_01/html/821-2438/aeooa.html#gbnmu
> .
> My setup is two Ubuntu 10.10 VirtualBoxes, ubu1 and ubu2, with domain
> 'cms'
> on ubu1 portbase 5000 running cluster 'cluster'. Nodes 'localhost-cms'
> and
> 'ubu2' with instances 'i1' and 'i2' respectively. I can post a log of
> all the
> asadmin commands used to initialise the environment if that would help.
> The attached file includes the logfile from i2 after trying to deploy my
> application and the results from `imqcmd query bkr -b ubu2:27676`
> (with the
> default unedited configuration set up by GlassFish). I notice ubu1 at
> least
> has both nodes in its brokerlist. I can query each broker from the
> other node
> and get the same results as querying that node locally.
>
>
>
>
> --
>
> [Message sent by forum member 'lxs2']
>
> View Post: http://forums.java.net/node/840957
>
>
>

lxs2
Offline
Joined: 2010-02-17
Points: 0

Fantastic. Thank you again Amy.

kytie
Offline
Joined: 2011-11-21
Points: 0

Evening Amy,

Would you mind elaborating on how you fixed this as we are experiencing exactly the same issue and it's driving me crazy! No matter what and where we specify fot our imq.cluster.masterbroker configuration our two node both boot, think they are the master so do not talk to each other. I have tried setting the jms-host.host property mentioned in the JIRA bug report but still the two brokers point to localhost for their master broker config.

Any help would be really appreciated.

Thanks in advance, Chris.

liang.x.zhao
Offline
Joined: 2011-12-18
Points: 0

Hello kytie,

If you are configuring MQ availability with master broker via glassfish cluster, please make sure the nodehost is a correct ip/hostname instead of localhost which can be resolved in the network.

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

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