[rabbitmq-discuss] Problems while trying interoperability

Goel, Tanmay tanmay.goel at intel.com
Thu Aug 16 01:38:39 BST 2007


Hi,

 

Thanks Matthias. I got the server running.

 

Right now I am conducting some basic experiments with interoperability
among the various implementations but haven't received any positive
results yet. For example, when I try to run a RabbitMQ client (attached,
SimpleProducer.java) against Qpid broker (with the default configuration
provided when I first downloaded it, no change), I get the following
exception. The exception is thrown on this like of code: 

int ticket = ch.accessRequest("/test");

Intuitively, this method is not provided by the Qpid broker. Is it?

Also, there is no "client-name" passed as a parameter at the time of
establishing connection to the RabbitMQ connection constructor but is
passed to the Qpid connection constructor. If and how will this effect?

 

------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------

AMQConnection.mainLoop: connection close

Main thread caught exception: java.io.IOException

java.io.IOException

      at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:112)

      at
com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:126)

      at
com.rabbitmq.client.impl.ChannelN.accessRequest(ChannelN.java:326)

      at
com.rabbitmq.client.impl.ChannelN.accessRequest(ChannelN.java:309)

      at
com.rabbitmq.examples.SimpleProducer.main(SimpleProducer.java:44)

Caused by: com.rabbitmq.client.ShutdownSignalException (connection
error; reason: java.io.EOFException)

      at
com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:536)

      at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:4
24)

Caused by: java.io.EOFException

      at java.io.DataInputStream.readUnsignedByte(Unknown Source)

      at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:105)

      at
com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler
.java:119)

      at
com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:277)

      at
com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:3
94)

 

 

------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------

 

Alternatively, when I tried to run a Qpid client against a RabbitMQ
broker (again, with the default settings, virtual hosts, etc). I got the
following error message at the first line of code: _connection = new
AMQConnection("localhost", 5672, "guest", "guest", "clientid", "/data");

 

------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------

main 2007-08-15 17:30:36,519 INFO [apache.qpid.client.AMQConnection]
Connection:amqp://guest:guest@clientid/data?brokerlist='tcp://localhost:
5672'

main 2007-08-15 17:30:36,597 WARN
[qpid.client.transport.TransportConnection] Using Mina NIO

main 2007-08-15 17:30:36,612 INFO
[qpid.client.transport.SocketTransportConnection] send-buffer-size =
32768

main 2007-08-15 17:30:36,612 INFO
[qpid.client.transport.SocketTransportConnection] recv-buffer-size =
32768

main 2007-08-15 17:30:36,628 INFO
[qpid.client.transport.SocketTransportConnection] Attempting connection
to localhost/127.0.0.1:5672

AnonymousIoService-2 2007-08-15 17:30:36,831 INFO
[qpid.client.security.CallbackHandlerRegistry] Available SASL
mechanisms: CRAM-MD5 PLAIN

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.handler.ConnectionCloseMethodHandler] ConnectionClose frame
received

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.handler.ConnectionCloseMethodHandler] Connection close
received with error code 403

main 2007-08-15 17:30:36,847 INFO [apache.qpid.client.AMQConnection]
Unable to connect to broker at tcp://localhost:5672

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Exception caught therefore
going to attempt failover: org.apache.qpid.AMQConnectionClosedException:
Error: ACCESS_REFUSED [error code 403]

org.apache.qpid.AMQConnectionClosedException: Error: ACCESS_REFUSED
[error code 403]

      at
org.apache.qpid.client.handler.ConnectionCloseMethodHandler.methodReceiv
ed(ConnectionCloseMethodHandler.java:82)

      at
org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateMana
ger.java:151)

      at
org.apache.qpid.client.protocol.AMQProtocolHandler$1.methodReceived(AMQP
rotocolHandler.java:106)

      at
org.apache.qpid.client.protocol.AMQProtocolHandler.messageReceived(AMQPr
otocolHandler.java:323)

      at
org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(A
bstractIoFilterChain.java:189)

      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRece
ived(AbstractIoFilterChain.java:502)

      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstrac
tIoFilterChain.java:52)

      at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.message
Received(AbstractIoFilterChain.java:777)

      at
org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(S
impleProtocolDecoderOutput.java:60)

      at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Protoco
lCodecFilter.java:185)

      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRece
ived(AbstractIoFilterChain.java:502)

      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstrac
tIoFilterChain.java:52)

      at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.message
Received(AbstractIoFilterChain.java:777)

      at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilt
er.java:243)

      at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run
