0

私のmongooseimサーバーからrabbitmqサーバーと通信しようとしています。まず、rabbitmq-client ライブラリ (erlang 用) を apps ディレクトリにコピーし、makefile を更新してから、mongooseim コードを再コンパイルしました。(ここからの指示に従って)。このようにして、エラーなしでコードをコンパイルでき、amqp_client が mongooseim コンソールから開始されたことを確認できます。コンソールから amqp_connection:start() を実行しようとすると、以下のエラーが発生します。これを修正する方法は?

(mongooseim@localhost)8> {ok, Connection} = amqp_connection:start(#amqp_params_network{}).
2015-04-23 15:07:27.320 [debug] <0.790.0> Supervisor {<0.790.0>,amqp_connection_sup} started amqp_connection_type_sup:start_link() at pid <0.791.0>
2015-04-23 15:07:27.324 [debug] <0.790.0> Supervisor {<0.790.0>,amqp_connection_sup} started amqp_gen_connection:start_link(<0.791.0>, {amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,none,[#Fun<amq..>,...],...}) at pid <0.792.0>
** exception exit: {{function_clause,[{amqp_gen_connection,terminate,
                                                           [{undef,[{rabbit_net,connection_string,
                                                                                [#Port<0.6063>,outbound],
                                                                                []},
                                                                    {amqp_network_connection,try_handshake,3,[]},
                                                                    {amqp_gen_connection,handle_call,3,[]},
                                                                    {gen_server,try_handle_call,4,
                                                                                [{file,"gen_server.erl"},{line,607}]},
                                                                    {gen_server,handle_msg,5,
                                                                                [{file,"gen_server.erl"},{line,639}]},
                                                                    {proc_lib,init_p_do_apply,3,
                                                                              [{file,"proc_lib.erl"},{line,237}]}]},
                                                            {<0.791.0>,
                                                             #amqp_params_network{username = <<"guest">>,
                                                                                  password = <<"guest">>,virtual_host = <<"/">>,
                                                                                  host = "localhost",port = 5672,channel_max = 0,
                                                                                  frame_max = 0,heartbeat = 0,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,621}]},
                                      {gen_server,terminate,7,
                                                  [{file,"gen_server.erl"},{line,787}]},
                                      {proc_lib,init_p_do_apply,3,
                                                [{file,"proc_lib.erl"},{line,237}]}]},
                    {gen_server,call,[<0.792.0>,connect,infinity]}}
     in function  gen_server:call/3 (gen_server.erl, line 190)
(mongooseim@localhost)9> 2015-04-23 15:07:27.411 [error] <0.792.0> gen_server <0.792.0> terminated with reason: no function clause matching amqp_gen_connection:terminate({undef,[{rabbit_net,connection_string,[#Port<0.6063>,outbound],[]},{amqp_network_connection,try_handshake,...},...]}, {<0.791.0>,{amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,...}})
2015-04-23 15:07:27.412 [error] <0.792.0> CRASH REPORT Process <0.792.0> with 0 neighbours exited with reason: no function clause matching amqp_gen_connection:terminate({undef,[{rabbit_net,connection_string,[#Port<0.6063>,outbound],[]},{amqp_network_connection,try_handshake,...},...]}, {<0.791.0>,{amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,...}}) in gen_server:terminate/7 line 792
2015-04-23 15:07:27.414 [error] <0.790.0> Supervisor {<0.790.0>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.791.0>, {amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,none,[#Fun<amq..>,...],...}) at <0.792.0> exit with reason no function clause matching amqp_gen_connection:terminate({undef,[{rabbit_net,connection_string,[#Port<0.6063>,outbound],[]},{amqp_network_connection,try_handshake,...},...]}, {<0.791.0>,{amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,...}}) in context child_terminated
2015-04-23 15:07:27.416 [error] <0.790.0> Supervisor {<0.790.0>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.791.0>, {amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,"localhost",5672,0,0,0,infinity,none,[#Fun<amq..>,...],...}) at <0.792.0> exit with reason reached_max_restart_intensity in context shutdown
4

1 に答える 1