2012-09-28 47 views
1

我與Pika提供超時錯誤的問題。相同的代碼(下面)在其他環境中工作正常,但在這個失敗。Pika超時問題與RabbitMQ

connection = pika.BlockingConnection(pika.ConnectionParameters(host=host)) 

rabbitmqctl狀態

[{pid,30059}, 
{running_applications,[{rabbit,"RabbitMQ","2.8.2"}, 
         {os_mon,"CPO CXC 138 46","2.2.4"}, 
         {sasl,"SASL CXC 138 11","2.1.8"}, 
         {mnesia,"MNESIA CXC 138 12","4.4.12"}, 
         {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] [64-bit] [smp:8:8] [rq:8] [async-threads:30] [hipe] [kernel-poll:true]\n"}, 
{memory,[{total,76031440}, 
      {processes,57368952}, 
      {processes_used,57354128}, 
      {system,18662488}, 
      {atom,1119593}, 
      {atom_used,1112833}, 
      {binary,205008}, 
      {code,12015821}, 
      {ets,1407392}]}, 
{vm_memory_high_watermark,0.39999999993657753}, 
{vm_memory_limit,5045529804}, 
{disk_free_limit,12613824512}, 
{disk_free,10839289856}, 
{file_descriptors,[{total_limit,924}, 
        {total_used,837}, 
        {sockets_limit,829}, 
        {sockets_used,829}]}, 
{processes,[{limit,1048576},{used,6763}]}, 
{run_queue,0}, 
{uptime,3298}] 
...done. 

有沒有人打呢?我假設它是一個RabbitMQ的配置問題

+0

這裏是超時問題的解決方案。 http://stackoverflow.com/questions/16163308/pika-blocking-connection-py-random-timeout-connecting-to-rabbitmq/28103391#28103391 [1]:http://stackoverflow.com/問題/ 16163308 /鼠兔阻斷連接-PY-隨機超時連接到的RabbitMQ/28103391#28103391 – itzMEonTV

回答

0

退房的RabbitMQ的日誌,您可能需要提供登錄憑據:

pika.BlockingConnection(pika.ConnectionParameters(host, port=port, virtual_host=vhost, credentials=pika.credentials.PlainCredentials(username, password)))