activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Network of brokers refuse connection
Date Fri, 17 Mar 2006 09:25:40 GMT
This isn't terribly well documented yet I'm afraid - but when you are
creating a network of brokers; the brokers act kinda like JMS clients
connecting to other brokers. The <transportConnector> defines the address
the broker will listen on for inbound connections - from JMS/OpenWire
clients or other brokers.

So using your first example...

       <transportConnector uri="tcp://172.31.112.9:62003"
>
> />


That means any JMS client could connect using the URL
tcp://172.31.112.9:62003 and talk to the broker.

Now the <networkConnector> is an outbound connection, a way for a broker to
talk to other brokers. So URIs used inside here will be used to create
client connections to other brokers. So for the network to be established,
there must be brokers out there listening (via the <transportConnector>) on
the URIs mentioned in the <networkConnector>

i.e. <transportConnector> are servers - (ServerSockets etc);
<networkConnector> are clients that talk to other brokers (Sockets).

Looking at your XML, it looks like the URIs don't match; it looks like
you've used different ports in the networkConnector URIs to the available
transport connectors.





On 3/17/06, Javier Leyba <xleyba@gmail.com> wrote:
>
> Hi all
>
> I'm testing my simple network of brokers (just two brokers). After
> some problems I enabled DEBUG in log4j and saw the following message
> repeated premanently:
>
>
> Code:
>
> 2006-03-17 09:08:56,969 [ead Pool Thread] DEBUG FailoverTransport
>          - Connect fail to: <a href="tcp://172.31.112.9:62001,"
> target="_blank" rel="nofollow">tcp://172.31.112.9:62001,</a> reason:
> java.net.ConnectException: Connection refused
> 2006-03-17 09:08:56,969 [ead Pool Thread] DEBUG FailoverTransport
>          - Waiting 10 ms before attempting connection.
>
>
>
>
>
> This problem happens when I run brokers in different machines and in
> the same host too.
>
> My configuration is:
>
>
> Code:
>
>
> <broker brokerName="ubuntu2" persistent="true" useJmx="true">
>
>          <persistenceAdapter>
>                          <journaledJDBC journalLogFiles="5"
> dataDirectory="../activemq-data1" dataSource="#mysql-ds"
> useJournal="true" useQuickJournal="false">
>                                  <adapter><bytesJDBCAdapter/></adapter>
>                          </journaledJDBC>
>
>      </persistenceAdapter>
>
>      <transportConnectors>
>        <transportConnector uri="tcp://172.31.112.9:62003"/>
>      </transportConnectors>
>
>      <networkConnectors>
>          name = bridge
>              networkTTL = 2
>        <networkConnector
>
> uri="static:(failover:tcp://172.31.112.9:62005,tcp://172.31.112.9:62001)"/>
>      </networkConnectors>
>
>    </broker>
>
>
>
>
>
>
> and
>
>
> Code:
>
>
> <broker brokerName="ubuntu1" persistent="true" useJmx="true">
>   <persistenceAdapter>
>                          <journaledJDBC journalLogFiles="5"
> dataDirectory="../activemq-data" dataSource="#mysql-ds"
> useJournal="true" useQuickJournal="false">
>                                  <adapter><bytesJDBCAdapter/></adapter>
>                          </journaledJDBC>
>
>      </persistenceAdapter>
>
>      <transportConnectors>
>        <transportConnector uri="tcp://172.31.112.9:62002"/>
>      </transportConnectors>
>
>      <networkConnectors>
>          name = bridge
>              networkTTL = 2
>        <networkConnector
> uri="static:(failover:tcp://172.31.112.9:62001,tcp://172.30.27.1:62005)"/>
>      </networkConnectors>
>
>    </broker>
>
>
>
>
>
>
>
>
> If I run netstat I just can see transport ports listening (is this right
> ?).
>
> Did I made a config mistake ?
>
>
> Thanks in advance
>
>
> C
>



--

James
-------
http://radio.weblogs.com/0112098/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message