我剛剛安裝了CentOS 6.3的全新VMWare安裝。互聯網正在發揮作用,一切似乎都起作用。Pika/RabbitMQ連接問題 - 運行VMWare CentOS 6.3
我試圖與RabbitMQ的嘗試,但我陷入他們的教程的步驟1:
http://www.rabbitmq.com/tutorials/tutorial-one-python.html
基本上,我:
- 建立Linux實例
- 安裝了RabbitMQ的所有依賴項,例如erlang/esel
- 試用其Hello World教程
正是在這一行實際上失敗:
import pika
pika.BlockingConnection()
我得到這個錯誤:
> Traceback (most recent call last): File "<stdin>", line 1, in
> <module> File
> "/usr/lib/python2.6/site-packages/pika/adapters/blocking_connection.py",
> line 33, in __init__
> BaseConnection.__init__(self, parameters, None, reconnection_strategy) File
> "/usr/lib/python2.6/site-packages/pika/adapters/base_connection.py",
> line 50, in __init__
> reconnection_strategy) File "/usr/lib/python2.6/site-packages/pika/connection.py", line 170, in
> __init__
> self._connect() File "/usr/lib/python2.6/site-packages/pika/connection.py", line 228, in
> _connect
> self.parameters.port or spec.PORT) File "/usr/lib/python2.6/site-packages/pika/adapters/blocking_connection.py",
> line 37, in _adapter_connect
> BaseConnection._adapter_connect(self, host, port) File "/usr/lib/python2.6/site-packages/pika/adapters/base_connection.py",
> line 58, in _adapter_connect
> self.socket.connect((host, port)) File "<string>", line 1, in connect socket.error:
[Errno 111] Connection refused
我來了試圖用我所有的故障排除的嘗試,我有點期待某人否則也有這個相同的問題,並張貼它。哦,猜猜我是第一個!
無論如何,在這一點上,我不認爲我已經觸及RabbitMQ庫,所以這可能只是一個Pika問題。
這是我看到的Wireshark comeing,專注於127.0.0.1:
1 0.000000 127.0.0.1 127.0.0.1 TCP 58748 > amqp [SYN] Seq=0 Win=32792 Len=0 MSS=16396 TSV=41371814 TSER=0 WS=6
2 0.000079 127.0.0.1 127.0.0.1 TCP amqp > 58748 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
我可以從Wireshark的提供更多的信息,只是讓我知道
啊!有效。我沒有意識到我必須手動啓動服務。麪糰! – 2013-03-06 19:51:59