Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The embedded ActiveMQ in ServiceMix is configured to use network multicasts to discover other broker instances on the network. Sometimes, multicasts are disabled by policy, causing this exception:

No Format
ERROR - BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: java.net.SocketException: error setting options

The solution is to disable the multicast feature for ActiveMQ. In conf/activemq.xml, change...

No Format
    <transportConnectors>
      <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
    </transportConnectors>
 
    <networkConnectors>
      <networkConnector uri="multicast://default"/>
    </networkConnectors>

... to ...

No Format
    <transportConnectors>
      <transportConnector uri="tcp://localhost:61616"/>
    </transportConnectors>
 
    <networkConnectors>
    </networkConnectors>

ServiceMix 4

In ServiceMix 4, the ActiveMQ broker configuration file is called etc/activemq-broker.xml instead. After updating the file, you need to reload the configuration by updating the generated OSGi bundle.

First, find the bundle id for the activemq-broker.xml bundle

No Format
karaf@root> osgi:list | grep broker
[  53] [Active     ] [Created     ] [       ] [   60] activemq-broker.xml (0.0.0)

Next, use the osgi:update command to update the generated bundle with the new configuration information

No Format
karaf@root> osgi:update 53