You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Brandon Pedersen <bp...@gmail.com> on 2011/09/20 08:57:51 UTC

federation issues

Hi, I am starting to play around with federation/routes. So I have a
local c++ broker with a topic exchange. I want to route all messages
to the same exchange on a remote java broker (a push route). So I do
the following locally:

qpid-config add exchange topic myexchange
qpid-route -s route add admin/admin@remote-java-broker local-broker
myexchange '#'

I then use the spout script to send a message to the local exchange,
however, the message never shows up on the remote end (qpid-stat shows
0 messages received on the remote exchange). I can see that the link
is up using qpid-route and the logs show that a bridge queue is
created. Is there something I am missing? Or does this just not work
going between c++ and java?

Thanks,

-Brandon

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: federation issues

Posted by Gordon Sim <gs...@redhat.com>.
On 09/20/2011 06:19 PM, Brandon Pedersen wrote:
> OK, so I was looking at the logs on the java side, it appears to be a
> problem there, when I first add the route, the following shows up in
> the log:
>
> 2011-09-20 11:14:16,959 INFO  [MINANetworkDriver(Acceptor)-4] (Log4jMessageLogge
> r.java:72) - [con:1(null@/xxx.xxx.xxx.xxx:58351/localhost)] CON-1001 :
> Open : Clie
> nt ID : null : Protocol Version : 0-10
> 2011-09-20 11:14:41,820 ERROR [MINANetworkDriver(Acceptor)-5] (MINANetworkDriver
> .java:315) - Exception thrown and no ProtocolEngine to handle it
> org.apache.qpid.transport.ProtocolViolationException: Received frames for an alr
> eady dettached session
>          at org.apache.qpid.transport.Connection.dispatch(Connection.java:408)
>          at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
> e.java:64)
>          at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
> e.java:40)
>          at org.apache.qpid.transport.MethodDelegate.sessionAttached(MethodDelega
> te.java:68)
>          at org.apache.qpid.transport.SessionAttached.dispatch(SessionAttached.ja
> va:96)
>          at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelega
> te.java:49)
>          at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelega
> te.java:40)
>          at org.apache.qpid.transport.Method.delegate(Method.java:163)
>          at org.apache.qpid.transport.Connection.received(Connection.java:369)
>          at org.apache.qpid.server.transport.ServerConnection.received(ServerConn
> ection.java:204)
>          at org.apache.qpid.server.transport.ServerConnection.received(ServerConn
> ection.java:52)
> ......snip......

This appears to be a bug in the c++ broker, which for push routes is 
sending a session-attached rather than a session-attach. That violates 
the 0-10 protocol.

> I also tried to do a pull route from the java side and got a different
> exception:
>
> 2011-09-20 11:17:16,682 INFO  [MINANetworkDriver(Acceptor)-8] (Log4jMessageLogge
> r.java:72) - [con:2(null@/xxx.xxx.xxx.xxx:22891/localhost)/ch:1]
> [vh(/localhost)/e
> x(management/qpid.management)/qu(topic-NOVELL-4OFTOTK4.16124.1)/rk(console.event
> .*.*.org.apache.qpid.broker.agent)] BND-1001 : Create
> 2011-09-20 11:17:16,766 ERROR [MINANetworkDriver(Acceptor)-2] (MINANetworkDriver
> .java:315) - Exception thrown and no ProtocolEngine to handle it
> java.lang.NullPointerException
>          at org.apache.qpid.qmf.schema.BrokerSchema$BrokerClass$ConnectMethodInvo
> cation.execute(BrokerSchema.java:825)
>          at org.apache.qpid.qmf.schema.BrokerSchema$BrokerClass$ConnectMethodInvo
> cation.execute(BrokerSchema.java:786)
>          at org.apache.qpid.qmf.QMFMethodRequestCommand.process(QMFMethodRequestC
> ommand.java:61)
>          at org.apache.qpid.qmf.ManagementExchange$ManagementQueue.enqueue(Manage
> mentExchange.java:109)
>          at org.apache.qpid.server.transport.ServerSession$1.postCommit(ServerSes
> sion.java:181)
>          at org.apache.qpid.server.txn.AutoCommitTransaction.enqueue(AutoCommitTr
> ansaction.java:212)
>          at org.apache.qpid.server.transport.ServerSession.enqueue(ServerSession.
> java:170)
>          at org.apache.qpid.server.transport.ServerSessionDelegate.messageTransfe
> r(ServerSessionDelegate.java:332)
>          at org.apache.qpid.server.transport.ServerSessionDelegate.messageTransfe
> r(ServerSessionDelegate.java:96)
>          at org.apache.qpid.transport.MessageTransfer.dispatch(MessageTransfer.ja
> va:108)
>          at org.apache.qpid.transport.SessionDelegate.command(SessionDelegate.jav
> a:50)
>          at org.apache.qpid.server.transport.ServerSessionDelegate.command(Server
> SessionDelegate.java:112)
>          at org.apache.qpid.server.transport.ServerSessionDelegate.command(Server
> SessionDelegate.java:96)
>          at org.apache.qpid.transport.Method.delegate(Method.java:159)
>          at org.apache.qpid.transport.Session.received(Session.java:528)
>          at org.apache.qpid.transport.Connection.dispatch(Connection.java:404)
>          at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
> e.java:64)
>          at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
> ....snip....

