Stomp adapter connection failure

1,035 views
Skip to first unread message

Jeroen

unread,
Nov 20, 2015, 9:42:20 AM11/20/15
to rabbitmq-users
Hello,

I installed latest version of RabbitMQ and enabled the stomp plugin.
RabbitMQ 3.5.6, Erlang 18.1
Apache NMS Stomp 1.5.1.2739

I'm having problems authenticating however.
I keep getting "STOMP login failed - access_refused (vhost access not allowed)" message.

I managed to connect but logging in fails.

I'm not using the guest account. Both "/" and specific virtual hosts do not seem to work out.
I use the Apache NMS stomp library to create the connection from C# code.

In RabbitMQ I added a user with administer and ".*" regexps for configure, read and write.

I even tried configuring loopback users in RabbitMQ.

I'm trying to connect to a remote machine via internet.

Any ideas?

Regards,

Jeroen

Michael Klishin

unread,
Nov 20, 2015, 9:54:04 AM11/20/15
to rabbitm...@googlegroups.com
What commands exactly did you execute
and what's in the log files?
--
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 post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeroen

unread,
Nov 21, 2015, 3:25:09 AM11/21/15
to rabbitmq-users
Wireshark client side:

CONNECT

accept-version:1.0,1.1

heart-beat:10000,30000

host:xxx.xxx.xxx.xxx

client-id:ID:xxxxxxxxxx-0:0

login:admin

passcode:xxxxxxx


.ERROR

message:Bad CONNECT

content-type:text/plain

version:1.0,1.1,1.2

content-length:43


Virtual host 'xxx.xxx.xxx.xxx' access denied.


Logging on server:

=INFO REPORT==== 20-Nov-2015::17:10:39 ===
accepting STOMP connection <0.364.0> (xxx.xxx.xxx.xxx:xxx -> 10.1.0.4:61613)

=WARNING REPORT==== 20-Nov-2015::17:10:40 ===
STOMP login failed - access_refused (vhost access not allowed)

=ERROR REPORT==== 20-Nov-2015::17:10:40 ===
STOMP error frame sent:
Message: "Bad CONNECT"
Detail: "Virtual host xxx.xxx.xxx.xxx' access denied"
Server private detail: none

=INFO REPORT==== 20-Nov-2015::17:11:31 ===
closing STOMP connection <0.364.0> (xxx.xxx.xxx.xxx:33869 -> 10.1.0.4:61613)


Op vrijdag 20 november 2015 15:42:20 UTC+1 schreef Jeroen:

Jeroen

unread,
Nov 21, 2015, 3:34:17 AM11/21/15
to rabbitmq-users
Found the problem;
as the log indicates; I have to configure the virtual host in RabbitMQ.

Thanks, Jeroen

Op vrijdag 20 november 2015 15:54:04 UTC+1 schreef Michael Klishin:

Michael Klishin

unread,
Nov 21, 2015, 7:22:55 AM11/21/15
to rabbitm...@googlegroups.com, Jeroen
On 21 November 2015 at 11:34:20, Jeroen (vdsc...@gmail.com) wrote:
> Found the problem;
> as the log indicates; I have to configure the virtual host in RabbitMQ.

As explained in the Connect sub-section in http://www.rabbitmq.com/stomp.html,
it can be done via a header (`host`) or RabbitMQ configuration (system-wide). 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Jeroen

unread,
Nov 22, 2015, 2:55:26 AM11/22/15
to rabbitmq-users, vdsc...@gmail.com
Hi Michael,

thanks for your reply.

I trying to change the host header that Apache NMS stomp C# library places in the request.
Just added it as a path to the URI like stomp:tcp://hostname:port/virtualhost
does not work out passing it to the ConnectionFactory
I'm afraid I cannot set this host header to the virtual host using this client library.

Am I mistaken?

Regards, Jeroen


Op zaterdag 21 november 2015 13:22:55 UTC+1 schreef Michael Klishin:

Michael Klishin

unread,
Nov 22, 2015, 7:49:13 AM11/22/15
to rabbitm...@googlegroups.com, Jeroen
On 22 November 2015 at 10:55:29, Jeroen (vdsc...@gmail.com) wrote:
> I'm afraid I cannot set this host header to the virtual host using
> this client library.
> See: http://activemq.apache.org/nms/stomp-uri-configuration.html
>
> Am I mistaken?

I’m not familiar with Apache NMS clients. If you only need to use a single vhost,
it’s perfectly fine to configure it system-wide .
Reply all
Reply to author
Forward
0 new messages