[rabbitmq-discuss] Set rabbitmq to use in Amazon EC2 with different regions

Pedro Sá da Costa psdc1978 at gmail.com
Tue Jul 23 11:21:05 BST 2013


I had the full netstat result.

$ netstat -plnet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
    User       Inode       PID/Program name
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN
     106        8260        976/epmd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
     0          7917        731/sshd
tcp6       0      0 :::22                   :::*                    LISTEN
     0          7919        731/sshd


On 23 July 2013 10:47, Pedro Sá da Costa <psdc1978 at gmail.com> wrote:

> Hi,
>
> I restate my question: I want to establish AMQP connections from clients
> outside amazon to my broker inside amazon. I tried to configure the cluster
> but I still can't connect to the rabbitmq host. I think the error is "could_not_start_tcp_listener"
> that it is in the logs below. How I set-up the rabbimq in Amazon EC2?
>
> I did the netstat and there isn't any process running on port 5672. I also
> open all the ports in the Security group in Amazon EC2 console. The
> configuration that I have  in /etc/rabbitmq/rabbitmq-env.conf is
>
> :/var/log/rabbitmq$ cat /etc/rabbitmq/rabbitmq-env.conf
> RABBITMQ_NODE_IP_ADDRESS=XX.235.XXX.XXX
>
> Here are the logs in /var/log/rabbitmq dir.
>
>
> :/var/log/rabbitmq$ cat rabbit at ip-10-170-YYY-YYY.log
>
> =INFO REPORT==== 23-Jul-2013::09:26:36 ===
> Starting RabbitMQ 3.1.3 on Erlang R15B01
> Copyright (C) 2007-2013 VMware, Inc.
> Licensed under the MPL.  See http://www.rabbitmq.com/
>
> =INFO REPORT==== 23-Jul-2013::09:26:36 ===
> node           : rabbit at ip-10-170-YYY-YYY
> home dir       : /var/lib/rabbitmq
> config file(s) : (none)
> cookie hash    : rVPtw0Y5kTBT3E/GHFwvsA==
> log            : /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
> sasl log       : /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
> database dir   : /var/lib/rabbitmq/mnesia/rabbit at ip-10-170-YYY-YYY
>
> =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> Limiting to approx 924 file handles (829 sockets)
>
>  =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> Memory limit set to 1499MB of 3749MB total.
>
> =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> Disk free limit set to 1000MB
>
> =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> msg_store_transient: using rabbit_msg_store_ets_index to provide index
>
> =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> msg_store_persistent: using rabbit_msg_store_ets_index to provide index
>
> =ERROR REPORT==== 23-Jul-2013::09:26:37 ===
> failed to start TCP Listener on XX.235.XXX.XXX:5672 - eaddrnotavail (can't
> assign requested address)
>
> =INFO REPORT==== 23-Jul-2013::09:26:37 ===
> Error description:
>    {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}
>
> Log files (may contain more information):
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
>
> Stack trace:
>    [{rabbit_networking,start_listener0,4,[]},
>     {rabbit_networking,'-start_listener/4-lc$^0/1-0-',4,[]},
>     {rabbit_networking,start_listener,4,[]},
>     {rabbit_networking,'-boot_tcp/0-lc$^0/1-0-',1,[]},
>     {rabbit_networking,boot_tcp,0,[]},
>     {rabbit_networking,boot,0,[]},
>     {rabbit,'-run_boot_step/1-lc$^1/1-1-',1,[]},
>     {rabbit,run_boot_step,1,[]}]
>
>
> =INFO REPORT==== 23-Jul-2013::09:26:38 ===
> Error description:
>    {could_not_start,rabbit,
>        {bad_return,
>            {{rabbit,start,[normal,[]]},
>             {'EXIT',
>                 {rabbit,failure_during_boot,
>
> {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}}}}}}
>
> Log files (may contain more information):
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
>
>
>  =ERROR REPORT==== 23-Jul-2013::09:26:38 ===
> ** gen_event handler rabbit_error_logger crashed.
> ** Was installed in error_logger
> ** Last event was: {info_msg,<0.30.0>,
>                     {<0.2.0>,
>                      "Error description:~n   ~p~n~nLog files (may contain
> more information):~n   ~s~n   ~s~n~n",
>                      [{could_not_start,rabbit,
>                        {bad_return,
>                         {{rabbit,start,[normal,[]]},
>                          {'EXIT',
>                           {rabbit,failure_during_boot,
>                            {could_not_start_tcp_listener,
>                             {"XX.235.XXX.XXX",5672}}}}}}},
>                       "/var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log",
>                       "/var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
> "]}}
> ** When handler state == {resource,<<"/">>,exchange,<<"amq.rabbitmq.log">>}
> ** Reason == {badarg,[{ets,lookup,
>                            [rabbit_exchange,
>                             {resource,<<"/">>,exchange,
>                                       <<"amq.rabbitmq.log">>}],
>                            []},
>                       {rabbit_misc,dirty_read,1,[]},
>                       {rabbit_basic,publish,1,[]},
>                       {rabbit_error_logger,publish1,4,[]},
>                       {rabbit_error_logger,handle_event,2,[]},
>                       {gen_event,server_update,4,
>                                  [{file,"gen_event.erl"},{line,504}]},
>                       {gen_event,server_notify,4,
>                                  [{file,"gen_event.erl"},{line,486}]},
>                       {gen_event,handle_msg,5,
>                                  [{file,"gen_event.erl"},{line,248}]}]}
>
>
> :/var/log/rabbitmq$ cat startup_log
>
>               RabbitMQ 3.1.3. Copyright (C) 2007-2013 VMware, Inc.
>   ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
>   ##  ##
>   ##########  Logs: /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
>   ######  ##        /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
>   ##########
>               Starting broker...
>
> BOOT FAILED
> ===========
>
> Error description:
>    {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}
>
> Log files (may contain more information):
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
>
> Stack trace:
>    [{rabbit_networking,start_listener0,4,[]},
>      {rabbit_networking,'-start_listener/4-lc$^0/1-0-',4,[]},
>     {rabbit_networking,start_listener,4,[]},
>     {rabbit_networking,'-boot_tcp/0-lc$^0/1-0-',1,[]},
>     {rabbit_networking,boot_tcp,0,[]},
>     {rabbit_networking,boot,0,[]},
>     {rabbit,'-run_boot_step/1-lc$^1/1-1-',1,[]},
>     {rabbit,run_boot_step,1,[]}]
>
>
>
> BOOT FAILED
> ===========
>
> Error description:
>    {could_not_start,rabbit,
>        {bad_return,
>            {{rabbit,start,[normal,[]]},
>             {'EXIT',
>                 {rabbit,failure_during_boot,
>
> {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}}}}}}
>
> Log files (may contain more information):
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY.log
>    /var/log/rabbitmq/rabbit at ip-10-170-YYY-YYY-sasl.log
>
> {"init terminating in
> do_boot",{rabbit,failure_during_boot,{could_not_start,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot,{could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}}}}}}}}
>
> Thanks,
>
>
> On 22 July 2013 20:09, Matthias Radestock <matthias at rabbitmq.com> wrote:
>
>> Pedro,
>>
>>
>> On 22/07/13 18:38, Pedro Sá da Costa wrote:
>>
>>> I am trying to configure rabbitmq with EC2. The rabbitmq works when it
>>> uses the private IP, but when I try to use the public IP, I can't start
>>> the rabbitmq.
>>>
>>
>> Inspecting the log files, as suggested by...
>>
>>
>>  Log files (may contain more information):
>>>     /var/log/rabbitmq/rabbit at ip-**10-170-74-198.log
>>>     /var/log/rabbitmq/rabbit at ip-**10-170-74-198-sasl.log
>>>
>>
>> ...might offer some clues as to what went wrong.
>>
>> Matthias.
>>
>
>
>
> --
> Best regards,
>



-- 
Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130723/6e51a185/attachment.htm>


More information about the rabbitmq-discuss mailing list