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:
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...
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
|
... to ...
<transportConnectors>
<transportConnector uri="tcp://localhost:61616"/>
</transportConnectors>
<networkConnectors>
</networkConnectors>
|
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
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
karaf@root> osgi:update 53 |