[rabbitmq-discuss] Erlang Client
Colin Clark
colin at cloudeventprocessing.com
Thu Apr 8 03:08:59 BST 2010
Thank you everyone for your help - I started from scratch and all is
fine now.
On 4/7/2010 1:35 PM, Matthew Sackman wrote:
> 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").
> ['P_access','P_basic','P_channel','P_connection','P_dtx',
> 'P_exchange','P_file','P_queue','P_stream','P_test',
> 'P_tunnel','P_tx','access.request','access.request_ok',
> amqp_error,amqp_msg,amqp_params,amqqueue,'basic.ack',
> 'basic.cancel','basic.cancel_ok','basic.consume',
> 'basic.consume_ok','basic.deliver','basic.get',
> 'basic.get_empty','basic.get_ok','basic.publish',
> 'basic.qos'|...]
> 2> Conn = amqp_connection:start_network_link(#amqp_params{}).
> <0.44.0>
>
> =INFO REPORT==== 7-Apr-2010::19:35:05 ===
> Negotiated maximums: (Channel = 0, Frame= 131072, Heartbeat=0)
> 3>
>
> It's likely just the ERL_LIBS=deps:dist bit your missing, would be my
> guess.
>
> Matthew
>
--
Colin
+1 701 659 0115 cell
+1 701 212 4314 office
http://blog.cloudeventprocessing.com
http://twitter.com/EventCloudPro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100407/ea19925f/attachment.htm
More information about the rabbitmq-discuss
mailing list