0
votes

I try to connect to a RabbitMQ 3.7.18 broker - with the AMQP 1.0 plugin enabled - from a Qpid JMS client 0.45.0 (which supports AMQP 1.0 and JMS 2.0).

I send messages to "/queue/gruik" (i.e. the default exchange with the routing key "gruik", aka the gruik queue). The queue is created on the fly from the client side with javax.jms.Session#createQueue("/queue/gruik"). I can see that connections are well initiated in RabbitMQ, and the queue is also created.

But I can't actually send messages, due to the following error:

On the client side:

javax.jms.JMSException: {{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,[115,114,99,47,97,109,113,112,95,99,104,97,110,110,101,108,46,101,114,108]},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,[115,114,99,47,97,109,113,112,95,99,104,97,110,110,101,108,46,101,114,108]},{line,800}]},{gen_server,try_dispatch,4,[{file,[103,101,110,95,115,101,114,118,101,114,46,101,114,108]},{line,637}]},{gen_server,handle_msg,6,[{file,[103,101,110,95,115,101,114,118,101,114,46,101,114,108]},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,[112,114,111,99,95,108,105,98,46,101,114,108]},{line,249}]}]} [condition = amqp:internal-error]
    at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)
    at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
    at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
    at org.apache.qpid.jms.JmsConnection.pull(JmsConnection.java:915)
    at org.apache.qpid.jms.JmsConnection.pull(JmsConnection.java:899)
    at org.apache.qpid.jms.JmsMessageConsumer.performPullIfRequired(JmsMessageConsumer.java:726)
    at org.apache.qpid.jms.JmsMessageConsumer.dequeue(JmsMessageConsumer.java:332)
    at org.apache.qpid.jms.JmsMessageConsumer.receive(JmsMessageConsumer.java:213)
    at org.apache.activemq.artemis.jms.example.PerfBase.drainQueue(PerfBase.java:272)
    at org.apache.activemq.artemis.jms.example.PerfBase.runSender(PerfBase.java:188)
    at org.apache.activemq.artemis.jms.example.PerfSender.run(PerfSender.java:42)
    at org.apache.activemq.artemis.jms.example.PerfSender.main(PerfSender.java:31)
Caused by: org.apache.qpid.jms.provider.ProviderException: {{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,[115,114,99,47,97,109,113,112,95,99,104,97,110,110,101,108,46,101,114,108]},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,[115,114,99,47,97,109,113,112,95,99,104,97,110,110,101,108,46,101,114,108]},{line,800}]},{gen_server,try_dispatch,4,[{file,[103,101,110,95,115,101,114,118,101,114,46,101,114,108]},{line,637}]},{gen_server,handle_msg,6,[{file,[103,101,110,95,115,101,114,118,101,114,46,101,114,108]},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,[112,114,111,99,95,108,105,98,46,101,114,108]},{line,249}]}]} [condition = amqp:internal-error]
    at org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToNonFatalException(AmqpSupport.java:181)
    at org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:266)
    at org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:952)
    at org.apache.qpid.jms.provider.amqp.AmqpProvider.onData(AmqpProvider.java:850)
    at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:542)
    at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:535)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:796)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:427)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:328)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
    at java.base/java.lang.Thread.run(Thread.java:834)

and on the broker side:

