Openstack
OpenStack Quantum 日誌顯示 <server> 上的 AMQP 伺服器:5672 無法訪問:套接字已關閉
在 OpenStack Folsom 安裝中,我在 /var/log/quantum/server.log 的量子伺服器日誌顯示:
2013-02-06 11:51:38 INFO [quantum.openstack.common.rpc.common] Reconnecting to AMQP server on 10.0.0.1:5672 2013-02-06 11:51:38 DEBUG [amqplib] Start from server, version: 8.0, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2011 VMware, Inc.', u'capabilities': {}, u'platform': u'Erlang/OTP', u'version': u'2.7.1'}, mechanisms: [u'PLAIN', u'AMQPLAIN'], locales: [u'en_US'] 2013-02-06 11:51:41 ERROR [quantum.openstack.common.rpc.common] AMQP server on 10.0.0.1:5672 is unreachable: Socket closed. Trying again in 30 seconds. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/quantum/openstack/common/rpc/impl_kombu.py", line 469, in reconnect self._connect() File "/usr/lib/python2.7/dist-packages/quantum/openstack/common/rpc/impl_kombu.py", line 446, in _connect self.connection.connect() File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 154, in connect return self.connection File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 560, in connection self._connection = self._establish_connection() File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 521, in _establish_connection conn = self.transport.establish_connection() File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 255, in establish_connection connect_timeout=conninfo.connect_timeout) File "/usr/lib/python2.7/dist-packages/kombu/transport/pyamqplib.py", line 52, in __init__ super(Connection, self).__init__(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/connection.py", line 144, in __init__ (10, 30), # tune File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 95, in wait self.channel_id, allowed_methods) File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/connection.py", line 202, in _wait_method self.method_reader.read_method() File "/usr/lib/python2.7/dist-packages/amqplib/client_0_8/method_framing.py", line 221, in read_method raise m IOError: Socket closed
什麼可能導致此錯誤?
本例中的 AMQP 伺服器指的是 RabbitMQ。
簡單的答案是量子伺服器無法登錄rabbitmq。由於您沒有收到“ECONNREFUSED”錯誤,因此伺服器是可聯繫的,這意味著很可能有一個 RabbitMQ 伺服器在該 IP 上執行。
確保您的 RabbitMQ 密碼正確。例如,福爾瑟姆指南說:
rabbitmqctl change_password guest password
…意思是rabbitmq使用者是’guest’,而rabbitmq密碼是’password’。
這必須與 /etc/quantum/quantum.conf 中列出的使用者名和密碼匹配
# IP address of the RabbitMQ installation rabbit_host = 10.0.0.1 # Password of the RabbitMQ server rabbit_password = password # Port where RabbitMQ server is running/listening # rabbit_port = 5672 # User ID used for RabbitMQ connections # rabbit_userid = guest
(註釋掉的行是預設的)