Skip to main content

Loopback IP address is not allowed in broker address

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2012-10-24


Will try giving as much detail as possible and hope to get some feedback as completely stuck on this.

I have been trying to set up Glassfish3.1 to run an Application in a cluster.

I have added the IP Addresses and host names to /etc/hosts on the hosts being used.

glassfish@DAS:~/glassfish3/glassfish/bin$ cat /etc/hosts localhost DAS DAS NODE1 NODE2 DAS

Example of the DAS hosts file, each one differs slightly due to IP differences

To instal the DAS, just unzipped glassfish 3.1 to the home directory.

set up ssh access as follows: ./asadmin setup-ssh NODE1 NODE2
installed nodes as follows: ./asadmin install-node NODE1 NODE2

Then added the nodes and instances via the GUI and configured the queues for JMS etc etc

Up until here all is fine...until i try to start the cluster /instances and the following shows in the mq log:

[24/Oct/2012:13:31:59 BST] Arguments: -port 27677 -name VidispineINSTANCE1 -nobind -imqhome /home/glassfish/glassfish3/mq -varhome /home/glassfish/glassfish3/glassfish/nodes/NODE1/INSTANCE1/imq -libhome /home/glassfish/glassfish3/mq/lib -useRmiRegistry -rmiRegistryPort 28687 -save -silent
[24/Oct/2012:13:31:59 BST] JMSRA BrokerProps: imq.cluster.brokerlist=mq://NODE1:27677/,mq://NODE2:27676/,mq://NODE2:27677/,mq://NODE1:27676/, imq.cluster.masterbroker=mq://NODE2:27676/, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.service.activate=jmsdirect, imq.imqcmd.password=*****, imq.jmsra.managed=true, imq.cluster.nowaitForMasterBroker=true
[24/Oct/2012:13:31:59 BST] Broker Properties: imq.service.activate=jmsdirect, imq.cluster.nowaitForMasterBroker=true, imq.jmx.rmiregistry.use=true, imq.cluster.brokerlist=mq://NODE1:27677/,mq://NODE2:27676/,mq://NODE2:27677/,mq://NODE1:27676/, imq.cluster.masterbroker=mq://NODE2:27676/, imq.portmapper.port=27677, imq.jmsra.managed=true, imq.instancename=VidispineINSTANCE1, imq.log.console.output=NONE, imq.imqcmd.password=*****, imq.jmx.rmiregistry.port=28687, imq.service.runtimeAdd=mqdirect2, imq.cluster.dynamicChangeMasterBrokerEnabled=true, imq.portmapper.bind=false
[24/Oct/2012:13:31:59 BST] Embedded Broker
[24/Oct/2012:13:31:59 BST] [B1060]: Loading persistent data...
[24/Oct/2012:13:31:59 BST] Using built-in file-based persistent store: /home/glassfish/glassfish3/glassfish/nodes/NODE1/INSTANCE1/imq/instances/VidispineINSTANCE1/
[24/Oct/2012:13:31:59 BST] ERROR [B3168]: Invalid broker address for this broker to run in cluster: Loopback IP address is not allowed in broker address mq:// for cluster
[24/Oct/2012:13:31:59 BST] WARNING [B1137]: Cluster initialization failed. Disabling the cluster service.

Now I have googled, yahoo'd, everything really and can not see a complete fix.

As far as I am aware, it it grabbing the "localhost" from the Das instead of handing out an IP or host name. The JIRA i found said that all that needed to be done was to change anything in domain.xml from localhost to the das host name. This does not seem to work.

Does any one have any concrete answers or instructions on how to correct this. If you need any more info please let me know.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-10-12

There's a bit about the use of the loopback address in the MQ admin guide at

"You must make sure that no broker in the cluster is given an address that resolves to a loopback network (127.*.*.*) IP address. Any broker configured with such an address will be unable to connect to other brokers in the cluster.

"In particular, some Linux installers automatically set the local host to a loopback network address, most commonly On such systems, you must do the following: For each Linux system participating in the cluster, check the /etc/hosts file as part of cluster setup. If the system uses a static IP address, edit the /etc/hosts file to specify the correct address for the local host. If the address is registered with Domain Name Service (DNS), edit the file /etc/nsswitch.conf so that DNS lookup is performed before consulting the local hosts file."

I see your hosts file has localhost
but as you say, you're not directly trying to use localhost. Nevertheless GlassFish seems to have picked it up. Have you tried changing that entry to use the real IP address?