2019-09-24 17:04:57.951 [info] <0.21922.0> accepting AMQP connection <0.21922.0> (80.13.79.15:59648 -> 10.132.0.29:5672)
2019-09-24 17:05:01.213 [error] <0.21985.0> ** Generic server <0.21985.0> terminating 
** Last message in was {send_command,{'basic.credit_drained',<<99,116,97,103,45,0,0,0,0>>,1000}}
** When Server state == {state,1,<0.21979.0>,<0.21984.0>,direct,{[],[]},false,<0.21988.0>,none,none,0,true,none,{0,nil},{0,nil},true,false}
** Reason for termination ==
** {{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,"src/amqp_channel.erl"},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,"src/amqp_channel.erl"},{line,800}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2019-09-24 17:05:01.213 [warning] <0.21976.0> Closing session for connection <0.21922.0>:
{{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,"src/amqp_channel.erl"},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,"src/amqp_channel.erl"},{line,800}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2019-09-24 17:05:01.214 [error] <0.21985.0> CRASH REPORT Process <0.21985.0> with 0 neighbours crashed with reason: no match of right hand value {empty,{[],[]}} in amqp_channel:rpc_bottom_half/2 line 623
2019-09-24 17:05:01.214 [error] <0.21983.0> Supervisor {<0.21983.0>,amqp_channel_sup} had child channel started with amqp_channel:start_link(direct, <0.21979.0>, 1, <0.21984.0>, {<<"80.13.79.15:59648 -> 10.132.0.29:5672">>,1}) at <0.21985.0> exit with reason no match of right hand value {empty,{[],[]}} in amqp_channel:rpc_bottom_half/2 line 623 in context child_terminated
2019-09-24 17:05:01.214 [error] <0.21983.0> Supervisor {<0.21983.0>,amqp_channel_sup} had child channel started with amqp_channel:start_link(direct, <0.21979.0>, 1, <0.21984.0>, {<<"80.13.79.15:59648 -> 10.132.0.29:5672">>,1}) at <0.21985.0> exit with reason reached_max_restart_intensity in context shutdown
2019-09-24 17:05:01.215 [warning] <0.21979.0> Connection (<0.21979.0>) closing: internal error in channel (<0.21985.0>): {{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,"src/amqp_channel.erl"},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,"src/amqp_channel.erl"},{line,800}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2019-09-24 17:05:01.215 [error] <0.21988.0> ** Generic server <0.21988.0> terminating
** Last message in was {'EXIT',<0.21985.0>,{{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,"src/amqp_channel.erl"},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,"src/amqp_channel.erl"},{line,800}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}
** When Server state == {ch,running,rabbit_framing_amqp_0_9_1,1,<0.21985.0>,<0.21985.0>,<0.21979.0>,<<"80.13.79.15:59648 -> 10.132.0.29:5672">>,rabbit_direct,{lstate,<0.21987.0>,false},none,1,{[],[]},{user,<<"guest">>,[administrator],[{rabbit_auth_backend_internal,none}]},<<"/">>,<<>>,#{<0.15405.0> => {resource,<<"/">>,queue,<<"gruik">>}},{state,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[[<0.15405.0>|#Ref<0.4044318431.962330625.89090>]],[],[],[],[],[],[]}}},erlang},#{<<99,116,97,103,45,0,0,0,0>> => {{amqqueue,{resource,<<"/">>,queue,<<"gruik">>},false,false,none,[],<0.15405.0>,[],[],[],undefined,undefined,[],[],live,0,[],<<"/">>,#{user => <<"guest">>}},{false,65535,false,[{<<"x-credit">>,table,[{<<"credit">>,long,0},{<<"drain">>,bool,false}]}]}}},#{<0.15405.0> => {1,{<<99,116,97,103,45,0,0,0,0>>,nil,nil}}},{set,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[<0.15405.0>],[],[],[],[],[],[]}}},<0.21982.0>,{state,fine,5000,#Ref<0.4044318431.962330625.89278>},false,1,{{0,nil},{0,nil}},[],[],{{0,nil},{0,nil}},[{<<"publisher_confirms">>,bool,true},{<<"exchange_exchange_bindings">>,bool,true},{<<"basic.nack">>,bool,true},{<<"consumer_cancel_notify">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"authentication_failure_close">>,bool,true}],none,65535,none,flow,[]}
** Reason for termination == 
** {{badmatch,{empty,{[],[]}}},[{amqp_channel,rpc_bottom_half,2,[{file,"src/amqp_channel.erl"},{line,623}]},{amqp_channel,handle_method_from_server1,3,[{file,"src/amqp_channel.erl"},{line,800}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2019-09-24 17:05:01.215 [error] <0.21988.0> CRASH REPORT Process <0.21988.0> with 0 neighbours exited with reason: no match of right hand value {empty,{[],[]}} in amqp_channel:rpc_bottom_half/2 line 623 in gen_server2:terminate/3 line 1183
2019-09-24 17:05:01.215 [error] <0.21986.0> Supervisor {<0.21986.0>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.21985.0>, <0.21985.0>, <0.21979.0>, <<"80.13.79.15:59648 -> 10.132.0.29:5672">>, rabbit_framing_amqp_0_9_1, {user,<<"guest">>,[administrator],[{rabbit_auth_backend_internal,none}]}, <<"/">>, [{<<"publisher_confirms">>,bool,true},{<<"exchange_exchange_bindings">>,bool,true},{<<"basic.nack">>,...},...], <0.21982.0>, <0.21987.0>) at <0.21988.0> exit with reason no match of right hand value {empty,{[],[]}} in amqp_channel:rpc_bottom_half/2 line 623 in context child_terminated
2019-09-24 17:05:01.216 [error] <0.21986.0> Supervisor {<0.21986.0>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.21985.0>, <0.21985.0>, <0.21979.0>, <<"80.13.79.15:59648 -> 10.132.0.29:5672">>, rabbit_framing_amqp_0_9_1, {user,<<"guest">>,[administrator],[{rabbit_auth_backend_internal,none}]}, <<"/">>, [{<<"publisher_confirms">>,bool,true},{<<"exchange_exchange_bindings">>,bool,true},{<<"basic.nack">>,...},...], <0.21982.0>, <0.21987.0>) at <0.21988.0> exit with reason reached_max_restart_intensity in context shutdown
2019-09-24 17:05:01.286 [info] <0.21922.0> closing AMQP connection <0.21922.0> (80.13.79.15:59648 -> 10.132.0.29:5672)

Can you please tell me what is going on?

Note that may be not related: My requests are unauthenticated, and the AMQP 1.0 plugin will connect them as the "guest" user with the virtual host "/".

1

1 Answers

0
votes

I'm afraid that rabbitmq and qpid doesn't like each other:

https://github.com/rabbitmq/rabbitmq-amqp1.0

QPid / Proton Java client [2] We have not been able to get this client to get as far as opening a network connection (tested against 0.2 and 0.4).