Connecting to RabbitMQ server from MongooseIM

Home Forums MongooseIM Connecting to RabbitMQ server from MongooseIM

Tagged: 

This topic contains 0 replies, has 1 voice, and was last updated by  dodul 4 days, 2 hours ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #57626

    dodul
    Member

    I am trying to communicate with a rabbitmq server from my mongooseim server. For that first I copied rabbitmq-client library (for erlang) to my apps directory, updated my makefile and then recompiled mongooseim code. This way I can compile the code with no error and can see amqp_client has been started from mongooseim console. Now when I try to run amqp_connection:start() from the console I get the below error. How to fix this?

    
    (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
    
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.