amqp_client 라이브러리를 사용하여 rabbitmq에 연결하려고합니다. 제공된 단계를 따랐습니다 here.Rabbitmq 클라이언트에서 오류가 발생했습니다.
내 rabbitmq 버전은 RabbitMQ 3.5.7, Erlang 18.3입니다. 그래서 https://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.5.7/에서 각각의 파일을 다운로드했습니다. "/ usr/lib/erlang/lib /"경로에 압축이 풀립니다. 다음 얼랑 쉘에서 나는 어떤 충돌 보고서
=ERROR REPORT==== 3-Feb-2017::18:55:10 ===
** Generic server <0.99.0> terminating
** Last message in was connect
** When Server state == {<0.98.0>,
{amqp_params_network,<<"guest">>,<<"guest">>,
<<"/">>,"localhost",5672,0,0,10,infinity,none,
[#Fun<amqp_auth_mechanisms.plain.3>,
#Fun<amqp_auth_mechanisms.amqplain.3>],
[],[]}}
** Reason for termination ==
** {function_clause,
[{amqp_gen_connection,terminate,
[{undef,
[{rabbit_misc,ntoab,[{127,0,0,1}],[]},
{rabbit_net,connection_string,2,[]},
{amqp_network_connection,try_handshake,3,[]},
{amqp_gen_connection,handle_call,3,[]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,629}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,661}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,240}]}]},
{<0.98.0>,
{amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,
"localhost",5672,0,0,10,infinity,none,
[#Fun<amqp_auth_mechanisms.plain.3>,
#Fun<amqp_auth_mechanisms.amqplain.3>],
[],[]}}],
[]},
{gen_server,try_terminate,3,[{file,"gen_server.erl"},{line,643}]},
{gen_server,terminate,7,[{file,"gen_server.erl"},{line,809}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
** exception exit: {{function_clause,
[{amqp_gen_connection,terminate,
[{undef,
[{rabbit_misc,ntoab,[{127,0,0,1}],[]},
{rabbit_net,connection_string,2,[]},
{amqp_network_connection,try_handshake,3,[]},
{amqp_gen_connection,handle_call,3,[]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,629}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,661}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,240}]}]},
{<0.98.0>,
#amqp_params_network{
username = <<"guest">>,password = <<"guest">>,
virtual_host = <<"/">>,host = "localhost",port = 5672,
channel_max = 0,frame_max = 0,heartbeat = 10,
connection_timeout = infinity,ssl_options = none,
auth_mechanisms =
[#Fun<amqp_auth_mechanisms.plain.3>,
#Fun<amqp_auth_mechanisms.amqplain.3>],
client_properties = [],socket_options = []}}],
[]},
{gen_server,try_terminate,3,
[{file,"gen_server.erl"},{line,643}]},
{gen_server,terminate,7,
[{file,"gen_server.erl"},{line,809}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,240}]}]},
{gen_server,call,[<0.99.0>,connect,infinity]}}
in function gen_server:call/3 (gen_server.erl, line 212)
나는이 오류가 무엇입니까 왜 점점 아니에요있어이 단계에서는
application:start(xmerl).
application:start(amqp_client).
application:start(rabbit_common).
rr("/usr/lib/erlang/lib/amqp_client-3.5.7/include/amqp_client.hrl").
#amqp_params_network{}.
{ok, Connection} = amqp_connection:start(#amqp_params_network{port=5672}).
아래처럼 시작?
매우 유사하다. 나는 소스 코드를 가져 와서 잘 작동한다. – rajesh6115