Network of brokers - already connected [SOLVED]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Network of brokers - already connected [SOLVED]

toff
This post was updated on .
Hi,

I tried searching the mailing list archive for an answer but to no avail. So here's yet another question on networks of brokers. I am using activemq 5.0, I want to configure a network of brokers with a given topology, that is deciding which broker is to be connected to which (using multiple network connectors). From the online documentation and examples from this mailing list for a simple 1-to-1 connection among brokers I use the following conf files:

Node1----

<broker xmlns="http://activemq.org/config/1.0" brokerName="ds-pl3.technion.ac.il" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7001)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S2" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://planetlab1.tmit.bme.hu:7002)"/>
    </networkConnectors>   
  </broker>

Node2----

<broker xmlns="http://activemq.org/config/1.0" brokerName="planetlab1.tmit.bme.hu" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7002)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S1" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://ds-pl3.technion.ac.il:7001)"/>
    </networkConnectors>   
  </broker>

-----

I use a single topic and messages seem to flow nicely from a broker to the other (I have a generic distributed pub/sub system with clients that are both producers and consumers attached to each broker).
Looking at the standard error on both nodes I get a bunch of exceptions that just keep repeating: some are of severity WARNING, some are SEVERE although they look the same to me.

Can anybody please tell me how to get rid of them? Can you please tell me what I am doing wrong?

Exceptions follow:


WARNING: Failed to add Connection
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Mar 31, 2008 2:20:51 PM org.apache.activemq.broker.TransportConnection serviceException
SEVERE: Async error occurred: javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

joe_fernandez
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

toff
Hi Joe, thank you for your reply. I saw the error message, what I cannot figure out is why it prints it:

- is it trying to reconnect after being disconnected and failing?
- is it connecting more than once because of wrong configuration?
- how does it decide which client id to use, why?

What I am trying to figure out is whether this is "normal" behavior (doesn't seem like), or there's a way to avoid it.

Thank you again,

g

ttmdev wrote
The following statement, taken from your standard error output, tells me that the broker w/the name "ds-pl3.technion.ac.il" is rejecting a connection request from a client because the client is trying to use a client id (NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il) that is already in use.

javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6

Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide

toff wrote
Hi,

I tried searching the mailing list archive for an answer but to no avail. So here's yet another question on networks of brokers. I am using activemq 5.0, I want to configure a network of brokers with a given topology, that is deciding which broker is to be connected to which (using multiple network connectors). From the online documentation and examples from this mailing list for a simple 1-to-1 connection among brokers I use the following conf files:

Node1----

<broker xmlns="http://activemq.org/config/1.0" brokerName="ds-pl3.technion.ac.il" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7001)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S2" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://planetlab1.tmit.bme.hu:7002)"/>
    </networkConnectors>   
  </broker>

Node2----

<broker xmlns="http://activemq.org/config/1.0" brokerName="planetlab1.tmit.bme.hu" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7002)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S1" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://ds-pl3.technion.ac.il:7001)"/>
    </networkConnectors>   
  </broker>

-----

I use a single topic and messages seem to flow nicely from a broker to the other (I have a generic distributed pub/sub system with clients that are both producers and consumers attached to each broker).
Looking at the standard error on both nodes I get a bunch of exceptions that just keep repeating: some are of severity WARNING, some are SEVERE although they look the same to me.

Can anybody please tell me how to get rid of them? Can you please tell me what I am doing wrong?

Exceptions follow:


WARNING: Failed to add Connection
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Mar 31, 2008 2:20:51 PM org.apache.activemq.broker.TransportConnection serviceException
SEVERE: Async error occurred: javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

joe_fernandez
In reply to this post by joe_fernandez
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

toff
Hi Joe,

thank you again. I confirm that taking avay the duplex attribute does the trick.

g

/U
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

/U
I have an identical problem with 4.1.2. Is the duplex
keyword implicitly set to true in 4.1.2 network connectors?
Documentation seems to suggest this keyword was
introduced in 5.0...

Thank you,

/Ur
toff wrote
Hi Joe,

thank you again. I confirm that taking avay the duplex attribute does the trick.

g
/U
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

