[rabbitmq-discuss] Erlang Client

Matthew Sackman matthew at lshift.net
Wed Apr 7 19:35:58 BST 2010

Hi Colin,

On Wed, Apr 07, 2010 at 01:27:01PM -0500, Colin Clark wrote:
> I'm having difficulty getting the Erlang client to connect to a
> rabbitmq server - I'm using the stocks_example and the latest erlang
> client code and attempting to run within erlide.  The error message
> I'm getting is:
> 10> stocks_example:start().
> ** exception error: no match of right hand side value
>                     {error,
>                         {undef,
>                             [{rabbit_net,send,
>                                  [#Port<0.527>,<<65,77,81,80,1,1,8,0>>]},
>                              {amqp_network_connection,do_handshake,1},
>                              {amqp_network_connection,init,1},
>                              {gen_server,init_it,6},
>                              {proc_lib,init_p_do_apply,3}]}}
>      in function  amqp_connection:start_network_internal/2
>      in call from stocks_example:amqp_lifecycle/0
> If anyone could point me in the right direction, I'd appreciate it.

I suspect you're missing the rabbit_common package on your path. If you
build the erlang client then you should find in the dist directory the
rabbit_common directory and .ez. Then:

ERL_LIBS=deps:dist erl -pa ebin

should work:

> ERL_LIBS=deps:dist erl -pa ebin
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1> rr("include/amqp_client.hrl").
2> Conn = amqp_connection:start_network_link(#amqp_params{}).

=INFO REPORT==== 7-Apr-2010::19:35:05 ===
Negotiated maximums: (Channel = 0, Frame= 131072, Heartbeat=0)

It's likely just the ERL_LIBS=deps:dist bit your missing, would be my


More information about the rabbitmq-discuss mailing list