> a) Should a STOMP client always close connection and reconnect
> if it receives an ERROR frame (maybe only "Processing error"s?
Yes but clients ideally should have a sensible number of attempts before
they give up.
> b) Is it an error inside the STOMP plugin on RabbitMQ? Should it
> have also shutdown the connection or should it not have shutdown
> the channel at all?
If RabbitMQ cannot authorise an operation, it should
notify the client (in protocols that have authorisation notifications for clients, e.g. STOMP)
or drop the connection (in less, ahem, well thought out protocols, e.g. MQTT).
However, per STOMP 1.2 spec [1] the server must close connection. If that doesn't happen
or RabbitMQ does not release its underlying "internal connection", those are definitely considered
bugs by our team.
Please take a look at RabbitMQ log files, there should be errors logged. Understanding what exactly
they are would help us reproduce the issue quicker.
http://www.rabbitmq.com/changelog.html
I so far cannot reproduce the problem (I'm not using LDAP but there are ways to inject exceptions
around authorisation without it). What's in your log files (both regular and SASL) when the issue happens?
=INFO REPORT==== 23-Jan-2015::12:11:47 ===accepting STOMP connection <0.12481.59> (105.167.7.6:41677 -> 192.168.30.8:15677)=INFO REPORT==== 23-Jan-2015::12:11:47 ===LDAP CHECK: login for 0080F48F80A1=INFO REPORT==== 23-Jan-2015::12:11:47 ===LDAP filling template "macAddress=${username},ou=group,o=acme" with[{username,<<"0080F48F80A1">>}]=INFO REPORT==== 23-Jan-2015::12:11:47 ===LDAP template result: "macAddress=0080F48F80A1,ou=group,o=acme"=ERROR REPORT==== 23-Jan-2015::12:11:49 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:50 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.13667.56>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:51 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.22517.57>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:52 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:52 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.9976.59>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:53 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.8894.57>,next_publish_seqno,infinity]}}=ERROR REPORT==== 23-Jan-2015::12:11:55 ===STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}=INFO REPORT==== 23-Jan-2015::12:11:56 ===closing STOMP connection <0.12481.59> (105.167.7.6:41677 -> 192.168.30.8:15677)
=INFO REPORT==== 23-Jan-2015::12:12:45 ===accepting STOMP connection <0.12557.59> (105.167.7.6:41693 -> 192.168.30.8:15677)=INFO REPORT==== 23-Jan-2015::12:12:45 ===
LDAP CHECK: login for 0080F48F80A1
=INFO REPORT==== 23-Jan-2015::12:12:45 ===
LDAP filling template "macAddress=${username},ou=group,o=acme" with[{username,<<"0080F48F80A1">>}]
=INFO REPORT==== 23-Jan-2015::12:12:45 ===LDAP template result: "macAddress=0080F48F80A1,ou=group,o=acme"=ERROR REPORT==== 23-Jan-2015::12:12:46 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}
=ERROR REPORT==== 23-Jan-2015::12:12:49 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}
=ERROR REPORT==== 23-Jan-2015::12:12:50 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.13667.56>,next_publish_seqno,infinity]}}
=ERROR REPORT==== 23-Jan-2015::12:12:51 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.22517.57>,next_publish_seqno,infinity]}}
=ERROR REPORT==== 23-Jan-2015::12:12:52 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.19248.58>,next_publish_seqno,infinity]}}
=ERROR REPORT==== 23-Jan-2015::12:12:52 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.9976.59>,next_publish_seqno,infinity]}}
=INFO REPORT==== 23-Jan-2015::12:12:53 ===LDAP connect error: {error,"connect failed"}=INFO REPORT==== 23-Jan-2015::12:12:53 ===LDAP DECISION: login for 0080F48F80A1: {error,"connect failed"}=WARNING REPORT==== 23-Jan-2015::12:12:53 ===STOMP login failed for user "0080F48F80A1"=ERROR REPORT==== 23-Jan-2015::12:12:53 ===STOMP error frame sent:Message: "Bad CONNECT"Detail: "Access refused for user '0080F48F80A1'\n"Server private detail: none=ERROR REPORT==== 23-Jan-2015::12:12:53 ===
STOMP error frame sent:Message: "Processing error"Detail: "Processing error"Server private detail: {noproc,{gen_server,call,[<0.8894.57>,next_publish_seqno,infinity]}}
=INFO REPORT==== 23-Jan-2015::12:12:54 ===closing STOMP connection <0.12557.59> (105.167.7.6:41693 -> 192.168.30.8:15677)
This means the error was handled and an ERROR frame was sent. For me the connection STOMP plugin uses is then closed (per management UI). Are you observations different or you observe that STOMP *client*'s TCP connection is still open (I know, this is a bit confusing: RabbitMQ STOMP plugin builds on top of RabbitMQ's core protocol and thus acts as a "smart proxy").
Thanks, we'll investigate more.
1) Why does RabbitMQ even shutdown the channel when it can't anymore connect to LDAP to verify client has access to the given queue that it has subscribed for? Wouldn't it be better to just send out an ERROR frame with message "Unauthorized" or "Authorization failed"? I understand (and agrees) that it should not tell client anything about LDAP, just send an error.
If building is too much an effort but you can give this development version a try in your dev/QA
environment, I can also upload a compiled version to the list.
Otherwise I'll try setting up LDAP locally to properly reproduce the issue with and without our changes.
Thank you.
Hi Michael,If building is too much an effort but you can give this development version a try in your dev/QA
environment, I can also upload a compiled version to the list.if I could have you compile it and give me a URL to download it from I will be able to install it on monday or tuesday and test the same day and give feedback. That would be awsome.
Have you had a chance to try this build?
Yes, no connections left open for me.
Updated: http://www.rabbitmq.com/release-notes/README-3.4.4.txt.