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