activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: activemq-cpp failure using stomp with activemq
Date Sun, 12 Sep 2010 19:31:24 GMT
On Sat, 2010-09-11 at 12:00 -0700, baudtender wrote:
> I deployed activemq server on Windows 7 with JDK 1.6.0_20 and executed it
> using the command:
> 
> bin\activemq xbean:activemq-stomp.xml
> 
> The server started up with no problems and reported stomp+nio listening at
> port 61612 and stomp listening at port 61613.
> 
> I also built the activemq-cpp solution using Visual C++ 2008 on Windows 7
> and using the Debug configuration with the Multithreaded Debug runtime for
> all libraries and the executable.
> 
> I only changed line 387 in the file main.cpp, from:
> "failover:(tcp://localhost:61616"
> to
> "failover:(tcp://127.0.0.1:61613?wireFormat=stomp"

You can't mix Stomp and the Failover transport, Stomp doesn't provide
the protocol level support needed to make failover work.  Try the
example without using the fialover transport.

> 
> when I executed the activemq-cpp-example application on the same machine,
> the messages appeared to be sent properly by the producer (in the web
> browser admin console I saw that 2000 messages were enqueued), but the
> consumer failed, dequeuing 0 messages and generating lots of error messages
> in the server's command prompt window.
> 
> As I suspect these error messages were just repeating for each attempted
> connect/subscribe/read cycle, I changed line 405 from:
> int numMessages = 2000;
> to:
> int numMessages = 1;
> 
> and ran the application again.  The error messages from the server looked
> like this:
> 
>  WARN | Failed to add Connection
> javax.jms.InvalidClientIDException: Broker: localhost - Client:
> ID:GENESIS-55192
> -1284230593459-1:0 already connected from /127.0.0.1:55193
>         at
> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBr
> oker.java:241)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBro
> ker.java:78)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableB
> rokerFilter.java:91)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(T
> ransportConnection.java:694)
>         at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddC
> onnection(ManagedTransportConnection.java:83)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:
> 137)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConne
> ction.java:309)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
> onnection.java:185)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
> er.java:69)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActive
> MQ(StompTransportFilter.java:81)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(
> ProtocolConverter.java:140)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(
> ProtocolConverter.java:503)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(
> ProtocolConverter.java:192)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(St
> ompTransportFilter.java:70)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
> port.java:83)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.processCommand(
> StompNIOTransport.java:180)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(Sto
> mpNIOTransport.java:151)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.access$000(Stom
> pNIOTransport.java:51)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(Stom
> pNIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.onSelect(Selector
> Selection.java:94)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker
> .java:119)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
>  INFO | Transport failed: java.io.EOFException
> java.io.EOFException
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(Sto
> mpNIOTransport.java:106)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.access$000(Stom
> pNIOTransport.java:51)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(Stom
> pNIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.onSelect(Selector
> Selection.java:94)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker
> .java:119)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
>  WARN | Exception occured processing:
> CONNECT
> request-id:1
> passcode:
> client-id:ID:GENESIS-55192-1284230593459-1:0
> login:
> 
> 
> javax.jms.InvalidClientIDException: Broker: localhost - Client:
> ID:GENESIS-55192
> -1284230593459-1:0 already connected from /127.0.0.1:55193
>         at
> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBr
> oker.java:241)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBro
> ker.java:78)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableB
> rokerFilter.java:91)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(T
> ransportConnection.java:694)
>         at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddC
> onnection(ManagedTransportConnection.java:83)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:
> 137)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConne
> ction.java:309)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
> onnection.java:185)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
> er.java:69)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActive
> MQ(StompTransportFilter.java:81)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(
> ProtocolConverter.java:140)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(
> ProtocolConverter.java:503)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(
> ProtocolConverter.java:192)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(St
> ompTransportFilter.java:70)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
> port.java:83)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.processCommand(
> StompNIOTransport.java:180)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(Sto
> mpNIOTransport.java:151)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.access$000(Stom
> pNIOTransport.java:51)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(Stom
> pNIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.onSelect(Selector
> Selection.java:94)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker
> .java:119)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
>  INFO | Transport failed: java.io.IOException: Broker: localhost - Client:
> ID:GE
> NESIS-55192-1284230593459-1:0 already connected from /127.0.0.1:55193
> java.io.IOException: Broker: localhost - Client:
> ID:GENESIS-55192-1284230593459-
> 1:0 already connected from /127.0.0.1:55193
>         at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
> .java:39)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter$2.onResponse(Pr
> otocolConverter.java:510)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onActiveMQComma
> nd(ProtocolConverter.java:579)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.oneway(Stomp
> TransportFilter.java:58)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.ja
> va:40)
>         at
> org.apache.activemq.broker.TransportConnection.dispatch(TransportConn
> ection.java:1247)
>         at
> org.apache.activemq.broker.TransportConnection.processDispatch(Transp
> ortConnection.java:808)
>         at
> org.apache.activemq.broker.TransportConnection.dispatchSync(Transport
> Connection.java:768)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
> onnection.java:187)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
> er.java:69)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActive
> MQ(StompTransportFilter.java:81)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(
> ProtocolConverter.java:140)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompConnect(
> ProtocolConverter.java:503)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(
> ProtocolConverter.java:192)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(St
> ompTransportFilter.java:70)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
> port.java:83)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.processCommand(
> StompNIOTransport.java:180)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(Sto
> mpNIOTransport.java:151)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.access$000(Stom
> pNIOTransport.java:51)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(Stom
> pNIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.onSelect(Selector
> Selection.java:94)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker
> .java:119)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: javax.jms.InvalidClientIDException: Broker: localhost - Client:
> ID:GE
> NESIS-55192-1284230593459-1:0 already connected from /127.0.0.1:55193
>         at
> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBr
> oker.java:241)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBro
> ker.java:78)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.ja
> va:85)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableB
> rokerFilter.java:91)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(T
> ransportConnection.java:694)
>         at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddC
> onnection(ManagedTransportConnection.java:83)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:
> 137)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConne
> ction.java:309)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
> onnection.java:185)
>         ... 16 more
>  WARN | Exception occured processing:
> SUBSCRIBE
> ack:client
> activemq.maximumPendingMessageLimit:0
> activemq.priority:0
> activemq.prefetchSize:32766
> receipt:3
> activemq.dispatchAsync:true
> destination:/topic/TEST.FOO
> id:ID:GENESIS-55192-1284230593459-0:0:0:0
> 
> 
> org.apache.activemq.transport.stomp.ProtocolException: Not connected.
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.checkConnected(
> ProtocolConverter.java:563)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSubscrib
> e(ProtocolConverter.java:387)
>         at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(
> ProtocolConverter.java:188)
>         at
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(St
> ompTransportFilter.java:70)
>         at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
> port.java:83)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.processCommand(
> StompNIOTransport.java:180)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.serviceRead(Sto
> mpNIOTransport.java:151)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport.access$000(Stom
> pNIOTransport.java:51)
>         at
> org.apache.activemq.transport.stomp.StompNIOTransport$1.onSelect(Stom
> pNIOTransport.java:80)
>         at
> org.apache.activemq.transport.nio.SelectorSelection.onSelect(Selector
> Selection.java:94)
>         at
> org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker
> .java:119)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> 
> By the way, the OpenWire version works fine - it only fails under Stomp,
> which I am using as a validation tool for my message encoding/decoding
> algorithms, because I foresee other languages needing to connect to my
> server where OpenWire is not yet available (e.g. PHP.)
> 
> I also tried building the SimpleProducer and SimpleConsumer examples and
> executing them as separate applications with the same server error messages
> as above - the Simple Consumer's command prompt window displayed the banner
> and then a single "Connection was restored" message until the SimpleProducer
> was executed, at which time the SimpleConsumer just produced a ton of
> "connection interrupted/connection restored" messages.
> 
> I sure hope someone can see what I've done wrong here!
> 
> 



Mime
View raw message