(ExecutorFilter.java:305)

      at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.runTask(ThreadPoolExecutor.java:665)

      at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:690)

      at java.lang.Thread.run(Unknown Source)

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Session closed called with
failover state currently FailoverState: NOT STARTED

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] FAILOVER STARTING

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Protocol Session
[org.apache.qpid.client.protocol.AMQProtocolHandler at e2dae9] closed

Failover 2007-08-15 17:30:36,847 INFO
[qpid.client.failover.FailoverHandler] Starting failover process

Failover 2007-08-15 17:30:36,847 WARN
[qpid.client.transport.TransportConnection] Using Mina NIO

Failover 2007-08-15 17:30:36,847 INFO
[qpid.client.transport.SocketTransportConnection] send-buffer-size =
32768

Failover 2007-08-15 17:30:36,847 INFO
[qpid.client.transport.SocketTransportConnection] recv-buffer-size =
32768

Failover 2007-08-15 17:30:36,847 INFO
[qpid.client.transport.SocketTransportConnection] Attempting connection
to localhost/127.0.0.1:5672

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Session closed called with
failover state currently FailoverState: IN PROGRESS

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Failover not allowed by
policy.

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] sessionClose() failover in
progress

AnonymousIoService-4 2007-08-15 17:30:36,847 INFO
[qpid.client.protocol.AMQProtocolHandler] Protocol Session
[org.apache.qpid.client.protocol.AMQProtocolHandler at e2dae9] closed

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.handler.ConnectionCloseMethodHandler] ConnectionClose frame
received

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.handler.ConnectionCloseMethodHandler] Connection close
received with error code 403

Failover 2007-08-15 17:30:36,862 INFO [apache.qpid.client.AMQConnection]
Error: ACCESS_REFUSED [error code 403]:Unable to connect to broker at
tcp://localhost:5672

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.protocol.AMQProtocolHandler] Session closed called with
failover state currently FailoverState: IN PROGRESS

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.protocol.AMQProtocolHandler] Failover not allowed by
policy.

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.protocol.AMQProtocolHandler] sessionClose() failover in
progress

AnonymousIoService-8 2007-08-15 17:30:36,862 INFO
[qpid.client.protocol.AMQProtocolHandler] Protocol Session
[org.apache.qpid.client.protocol.AMQProtocolHandler at e2dae9] closed

Failover 2007-08-15 17:30:36,862 INFO [apache.qpid.client.AMQConnection]
Closing AMQConnection due to :Server closed connection and no failover
was successful

org.apache.qpid.AMQConnectionClosedException: Error: ACCESS_REFUSED
[error code 403]

      at
org.apache.qpid.client.handler.ConnectionCloseMethodHandler.methodReceiv
ed(ConnectionCloseMethodHandler.java:82)

      at
org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateMana
ger.java:151)

      at
org.apache.qpid.client.protocol.AMQProtocolHandler$1.methodReceived(AMQP
rotocolHandler.java:106)

      at
org.apache.qpid.client.protocol.AMQProtocolHandler.messageReceived(AMQPr
otocolHandler.java:323)

      at
org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(A
bstractIoFilterChain.java:189)

      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRece
ived(AbstractIoFilterChain.java:502)

      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstrac
tIoFilterChain.java:52)

      at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.message
Received(AbstractIoFilterChain.java:777)

      at
org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(S
impleProtocolDecoderOutput.java:60)

      at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Protoco
lCodecFilter.java:185)

      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageRece
ived(AbstractIoFilterChain.java:502)

      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abstrac
tIoFilterChain.java:52)

      at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.message
Received(AbstractIoFilterChain.java:777)main 2007-08-15 17:30:36,956
ERROR [qpid.example.publisher.Publisher]
org.apache.qpid.AMQConnectionClosedException: Error: ACCESS_REFUSED
[error code 403]

 

      at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilt
er.java:243)

      at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run
(ExecutorFilter.java:305)

      at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.runTask(ThreadPoolExecutor.java:665)

      at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:690)

      at java.lang.Thread.run(Unknown Source)

main 2007-08-15 17:30:36,956 ERROR
[qpid.example.publisher.FileMessageDispatcher] Error trying to dispatch
message: java.lang.NullPointerException

 

------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------

 

Any suggestions that I can try out to make the interoperability work?

 

Thanks.

 

Regards,

Tanmay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20070815/202d8f3b/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleProducer.java
Type: application/octet-stream
Size: 2190 bytes
Desc: SimpleProducer.java
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20070815/202d8f3b/attachment.obj 


More information about the rabbitmq-discuss mailing list