<br><br>
<div class="gmail_quote">2011/8/5 Alexandru Scvorţov <span dir="ltr"><<a href="mailto:alexandru@rabbitmq.com">alexandru@rabbitmq.com</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Glad you solved the problem.<br><br>Quick question: what version of RabbitMQ were you using?<br><br></blockquote>
<div> </div>
<div>I forget the version, It might be 0.9.1. It was installed with apt-get install.</div>
<div> </div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Cheers,<br>Alex<br>
<div>
<div></div>
<div class="h5"><br>On Fri, Aug 05, 2011 at 08:48:08PM +0800, Fisher Yu wrote:<br>> Hi,<br>><br>> This problem is solved. It is because the rabbitmq version is too old.<br>> After i updated to last version, it works. Thanks for your help.<br>
><br>> Fisher<br>><br>> 2011/8/4 Alexandru Scvorţov <<a href="mailto:alexandru@rabbitmq.com">alexandru@rabbitmq.com</a>><br>><br>> > Also, could you please post the output of:<br>> > $ ulimit -a<br>
> ><br>> > Alex<br>> ><br>> > On Wed, Aug 03, 2011 at 11:31:27AM +0800, Fisher Yu wrote:<br>> > > 2011/8/2 Alexandru Scvorţov <<a href="mailto:alexandru@rabbitmq.com">alexandru@rabbitmq.com</a>><br>
> > ><br>> > > > Hi,<br>> > > ><br>> > > > > ** Reason for termination ==<br>> > > > > ** {{badmatch,{error,enomem}},<br>> > > > > [{amqp_main_reader,handle_inet_async,2},<br>
> > > > > {gen_server,handle_msg,5},<br>> > > > > {proc_lib,init_p_do_apply,3}]}<br>> > > ><br>> > > > Strictly speaking, that means you've run out of memory. Not sure how<br>
> > > > that could happen, though.<br>> > > ><br>> > > > There's an error in your example:<br>> > > ><br>> > > > > Get = #'basic.get'{queue = Queue},<br>
> > > ><br>> > > > should be<br>> > > ><br>> > > > > Get = #'basic.get'{queue = list_to_binary(Queue)},<br>> > > ><br>> > > > Actually, you'd probably be better off converting Queue to a binary<br>
> > from<br>> > > > the start.<br>> > > ><br>> > ><br>> > > Changed this, thanks.<br>> > ><br>> > ><br>> > > ><br>> > > > Still, the failure is during the initial handshake, so that can't be<br>
> > the<br>> > > > cause.<br>> > > ><br>> > > > Have a look in the server logs: is there a matching error? Is there<br>> > any<br>> > > > mention<br>> > > > of the memory alarms being set off?<br>
> > > ><br>> > ><br>> > > There is nothing happening in the server logs, at least nothing being<br>> > > raised. There is 24G RAM in here, with about 4G active and 11G free at<br>> > the<br>
> > > time of testing.<br>> > ><br>> > ><br>> > ><br>> > > ><br>> > > > What OS are you using? What version of Erlang? Is there anything<br>> > > > special about the system's configuration? Is it under heavy load?<br>
> > > ><br>> > ><br>> > ><br>> > > The distribution is Ubuntu 10.04,<br>> > > uname -a<br>> > > Linux fs21 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011<br>
> > > x86_64 GNU/Linux<br>> > ><br>> > > Erlang version<br>> > > Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:24:24] [rq:24]<br>> > > [async-threads:0] [kernel-poll:false]<br>
> > ><br>> > > This machine is almost completely idle at the moment as it's a<br>> > development<br>> > > server. There is nothing special for the configuration.<br>> > ><br>
> > ><br>> > > ><br>> > > > > I kept get error message while connect to rabbitmq server using<br>> > > > > rabbitmq-erlang-client library. Anyone can help, thanks.<br>> > > ><br>
> > > > Does this mean you *always* get this error? Or only occasionally?<br>> > > ><br>> > ><br>> > > Every time the test case is run, this error is produced.<br>> > ><br>
> > ><br>> > > ><br>> > > > Cheers,<br>> > > > Alex<br>> > > ><br>> > > > On Tue, Aug 02, 2011 at 09:43:46PM +0800, Fisher Yu wrote:<br>> > > > > Hi<br>
> > > > ><br>> > > > > I kept get error message while connect to rabbitmq server using<br>> > > > > rabbitmq-erlang-client library. Anyone can help, thanks.<br>> > > > ><br>
> > > > > Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:24:24] [rq:24]<br>> > > > > [async-threads:0] [kernel-poll:false]<br>> > > > > Eshell V5.8.4 (abort with ^G)<br>> > > > > 1> test:start().<br>
> > > > > =ERROR REPORT==== 2-Aug-2011::08:40:18 ===<br>> > > > > ** Generic server <0.46.0> terminating<br>> > > > > ** Last message in was<br>> > > > > {inet_async,#Port<0.1109>,1,{ok,<<65,77,81,80,1,1,8>>}}<br>
> > > > > ** When Server state == {state,#Port<0.1109>,<0.39.0>,<0.41.0>,<br>> > > > > {method,rabbit_framing_amqp_0_9_1},<br>> > > > > none}<br>
> > > > > ** Reason for termination ==<br>> > > > > ** {{badmatch,{error,enomem}},<br>> > > > > [{amqp_main_reader,handle_inet_async,2},<br>> > > > > {gen_server,handle_msg,5},<br>
> > > > > {proc_lib,init_p_do_apply,3}]}<br>> > > > ><br>> > > > ><br>> > > > ><br>> > > > > %%test.erl<br>> > > > ><br>> > > > > -module(test).<br>
> > > > > -include_lib("amqp_client/include/amqp_client.hrl").<br>> > > > > -compile(export_all).<br>> > > > > start() -><br>> > > > > {ok, Connection} =<br>
> > > > > amqp_connection:start(#amqp_params_network{username= <<"myuser">>,<br>> > > > password=<br>> > > > > <<"mypassword">>}),<br>> > > > > {ok, Channel} = amqp_connection:open_channel(Connection),<br>
> > > > > Queue = "my_queue",<br>> > > > > Declare = #'queue.declare'{queue = list_to_binary(Queue),<br>> > > > > durable=true},<br>> > > > > #'queue.declare_ok'{} = amqp_channel:call(Channel, Declare),<br>
> > > > > Get = #'basic.get'{queue = Queue},<br>> > > > > {#'basic.get_ok'{delivery_tag = Tag}, Content}<br>> > > > > = amqp_channel:call(Channel, Get),<br>
> > > > > io:format("received message ~p", [Content]),<br>> > > > > %% Close the channel<br>> > > > > amqp_channel:close(Channel),<br>> > > > > %% Close the connection<br>
> > > > > amqp_connection:close(Connection),<br>> > > > > ok.<br>> > > ><br>> > > > > _______________________________________________<br>> > > > > rabbitmq-discuss mailing list<br>
> > > > > <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>> > > > > <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
> > > ><br>> > > ><br>> ><br></div></div></blockquote></div><br>