[rabbitmq-discuss] Erlang RabbitMQ Client Error ({error, {aborted, {no_exists, [user, <<"guest">>]}}})

Ben Hood 0x6e6562 at gmail.com
Mon Jun 8 21:19:18 BST 2009


Lynton,

On Mon, Jun 8, 2009 at 6:37 PM, Lynton Grice
<lynton.grice at logosworld.com> wrote:
> But now I am trying to get a connection from an Erlang client and am coming
> up with the following error...
...
>    blog_example_2:test().
>
> ** exception error: no match of right hand side value
>
>                     {error,{aborted,{no_exists,[user,<<"guest">>]}}}
>
>      in function  amqp_connection:start/3
....
> So this is the basic piece of code below (just a snippet for now)....all I
> want to do is open up a connection to the RabbitMQ server...
>
>
>
> test() ->
>
>     User = Password = "guest",
>
>     %% Start a connection to the server
>
>     Connection = amqp_connection:start(User, Password).

This error is misleading because it doesn't tell you what you have
actually done wrong, so there is a bug in the way that errors are
handled which I'll take down and address at some stage.

Your issue is that you are using the start/2 call which is intended to
be used by the direct driver, not the network driver.

If you want to use plain jane networked AMQP, you need to supply the
hostname as a third argument, i.e.

Connection = amqp_connection:start(User, Password, "hostname").

HTH,

Ben




More information about the rabbitmq-discuss mailing list