<div dir="ltr">I had the full netstat result.<div><br></div><div><div>$ netstat -plnet</div><div>Active Internet connections (only servers)</div><div>Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name</div>
<div>tcp 0 0 <a href="http://0.0.0.0:4369">0.0.0.0:4369</a> 0.0.0.0:* LISTEN 106 8260 976/epmd </div><div>tcp 0 0 <a href="http://0.0.0.0:22">0.0.0.0:22</a> 0.0.0.0:* LISTEN 0 7917 731/sshd </div>
<div>tcp6 0 0 :::22 :::* LISTEN 0 7919 731/sshd </div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 July 2013 10:47, Pedro Sá da Costa <span dir="ltr"><<a href="mailto:psdc1978@gmail.com" target="_blank">psdc1978@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I restate my question: I want to e<span style="line-height:19px;text-align:justify">stablish AMQP connections from </span><span style="line-height:19px;text-align:justify">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 "</span>could_not_start_tcp_listener" that it is in the logs below. How I set-up the rabbimq in Amazon EC2?</div>
<div><br></div>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<div>
<br></div><div><div>:/var/log/rabbitmq$ cat /etc/rabbitmq/rabbitmq-env.conf</div><div>RABBITMQ_NODE_IP_ADDRESS=XX.235.XXX.XXX</div><div><br></div><div>Here are the logs in /var/log/rabbitmq dir.</div><div><br></div>
<div><div><br></div><div>:/var/log/rabbitmq$ cat rabbit@ip-10-170-YYY-YYY.log </div><div><br></div><div>=INFO REPORT==== 23-Jul-2013::09:26:36 ===</div><div>Starting RabbitMQ 3.1.3 on Erlang R15B01</div><div class="im"><div>
Copyright (C) 2007-2013 VMware, Inc.</div>
</div><div class="im"><div>Licensed under the MPL. See <a href="http://www.rabbitmq.com/" target="_blank">http://www.rabbitmq.com/</a></div><div><br></div></div><div>=INFO REPORT==== 23-Jul-2013::09:26:36 ===</div><div>
node : rabbit@ip-10-170-YYY-YYY</div>
<div>home dir : /var/lib/rabbitmq</div><div>config file(s) : (none)</div><div>cookie hash : rVPtw0Y5kTBT3E/GHFwvsA==</div><div>log : /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div><div>sasl log : /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div>
<div>database dir : /var/lib/rabbitmq/mnesia/rabbit@ip-10-170-YYY-YYY</div><div><br></div><div>=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div><div>Limiting to approx 924 file handles (829 sockets)</div><div><br></div>
<div>
=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div><div>Memory limit set to 1499MB of 3749MB total.</div><div><br></div><div>=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div><div>Disk free limit set to 1000MB</div><div><br></div>
<div>=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div><div>msg_store_transient: using rabbit_msg_store_ets_index to provide index</div><div><br></div><div>=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div><div>msg_store_persistent: using rabbit_msg_store_ets_index to provide index</div>
<div><br></div><div>=ERROR REPORT==== 23-Jul-2013::09:26:37 ===</div><div>failed to start TCP Listener on XX.235.XXX.XXX:5672 - eaddrnotavail (can't assign requested address)</div><div><br></div><div>=INFO REPORT==== 23-Jul-2013::09:26:37 ===</div>
<div>Error description:</div><div> {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}</div><div class="im"><div><br></div><div>Log files (may contain more information):</div></div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div>
<div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div><div class="im"><div><br></div><div>Stack trace:</div><div> [{rabbit_networking,start_listener0,4,[]},</div><div> {rabbit_networking,'-start_listener/4-lc$^0/1-0-',4,[]},</div>
<div> {rabbit_networking,start_listener,4,[]},</div><div> {rabbit_networking,'-boot_tcp/0-lc$^0/1-0-',1,[]},</div><div> {rabbit_networking,boot_tcp,0,[]},</div><div> {rabbit_networking,boot,0,[]},</div>
<div> {rabbit,'-run_boot_step/1-lc$^1/1-1-',1,[]},</div><div> {rabbit,run_boot_step,1,[]}]</div><div><br></div><div><br></div></div><div>=INFO REPORT==== 23-Jul-2013::09:26:38 ===</div><div class="im"><div>
Error description:</div>
<div> {could_not_start,rabbit,</div><div> {bad_return,</div><div> {{rabbit,start,[normal,[]]},</div><div> {'EXIT',</div><div> {rabbit,failure_during_boot,</div></div><div>
{could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}}}}}}</div><div class="im">
<div><br></div><div>Log files (may contain more information):</div></div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div><div><br></div><div><br>
</div>
<div>=ERROR REPORT==== 23-Jul-2013::09:26:38 ===</div><div>** gen_event handler rabbit_error_logger crashed.</div><div>** Was installed in error_logger</div><div>** Last event was: {info_msg,<0.30.0>,</div><div> {<0.2.0>,</div>
<div> "Error description:~n ~p~n~nLog files (may contain more information):~n ~s~n ~s~n~n",</div><div> [{could_not_start,rabbit,</div><div class="im"><div> {bad_return,</div>
<div> {{rabbit,start,[normal,[]]},</div><div> {'EXIT',</div><div> {rabbit,failure_during_boot,</div><div> {could_not_start_tcp_listener,</div>
</div><div> {"XX.235.XXX.XXX",5672}}}}}}},</div><div> "/var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log",</div><div> "/var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log"]}}</div>
<div>** When handler state == {resource,<<"/">>,exchange,<<"amq.rabbitmq.log">>}</div><div>** Reason == {badarg,[{ets,lookup,</div><div> [rabbit_exchange,</div>
<div> {resource,<<"/">>,exchange,</div><div> <<"amq.rabbitmq.log">>}],</div><div> []},</div>
<div> {rabbit_misc,dirty_read,1,[]},</div><div> {rabbit_basic,publish,1,[]},</div><div> {rabbit_error_logger,publish1,4,[]},</div><div> {rabbit_error_logger,handle_event,2,[]},</div>
<div> {gen_event,server_update,4,</div><div> [{file,"gen_event.erl"},{line,504}]},</div><div> {gen_event,server_notify,4,</div><div> [{file,"gen_event.erl"},{line,486}]},</div>
<div> {gen_event,handle_msg,5,</div><div> [{file,"gen_event.erl"},{line,248}]}]}</div><div><br></div><div><br></div><div>:/var/log/rabbitmq$ cat startup_log </div>
<div class="im">
<div><br></div><div> RabbitMQ 3.1.3. Copyright (C) 2007-2013 VMware, Inc.</div><div> ## ## Licensed under the MPL. See <a href="http://www.rabbitmq.com/" target="_blank">http://www.rabbitmq.com/</a></div>
<div> ## ##</div>
</div><div> ########## Logs: /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div><div> ###### ## /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div><div class="im"><div> ##########</div><div> Starting broker...</div>
<div><br></div><div>BOOT FAILED</div><div>===========</div><div><br></div><div>Error description:</div></div><div> {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}</div><div class="im"><div><br></div><div>
Log files (may contain more information):</div>
</div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div><div class="im"><div><br></div><div>Stack trace:</div><div> [{rabbit_networking,start_listener0,4,[]},</div>
<div>
{rabbit_networking,'-start_listener/4-lc$^0/1-0-',4,[]},</div><div> {rabbit_networking,start_listener,4,[]},</div><div> {rabbit_networking,'-boot_tcp/0-lc$^0/1-0-',1,[]},</div><div> {rabbit_networking,boot_tcp,0,[]},</div>
<div> {rabbit_networking,boot,0,[]},</div><div> {rabbit,'-run_boot_step/1-lc$^1/1-1-',1,[]},</div><div> {rabbit,run_boot_step,1,[]}]</div><div><br></div><div><br></div><div><br></div><div>BOOT FAILED</div>
<div>===========</div><div><br></div><div>Error description:</div><div> {could_not_start,rabbit,</div><div> {bad_return,</div><div> {{rabbit,start,[normal,[]]},</div><div> {'EXIT',</div>
<div> {rabbit,failure_during_boot,</div></div><div> {could_not_start_tcp_listener,{"XX.235.XXX.XXX",5672}}}}}}}</div><div class="im"><div><br></div><div>Log files (may contain more information):</div>
</div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY.log</div><div> /var/log/rabbitmq/rabbit@ip-10-170-YYY-YYY-sasl.log</div><div><br></div><div>{"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}}}}}}}}}</div>
</div><div><br></div></div><div>Thanks,</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On 22 July 2013 20:09, Matthias Radestock <span dir="ltr"><<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Pedro,<div><br>
<br>
On 22/07/13 18:38, Pedro Sá da Costa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to configure rabbitmq with EC2. The rabbitmq works when it<br>
uses the private IP, but when I try to use the public IP, I can't start<br>
the rabbitmq.<br>
</blockquote>
<br></div>
Inspecting the log files, as suggested by...<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Log files (may contain more information):<br>
/var/log/rabbitmq/rabbit@ip-<u></u>10-170-74-198.log<br>
/var/log/rabbitmq/rabbit@ip-<u></u>10-170-74-198-sasl.log<br>
</blockquote>
<br></div>
...might offer some clues as to what went wrong.<span><font color="#888888"><br>
<br>
Matthias.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Best regards,<br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards,<br>
</div>