This on the face of it is an internal error in the java broker when 
handling the QMF request from qpid-route. I don't know enough about the 
code in question to say where the fault lies exactly. (Could it be a 
virtual hosts issue for example?)

> Any ideas? should I submit a bug?

Yes, please . Ideally two separate bugs for each of these issues.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: federation issues

Posted by Brandon Pedersen <bp...@gmail.com>.
OK, so I was looking at the logs on the java side, it appears to be a
problem there, when I first add the route, the following shows up in
the log:

2011-09-20 11:14:16,959 INFO  [MINANetworkDriver(Acceptor)-4] (Log4jMessageLogge
r.java:72) - [con:1(null@/xxx.xxx.xxx.xxx:58351/localhost)] CON-1001 :
Open : Clie
nt ID : null : Protocol Version : 0-10
2011-09-20 11:14:41,820 ERROR [MINANetworkDriver(Acceptor)-5] (MINANetworkDriver
.java:315) - Exception thrown and no ProtocolEngine to handle it
org.apache.qpid.transport.ProtocolViolationException: Received frames for an alr
eady dettached session
        at org.apache.qpid.transport.Connection.dispatch(Connection.java:408)
        at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
e.java:64)
        at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
e.java:40)
        at org.apache.qpid.transport.MethodDelegate.sessionAttached(MethodDelega
te.java:68)
        at org.apache.qpid.transport.SessionAttached.dispatch(SessionAttached.ja
va:96)
        at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelega
te.java:49)
        at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelega
te.java:40)
        at org.apache.qpid.transport.Method.delegate(Method.java:163)
        at org.apache.qpid.transport.Connection.received(Connection.java:369)
        at org.apache.qpid.server.transport.ServerConnection.received(ServerConn
ection.java:204)
        at org.apache.qpid.server.transport.ServerConnection.received(ServerConn
ection.java:52)
......snip......

I also tried to do a pull route from the java side and got a different
exception:

2011-09-20 11:17:16,682 INFO  [MINANetworkDriver(Acceptor)-8] (Log4jMessageLogge
r.java:72) - [con:2(null@/xxx.xxx.xxx.xxx:22891/localhost)/ch:1]
[vh(/localhost)/e
x(management/qpid.management)/qu(topic-NOVELL-4OFTOTK4.16124.1)/rk(console.event
.*.*.org.apache.qpid.broker.agent)] BND-1001 : Create
2011-09-20 11:17:16,766 ERROR [MINANetworkDriver(Acceptor)-2] (MINANetworkDriver
.java:315) - Exception thrown and no ProtocolEngine to handle it
java.lang.NullPointerException
        at org.apache.qpid.qmf.schema.BrokerSchema$BrokerClass$ConnectMethodInvo
