servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache ServiceMix > java.net.SocketException -- error setting options
Date Mon, 06 Sep 2010 19:47:02 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/13/_/styles/combined.css?spaceKey=SM&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/SM/java.net.SocketException+--+error+setting+options">java.net.SocketException
-- error setting options</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~gertvanthienen">Gert
Vanthienen</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >    &lt;/networkConnectors&gt;
<br>{noformat} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
<br>h3. ServiceMix 4 <br>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. <br> <br>First, find
the bundle id for the {{activemq-broker.xml}} bundle <br>{noformat} <br>karaf@root&gt;
osgi:list | grep broker <br>[  53] [Active     ] [Created     ] [       ] [   60] activemq-broker.xml
(0.0.0) <br>{noformat} <br> <br>Next, use the {{osgi:update}} command to
update the generated bundle with the new configuration information <br>{noformat} <br>karaf@root&gt;
osgi:update 53 <br>{noformat} <br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>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:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>ERROR - BrokerService - Failed to start ActiveMQ JMS Message Broker. Reason: java.net.SocketException:
error setting options
</pre>
</div></div>

<p>The solution is to disable the multicast feature for ActiveMQ.  In <tt>conf/activemq.xml</tt>,
change... </p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>    &lt;transportConnectors&gt;
      &lt;transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/&gt;
    &lt;/transportConnectors&gt;
 
    &lt;networkConnectors&gt;
      &lt;networkConnector uri="multicast://default"/&gt;
    &lt;/networkConnectors&gt;
</pre>
</div></div>
<p>... to ...</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>    &lt;transportConnectors&gt;
      &lt;transportConnector uri="tcp://localhost:61616"/&gt;
    &lt;/transportConnectors&gt;
 
    &lt;networkConnectors&gt;
    &lt;/networkConnectors&gt;
</pre>
</div></div>

<h3><a name="java.net.SocketException--errorsettingoptions-ServiceMix4"></a>ServiceMix
4</h3>
<p>In ServiceMix 4, the ActiveMQ broker configuration file is called <tt>etc/activemq-broker.xml</tt>
instead.  After updating the file, you need to reload the configuration by updating the generated
OSGi bundle.</p>

<p>First, find the bundle id for the <tt>activemq-broker.xml</tt> bundle</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>karaf@root&gt; osgi:list | grep broker
[  53] [Active     ] [Created     ] [       ] [   60] activemq-broker.xml (0.0.0)
</pre>
</div></div>

<p>Next, use the <tt>osgi:update</tt> command to update the generated bundle
with the new configuration information</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>karaf@root&gt; osgi:update 53
</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/SM/java.net.SocketException+--+error+setting+options">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=97321&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/SM/java.net.SocketException+--+error+setting+options?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message