We are using the 'duplex' functionality for the same reason. I am getting the
same results whether I use this syntax, as in the distro test case 

<networkConnector uri="static:(tcp://localhost:61617)">
           duplex=true 
              ....
</networkConnector>

or this one

<networkConnector uri="static:(tcp://localhost:61617)" duplex="true">
           ... 
</networkConnector>

In both cases the broker initiating the connection comes up fine, but when
it connects to the remote broker I get the exceptions listed below. However,
I did notice that the broker accepting the connection request reports this
NPE. 

WARN  DemandForwardingBridge         - Network connection between
vm://broker1#6
 and tcp:///127.0.0.1:1929 shutdown due to a remote error:
java.lang.NullPointer
Exception

Joe (ttmdev)


Alex_ynr wrote:
> 
> I don't know about ttmdev but I am guessing he is creating it on one side
> (just like I am).
> 
> The whole idea (and the reason I'm using the duplex functionality) is that
> one of the brokers is behind a firewall and cannot have an incoming
> connection...so I wanna set up an outgoing one from that broker to the
> outside one with duplex functionality.
> 
> Any thoughts?
> 
> Alex
> 
> 
> rajdavies wrote:
>> 
>> Are you creating two network connections - i.e. one on each broker - or
>> just one network connection on one broker?
>> 
>> 
>> ttmdev wrote:
>>> 
>>> I am trying to connect two 5.0 brokers via a duplex network connection
>>> without much success (see exception stack below). I am using the latest
>>> 5.0 snapshot. If I take out "duplex=true", both brokers are
>>> happy-campers and life is good. Has the duplex feature been fully
>>> implemented? - Thanks
>>> 
>>> 
>>> ERROR Service                        - Async error occurred:
>>> javax.jms.InvalidCl
>>> ientIDException: Broker: mybroker1 - Client:
>>> NC_mybroker2_inboundmybroker1 alrea
>>> dy connected from vm://mybroker1#0
>>> javax.jms.InvalidClientIDException: Broker: mybroker1 - Client:
>>> NC_mybroker2_inb
>>> oundmybroker1 already connected from vm://mybroker1#0
>>>         at
>>> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBr
>>> oker.java:205)
>>>         at
>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
>>> va:81)
>>>         at
>>> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBro
>>> ker.java:71)
>>>         at
>>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
>>> va:81)
>>>         at
>>> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableB
>>> rokerFilter.java:91)
>>>         at
>>> org.apache.activemq.broker.TransportConnection.processAddConnection(T
>>> ransportConnection.java:690)
>>>         at
>>> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:
>>> 125)
>>>         at
>>> org.apache.activemq.broker.TransportConnection.service(TransportConne
>>> ction.java:320)
>>>         at
>>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
>>> onnection.java:216)
>>>         at
>>> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCo
>>> rrelator.java:100)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
>>> er.java:67)
>>>         at
>>> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java
>>> :232)
>>>         at
>>> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskR
>>> unner.java:98)
>>>         at
>>> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRun
>>> ner.java:36)
>>> INFO  DemandForwardingBridge         - Network connection between
>>> vm://mybroker1
>>> #4 and tcp://localhost/127.0.0.1:61617(mybroker2) has been established.
>>> INFO  DemandForwardingBridge         - Network connection between
>>> vm://mybroker1
>>> #4 and tcp://localhost/127.0.0.1:61617 shutdown due to a local error:
>>> javax.jms.
>>> InvalidClientIDException: Broker: mybroker1 - Client:
>>> NC_mybroker2_inboundmybrok
>>> er1 already connected from vm://mybroker1#0
>>> ERROR Service                        - Async error occurred:
>>> java.lang.IllegalSt
>>> ateException: Cannot add a consumer to a session that had not been
>>> registered: I
>>> D:DIEGO-3893-1190136710171-5:1:1
>>> java.lang.IllegalStateException: Cannot add a consumer to a session that
>>> had not
>>>  been registered: ID:DIEGO-3893-1190136710171-5:1:1
>>>         at
>>> org.apache.activemq.broker.TransportConnection.processAddConsumer(Tra
>>> nsportConnection.java:559)
>>>         at
>>> org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:334)
>>> 
>>>         at
>>> org.apache.activemq.broker.TransportConnection.service(TransportConne
>>> ction.java:320)
>>>         at
>>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
>>> onnection.java:216)
>>>         at
>>> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCo
>>> rrelator.java:100)
>>>         at
>>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
>>> er.java:67)
>>>         at
>>> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java
>>> :232)
>>>         at
>>> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskR
>>> unner.java:98)
>>>         at
>>> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRun
>>> ner.java:36)
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> PieterN wrote:
>>>> 
>>>> 
>>>> rajdavies wrote:
>>>>> 
>>>>> nothing to be worried about - you've just encountered a half finished  
>>>>> implementation of duplex network connections. Hopefully this is fixed  
>>>>> in today's snapshot
>>>>> 
>>>> Using the latest snapshot (from august 5), I still encounter this
>>>> problem. I also sometimes receive duplicate messages, or get errors
>>>> when i try to ACK a message. Anyone else seeing this problems?
>>>> 
>>>> Regards,
>>>> 
>>>> Pieter
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unexpected-remote-command-tf4179394s2354.html#a13115970
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to