I am running into problems configuring the jms clustering of Geoserver.

Here is the background:

I have 4 virtualboxes, each running a Geoserver 2.7.1 with the jms-cluster extension. I would like to keep the embedded broker in a matter of simpler installation. Also I would like to preserve this kind of peer to peer network because it supports easily the add or removal of node and because clients, do not have to know the broker network config.

However, my network admin announced me multicast will not be allowed in production environment. So as I know a priori the ip addresses of all the geoserver instances, I would like to change the multicast to a set of static ip.

But, for now, I did not succeed... jms brokers do not see each others.

I have even tried with a specific broker.xml:

<?xml version="1.0" encoding="UTF-8"?>
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                        http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  <broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">

      <kahaDB directory="${activemq.base}/kahadb" lockKeepAlivePeriod="0" />

    <networkConnectors xmlns="http://activemq.apache.org/schema/core">
      <networkConnector uri="static:(tcp://host1:61616,tcp://host2:61616,tcp://host3:61616,tcp://localhost:61616)" />

      <transportConnector name="openwire" uri="${activemq.transportConnectors.server.uri}"

Is there a way to configure the activemq discovery with a fixed set of ip?

I have already checked the activemq documentation (http://activemq.apache.org/networks-of-brokers.html) but I can have it working so perhaps it is linked to the fact the broker is embedded.

2 Answers 2


I found the solution for this problem using an external broker per geoserver node: the only step I missed was to set the var 'connection' of the cluster.properties to TRUE. This field can be found in the web UI in the cluster configuration panel, but it is named "Slave connection". A bit confusing!


A quick suggestion is to disable the embedded broker, use an external one (eventually clustered). This is similar to having the p2p network in terms of functionalities and it is not too difficult to manage.

That said, what I believe your configuration is a bit messed up. That said discovery works only with multicast. What you can do if you know in advanced the IP addresses of the GS instances is to create a static network between the embedded broker and still have each geoserver instance talk to its local broker.

You can customize the embedded-broker.properties as follows:



This tells the broker to listen on port 61616 but also to forward messages to all the other brokers.

The configuration for each embedded broker should be similar to create a correct network where each produced (i.e. GeoServer instance) will have its messages sento to all the other instances.

Let me know if this works, I did not have time to test it.

  • Hi, I have tried as you suggested but I got a NullPointerException from activemq. I even tried to upgrade to latest version of activemq jars (as suggested by the fix - issues.apache.org/jira/browse/AMQ-5442) but it does the same: geoserver do not bootstrap.
    – Rot Ulet
    Jul 21, 2015 at 8:34
  • Here the top of the stacktrace: 21 Jul 10:26:04 ERROR [cluster.impl] - java.lang.NullPointerException at org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent.start(SimpleDiscoveryAgent.java:92) at org.apache.activemq.broker.TransportConnector.start(TransportConnector.java:253) at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2593) at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2506) at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:710)
    – Rot Ulet
    Jul 21, 2015 at 8:38
  • Still failing... I have disabled the embedded broker and install an external one (latest version) for each Geoserver VMs. Brokers can see each other and exchange messages. If I create a style from one Geoserver, the jms messages are sent to the other broker in the good topic but the other geoserver does not retrieve the messages from its local broker... so the style is not imported... I am depressed :)
    – Rot Ulet
    Jul 22, 2015 at 12:12
  • Can you share the config for this last set up?
    – simogeo
    Jul 22, 2015 at 17:51
  • here are: the /etc/default/activemq pastebin.com/XARMtzQF
    – Rot Ulet
    Jul 23, 2015 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.