Exception was thrown: ERROR: Error while creating qpid consumer: Can't authenticate using PLAIN

454 views
Skip to first unread message

Mesrop Bozoyan

unread,
Feb 1, 2022, 6:57:24 AM2/1/22
to rabbitmq-users
Hi everyone,

I wonder is somewhen is familiar with the exception. It appears when trying to authenticate with PLAIN. here is the log:

2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::canEncode(): 1 || 0
2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::canEncode(): 1 || 0
2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::encode(65535): 8
2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::canEncode(): 0 || 0
2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::decode(8): 8
2022-02-01 15:44:55 [Security] trace Reading SASL frame of size 52
2022-02-01 15:44:55 [Security] trace Reading SASL-MECHANISMS
2022-02-01 15:44:55 [Security] trace tcp:192.168.0.214:5672 Sasl::decode(52): 52
Exception was thrown: ERROR: Error while creating qpid consumer: Can't authenticate using PLAIN

Thank you in advance.
 

Mesrop Bozoyan

unread,
Feb 1, 2022, 7:00:47 AM2/1/22
to rabbitmq-users
The exception was thrown when running the code on Linux. The same code ran on windows without any problem. 

Wes Peng

unread,
Feb 1, 2022, 7:49:30 AM2/1/22
to rabbitm...@googlegroups.com
The SSL port should be 5671 instead.

Thanks 

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/9cd95e52-a693-44e9-ac5c-c17064053a75n%40googlegroups.com.

Mesrop Bozoyan

unread,
Feb 1, 2022, 8:34:38 AM2/1/22
to rabbitmq-users
Hi, Wes Peng,

Thank you for your response.
Are you sure?
I have this when running rabbitmqctl status:
Listeners

Interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: [::], port: 15672, protocol: http, purpose: HTTP API 

Wes Peng

unread,
Feb 1, 2022, 9:18:31 AM2/1/22
to rabbitm...@googlegroups.com
The sasl doc says

Both the Qpid broker and Qpid clients use the Cyrus SASL library, a full-featured authentication framework, which offers many configuration options. This section shows how to configure users for authentication with SASL, which is sufficient when using SASL PLAIN. If you are not using SSL, you should configure SASL to use CRAM-MD5DIGEST-MD5, or GSSAPI (which provides Kerberos authentication). For information on configuring these and other options in SASL, see the Cyrus SASL documentation.

So I am guessing you want to have ssl enabled.

Thanks 

Mesrop Bozoyan

unread,
Feb 2, 2022, 3:28:00 AM2/2/22
to rabbitmq-users
Hi Wes,
ssl was enabled:
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: 127.0.0.1, port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: [::1], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: [::], port: 5671, protocol: amqp/ssl, purpose: AMQP 0-9-1 and AMQP 1.0 over TLS
Interface: 0.0.0.0, port: 5671, protocol: amqp/ssl, purpose: AMQP 0-9-1 and AMQP 1.0 over TLS

Another exception raised:
2022-02-02 12:20:33 [Security] trace tcp:localhost:5671 Sasl::canEncode(): 1 || 0
2022-02-02 12:20:33 [Security] trace tcp:localhost:5671 Sasl::canEncode(): 1 || 0
2022-02-02 12:20:33 [Security] trace tcp:localhost:5671 Sasl::encode(65535): 8
2022-02-02 12:20:33 [Security] trace tcp:localhost:5671 Sasl::canEncode(): 0 || 0
Exception was thrown: ERROR: Error while creating qpid consumer: Connect failed to amqp:tcp:localhost:5671: Reconnect disabled

Mesrop Bozoyan

unread,
Feb 2, 2022, 3:28:41 AM2/2/22
to rabbitmq-users
sorry for bothering

Wes Peng

unread,
Feb 2, 2022, 4:54:52 AM2/2/22
to rabbitm...@googlegroups.com
We need more details for the SSL -v output.
Such as client and server use different SSL protocol (SSL v3, TLS v2 etc) can cause the issue.
And tried disabling peer verification on both sides.
You want to reference this as well:
Thanks 


Reply all
Reply to author
Forward
0 new messages