/U
In reply to this post by toff
I have an identical problem with 4.1.2. Is the duplex
keyword implicitly set to true in 4.1.2 network connectors?
Documentation seems to suggest this keyword was
introduced in 5.0...

Thank you,

/Ur
toff wrote
Hi Joe,

thank you again. I confirm that taking avay the duplex attribute does the trick.

g
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

chirino
In reply to this post by /U
duplex option does not exist in that version.

On Tue, May 13, 2008 at 12:02 PM, /U <[hidden email]> wrote:

>
> I have an identical problem with 4.1.2. Is the duplex
> keyword implicitly set to true in 4.1.2 network connectors?
> Documentation seems to suggest this keyword was
> introduced in 5.0...
>
> Thank you,
>
> /Ur
>
> toff wrote:
>>
>> Hi Joe,
>>
>> thank you again. I confirm that taking avay the duplex attribute does the
>> trick.
>>
>> g
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Network-of-brokers---already-connected--SOLVED--tp16396907s2354p17212169.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



--
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://open.iona.com
Reply | Threaded
Open this post in threaded view
|

Re: Network of brokers - already connected

Eric-AWL
In reply to this post by joe_fernandez
Hi Joe.

But networkConnector names are different "S1" and "S2".
 
Even if the problem is resolved, in some cases, it could be interesting to have more than one duplex connections between two brokers (jsut for splitting flows for example).

Eric-AWL.

Joe Fernandez wrote
Please disregard my previous post; it was incorrect! d:(    Thanks G, for catching my mistake.  

This exception is being thrown because the broker planetlab1.tmit.bme.hu is trying to set up a demand forwarding bridge with the local broker pl3.technion.ac.il, but pl3.technion.ac.il is saying that it already has a bridge setup with planetlab1.tmit.bme.hu.

javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6

And the reason why is because the brokers are each trying to create “duplex” connections/bridges to each other. So taking out the duplex=”true” attribute from the network connector elements should do the trick.

Joe

ttmdev wrote
The following statement, taken from your standard error output, tells me that the broker w/the name "ds-pl3.technion.ac.il" is rejecting a connection request from a client because the client is trying to use a client id (NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il) that is already in use.

javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6

Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide

toff wrote
Hi,

I tried searching the mailing list archive for an answer but to no avail. So here's yet another question on networks of brokers. I am using activemq 5.0, I want to configure a network of brokers with a given topology, that is deciding which broker is to be connected to which (using multiple network connectors). From the online documentation and examples from this mailing list for a simple 1-to-1 connection among brokers I use the following conf files:

Node1----

<broker xmlns="http://activemq.org/config/1.0" brokerName="ds-pl3.technion.ac.il" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7001)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S2" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://planetlab1.tmit.bme.hu:7002)"/>
    </networkConnectors>   
  </broker>

Node2----

<broker xmlns="http://activemq.org/config/1.0" brokerName="planetlab1.tmit.bme.hu" dataDirectory="${activemq.base}/data">
    <transportConnectors>
    <transportConnector name="local" uri="static:(tcp://localhost:7002)"/>
    </transportConnectors>
    <networkConnectors>
      <networkConnector name="S1" dynamicOnly="true" networkTTL="15" duplex="true" uri="static://(tcp://ds-pl3.technion.ac.il:7001)"/>
    </networkConnectors>   
  </broker>

-----

I use a single topic and messages seem to flow nicely from a broker to the other (I have a generic distributed pub/sub system with clients that are both producers and consumers attached to each broker).
Looking at the standard error on both nodes I get a bunch of exceptions that just keep repeating: some are of severity WARNING, some are SEVERE although they look the same to me.

Can anybody please tell me how to get rid of them? Can you please tell me what I am doing wrong?

Exceptions follow:


WARNING: Failed to add Connection
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Mar 31, 2008 2:20:51 PM org.apache.activemq.broker.TransportConnection serviceException
SEVERE: Async error occurred: javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
javax.jms.InvalidClientIDException: Broker: ds-pl3.technion.ac.il - Client: NC_planetlab1.tmit.bme.hu_inboundds-pl3.technion.ac.il already connected from vm://ds-pl3.technion.ac.il#6
        at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:205)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:72)
        at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
        at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:657)
        at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)