cation.execute(BrokerSchema.java:825)
        at org.apache.qpid.qmf.schema.BrokerSchema$BrokerClass$ConnectMethodInvo
cation.execute(BrokerSchema.java:786)
        at org.apache.qpid.qmf.QMFMethodRequestCommand.process(QMFMethodRequestC
ommand.java:61)
        at org.apache.qpid.qmf.ManagementExchange$ManagementQueue.enqueue(Manage
mentExchange.java:109)
        at org.apache.qpid.server.transport.ServerSession$1.postCommit(ServerSes
sion.java:181)
        at org.apache.qpid.server.txn.AutoCommitTransaction.enqueue(AutoCommitTr
ansaction.java:212)
        at org.apache.qpid.server.transport.ServerSession.enqueue(ServerSession.
java:170)
        at org.apache.qpid.server.transport.ServerSessionDelegate.messageTransfe
r(ServerSessionDelegate.java:332)
        at org.apache.qpid.server.transport.ServerSessionDelegate.messageTransfe
r(ServerSessionDelegate.java:96)
        at org.apache.qpid.transport.MessageTransfer.dispatch(MessageTransfer.ja
va:108)
        at org.apache.qpid.transport.SessionDelegate.command(SessionDelegate.jav
a:50)
        at org.apache.qpid.server.transport.ServerSessionDelegate.command(Server
SessionDelegate.java:112)
        at org.apache.qpid.server.transport.ServerSessionDelegate.command(Server
SessionDelegate.java:96)
        at org.apache.qpid.transport.Method.delegate(Method.java:159)
        at org.apache.qpid.transport.Session.received(Session.java:528)
        at org.apache.qpid.transport.Connection.dispatch(Connection.java:404)
        at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
e.java:64)
        at org.apache.qpid.transport.ConnectionDelegate.handle(ConnectionDelegat
....snip....

Any ideas? should I submit a bug?

On Tue, Sep 20, 2011 at 5:51 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 09/20/2011 07:57 AM, Brandon Pedersen wrote:
>>
>> Hi, I am starting to play around with federation/routes. So I have a
>> local c++ broker with a topic exchange. I want to route all messages
>> to the same exchange on a remote java broker (a push route). So I do
>> the following locally:
>>
>> qpid-config add exchange topic myexchange
>> qpid-route -s route add admin/admin@remote-java-broker local-broker
>> myexchange '#'
>>
>> I then use the spout script to send a message to the local exchange,
>> however, the message never shows up on the remote end (qpid-stat shows
>> 0 messages received on the remote exchange). I can see that the link
>> is up using qpid-route and the logs show that a bridge queue is
>> created. Is there something I am missing? Or does this just not work
>> going between c++ and java?
>
> I have never tried that myself. What does qpid-stat show for the local
> broker (i.e. c++ broker)? Are there any messages in the queue? Is there a
> subscription for the queue and has it delivered any messages?
>
> You could also try a pull route (i.e. have the java broker pull messages) to
> see if it is the push route that is the issue.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: federation issues

Posted by Gordon Sim <gs...@redhat.com>.
On 09/20/2011 07:57 AM, Brandon Pedersen wrote:
> Hi, I am starting to play around with federation/routes. So I have a
> local c++ broker with a topic exchange. I want to route all messages
> to the same exchange on a remote java broker (a push route). So I do
> the following locally:
>
> qpid-config add exchange topic myexchange
> qpid-route -s route add admin/admin@remote-java-broker local-broker
> myexchange '#'
>
> I then use the spout script to send a message to the local exchange,
> however, the message never shows up on the remote end (qpid-stat shows
> 0 messages received on the remote exchange). I can see that the link
> is up using qpid-route and the logs show that a bridge queue is
> created. Is there something I am missing? Or does this just not work
> going between c++ and java?

I have never tried that myself. What does qpid-stat show for the local 
broker (i.e. c++ broker)? Are there any messages in the queue? Is there 
a subscription for the queue and has it delivered any messages?

You could also try a pull route (i.e. have the java broker pull 
messages) to see if it is the push route that is the issue.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org