I figured out howto supply login credentials in python. This is the code to put in both send.py and receive.py (change user and password)<div><br></div><div><div>credentials = pika.PlainCredentials('test', 'test')</div><div>parameters = pika.ConnectionParameters(credentials=credentials)</div><div>connection = pika.BlockingConnection(parameters)<br></div><div><br></div><div>/BR</div><div>Jonas</div><br>Den tisdagen den 13:e mars 2012 kl. 11:34:49 UTC+1 skrev Jonas Colmsjo:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Thank's for answering!<div><br></div><div>The MQ server is running on a Amazon EC2 server. This is the server I try to access both locally and remotely.</div><div><br></div><div>How is authentication performed? I was hoping authentication wasn't needed when running from localhost. Maybe this isn't true?</div><div>I see in the administration console that I can add users...</div><div><br></div><div>The result of the commands is listed here:</div><div><br></div><div><div>Status of node 'rabbit@rabbit-1' ...</div><div>[{pid,1450},</div><div>&nbsp;{running_applications,</div><div>&nbsp; &nbsp; &nbsp;[{rabbitmq_management_agent,"<wbr>RabbitMQ Management Agent","2.7.1"},</div><div>&nbsp; &nbsp; &nbsp; {rabbit,"RabbitMQ","2.7.1"},</div><div>&nbsp; &nbsp; &nbsp; {mnesia,"MNESIA &nbsp;CXC 138 12","4.4.12"},</div><div>&nbsp; &nbsp; &nbsp; {os_mon,"CPO &nbsp;CXC 138 46","2.2.4"},</div><div>&nbsp; &nbsp; &nbsp; {sasl,"SASL &nbsp;CXC 138 11","2.1.8"},</div><div>&nbsp; &nbsp; &nbsp; {stdlib,"ERTS &nbsp;CXC 138 10","1.16.4"},</div><div>&nbsp; &nbsp; &nbsp; {kernel,"ERTS &nbsp;CXC 138 10","2.13.4"}]},</div><div>&nbsp;{os,{unix,linux}},</div><div>&nbsp;{erlang_version,</div><div>&nbsp; &nbsp; &nbsp;"Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:30] [hipe] [kernel-poll:true]\n"},</div><div>&nbsp;{memory,</div><div>&nbsp; &nbsp; &nbsp;[{total,12970072},</div><div>&nbsp; &nbsp; &nbsp; {processes,4968776},</div><div>&nbsp; &nbsp; &nbsp; {processes_used,4959720},</div><div>&nbsp; &nbsp; &nbsp; {system,8001296},</div><div>&nbsp; &nbsp; &nbsp; {atom,737045},</div><div>&nbsp; &nbsp; &nbsp; {atom_used,727811},</div><div>&nbsp; &nbsp; &nbsp; {binary,62256},</div><div>&nbsp; &nbsp; &nbsp; {code,6077475},</div><div>&nbsp; &nbsp; &nbsp; {ets,377668}]},</div><div>&nbsp;{vm_memory_high_watermark,0.<wbr>3999999997777084},</div><div>&nbsp;{vm_memory_limit,719775334}]</div><div>...done.</div><div><br></div><div><div>root@rabbit-1:~# rabbitmqctl report</div><div>Reporting server status on {{2012,3,13},{10,28,54}}</div><div><br></div><div>Status of node 'rabbit@rabbit-1' ...</div><div>[{pid,1450},</div><div>&nbsp;{running_applications,</div><div>&nbsp; &nbsp; &nbsp;[{rabbitmq_management_agent,"<wbr>RabbitMQ Management Agent","2.7.1"},</div><div>&nbsp; &nbsp; &nbsp; {rabbit,"RabbitMQ","2.7.1"},</div><div>&nbsp; &nbsp; &nbsp; {mnesia,"MNESIA &nbsp;CXC 138 12","4.4.12"},</div><div>&nbsp; &nbsp; &nbsp; {os_mon,"CPO &nbsp;CXC 138 46","2.2.4"},</div><div>&nbsp; &nbsp; &nbsp; {sasl,"SASL &nbsp;CXC 138 11","2.1.8"},</div><div>&nbsp; &nbsp; &nbsp; {stdlib,"ERTS &nbsp;CXC 138 10","1.16.4"},</div><div>&nbsp; &nbsp; &nbsp; {kernel,"ERTS &nbsp;CXC 138 10","2.13.4"}]},</div><div>&nbsp;{os,{unix,linux}},</div><div>&nbsp;{erlang_version,</div><div>&nbsp; &nbsp; &nbsp;"Erlang R13B03 (erts-5.7.4) [source] [rq:1] [async-threads:30] [hipe] [kernel-poll:true]\n"},</div><div>&nbsp;{memory,</div><div>&nbsp; &nbsp; &nbsp;[{total,12970840},</div><div>&nbsp; &nbsp; &nbsp; {processes,4969696},</div><div>&nbsp; &nbsp; &nbsp; {processes_used,4960640},</div><div>&nbsp; &nbsp; &nbsp; {system,8001144},</div><div>&nbsp; &nbsp; &nbsp; {atom,737045},</div><div>&nbsp; &nbsp; &nbsp; {atom_used,727860},</div><div>&nbsp; &nbsp; &nbsp; {binary,62256},</div><div>&nbsp; &nbsp; &nbsp; {code,6077475},</div><div>&nbsp; &nbsp; &nbsp; {ets,377668}]},</div><div>&nbsp;{vm_memory_high_watermark,0.<wbr>3999999997777084},</div><div>&nbsp;{vm_memory_limit,719775334}]</div><div><br></div><div>Cluster status of node 'rabbit@rabbit-1' ...</div><div>[{nodes,[{disc,['rabbit@<wbr>rabbit-1']}]},{running_nodes,[<wbr>'rabbit@rabbit-1']}]</div><div><br></div><div>Application environment of node 'rabbit@rabbit-1' ...</div><div>[{auth_backends,[rabbit_auth_<wbr>backend_internal]},</div><div>&nbsp;{auth_mechanisms,['PLAIN','<wbr>AMQPLAIN']},</div><div>&nbsp;{backing_queue_module,rabbit_<wbr>variable_queue},</div><div>&nbsp;{cluster_nodes,[]},</div><div>&nbsp;{collect_statistics,fine},</div><div>&nbsp;{collect_statistics_interval,<wbr>5000},</div><div>&nbsp;{default_permissions,[&lt;&lt;".*"&gt;<wbr>&gt;,&lt;&lt;".*"&gt;&gt;,&lt;&lt;".*"&gt;&gt;]},</div><div>&nbsp;{default_user,&lt;&lt;"guest"&gt;&gt;},</div><div>&nbsp;{default_user_tags,[<wbr>administrator]},</div><div>&nbsp;{default_vhost,&lt;&lt;"/"&gt;&gt;},</div><div>&nbsp;{delegate_count,16},</div><div>&nbsp;{error_logger,{file,"/var/<wbr>log/rabbitmq/rabbit@rabbit-1.<wbr>log"}},</div><div>&nbsp;{frame_max,131072},</div><div>&nbsp;{hipe_compile,false},</div><div>&nbsp;{included_applications,[]},</div><div>&nbsp;{msg_store_file_size_limit,<wbr>16777216},</div><div>&nbsp;{msg_store_index_module,<wbr>rabbit_msg_store_ets_index},</div><div>&nbsp;{queue_index_max_journal_<wbr>entries,262144},</div><div>&nbsp;{sasl_error_logger,{file,"/<wbr>var/log/rabbitmq/rabbit@<wbr>rabbit-1-sasl.log"}},</div><div>&nbsp;{server_properties,[]},</div><div>&nbsp;{ssl_listeners,[]},</div><div>&nbsp;{ssl_options,[]},</div><div>&nbsp;{tcp_listen_options,[binary,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {packet,raw},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {reuseaddr,true},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {backlog,128},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {nodelay,true},</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {exit_on_close,false}]},</div><div>&nbsp;{tcp_listeners,[5672]},</div><div>&nbsp;{trace_vhosts,[]},</div><div>&nbsp;{vm_memory_high_watermark,0.<wbr>4}]</div><div><br></div><div>Connections:</div><div><br></div><div>Channels:</div><div><br></div><div>Queues on /:</div><div><br></div><div>Exchanges on /:</div><div>name<span style="white-space:pre">        </span>type<span style="white-space:pre">        </span>durable<span style="white-space:pre">        </span>auto_delete<span style="white-space:pre">        </span>internal<span style="white-space:pre">        </span>arguments</div><div>amq.rabbitmq.trace<span style="white-space:pre">        </span>topic<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.rabbitmq.log<span style="white-space:pre">        </span>topic<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.match<span style="white-space:pre">        </span>headers<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.headers<span style="white-space:pre">        </span>headers<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.topic<span style="white-space:pre">        </span>topic<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.direct<span style="white-space:pre">        </span>direct<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div>amq.fanout<span style="white-space:pre">        </span>fanout<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div><span style="white-space:pre">        </span>direct<span style="white-space:pre">        </span>true<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>false<span style="white-space:pre">        </span>[]</div><div><br></div><div>Bindings on /:</div><div><br></div><div>Consumers on /:</div><div><br></div><div>Permissions on /:</div><div>user<span style="white-space:pre">        </span>configure<span style="white-space:pre">        </span>write<span style="white-space:pre">        </span>read</div><div>scalr<span style="white-space:pre">        </span>.*<span style="white-space:pre">        </span>.*<span style="white-space:pre">        </span>.*</div><div><br></div><div>End of server status report</div><div>...done.</div></div><div><br></div><br>Den mÃ¥ndagen den 12:e mars 2012 kl. 11:43:20 UTC+1 skrev Steve Powell:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jonas,<p>Instead of issuing 'rabbitmq-server status', please can you try issuing<br>'rabbitmqctl status', or 'rabbitmqctl report' to get information about the<br>running rabbit node.</p><p>You say 'I've tried running the python code on both the local host (ubuntu<br>10.04) and on osx.' but it would be quite useful to know a little more about<br>your setup. Are you trying to access the same server in both cases?</p><p>Steve Powell &nbsp;(a loppy bunny)<br>----------some more definitions from the SPD----------<br>vermin (v.) Treating the dachshund for roundworm.<br>chinchilla (n.) Cooling device for the lower jaw.<br>socialcast (n.) Someone to whom everyone is speaking but nobody likes.</p><p>On 7 Mar 2012, at 19:30, Jonas Colmsjo wrote:</p><p>&gt; I've copied the send.py and receive.py in the Hellow World tutorial and keep getting time out errors.I've tried running the python code on both the local host (ubuntu 10.04) and on osx. The Rabbit server seams to be up and running and I can login to the management console.<br>&gt; <br>&gt; Any help is greatly appreciated!<br>&gt; <br>&gt; root@rabbit-1:~/tmp# rabbitmq-server status<br>&gt; Activating RabbitMQ plugins ...<br>&gt; <br>&gt; ******************************<wbr>******************************<wbr>********************<br>&gt; ******************************<wbr>******************************<wbr>********************<br>&gt; <br>&gt; 6 plugins activated:<br>&gt; * amqp_client-2.7.1<br>&gt; * mochiweb-1.3-rmq2.7.1-git<br>&gt; * rabbitmq_management-2.7.1<br>&gt; * rabbitmq_management_agent-2.7.<wbr>1<br>&gt; * rabbitmq_mochiweb-2.7.1<br>&gt; * webmachine-1.7.0-rmq2.7.1-hg<br>&gt; <br>&gt; node with name "rabbit" already running on "rabbit-1"<br>&gt; diagnostics:<br>&gt; - nodes and their ports on rabbit-1: [{rabbit,39652},<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {rabbitmqprelaunch17299,33245}<wbr>]<br>&gt; - current node: 'rabbitmqprelaunch17299@<wbr>rabbit-1'<br>&gt; - current node home dir: /var/lib/rabbitmq<br>&gt; - current node cookie hash: QtJhQHUnJDOWPtTEH/uY/g==<br>&gt; <br>&gt; --- ERROR ---<br>&gt; <br>&gt; root@rabbit-1:~/tmp# sudo python send.py<br>&gt; Traceback (most recent call last):<br>&gt; &nbsp; File "send.py", line 5, in &lt;module&gt;<br>&gt; &nbsp; &nbsp; host='localhost'))<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/adapters/<wbr>blocking_connection.py", line 32, in __init__<br>&gt; &nbsp; &nbsp; BaseConnection.__init__(self, parameters, None, reconnection_strategy)<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/adapters/<wbr>base_connection.py", line 50, in __init__<br>&gt; &nbsp; &nbsp; reconnection_strategy)<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/connection.<wbr>py", line 170, in __init__<br>&gt; &nbsp; &nbsp; self._connect()<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/connection.<wbr>py", line 228, in _connect<br>&gt; &nbsp; &nbsp; self.parameters.port or &nbsp;spec.PORT)<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/adapters/<wbr>blocking_connection.py", line 44, in _adapter_connect<br>&gt; &nbsp; &nbsp; self._handle_read()<br>&gt; &nbsp; File "/usr/local/lib/python2.6/<wbr>dist-packages/pika/adapters/<wbr>base_connection.py", line 151, in _handle_read<br>&gt; &nbsp; &nbsp; data = self.socket.recv(self._<wbr>suggested_buffer_size)<br>&gt; socket.timeout: timed out<br>&gt; ______________________________<wbr>_________________<br>&gt; rabbitmq-discuss mailing list<br>&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<wbr>rabbitmq.com</a><br>&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<wbr>cgi-bin/mailman/listinfo/<wbr>rabbitmq-discuss</a></p><p>______________________________<wbr>_________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<wbr>rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<wbr>cgi-bin/mailman/listinfo/<wbr>rabbitmq-discuss</a><br></p><p></p><p></p><p></p><p></p><p></p></blockquote></div></blockquote></div>