OpenStack Quantum Log 显示 AMQP 服务器:5672 无法访问:套接字已关闭

OpenStack Quantum Log 显示 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

什么原因可能导致这个错误?

答案1

本例中的 AMQP 服务器指的是 RabbitMQ。

答案很简单,量子服务器无法登录到rabbitmq。因为你不是收到“ECONNREFUSED”错误,服务器可以联系,这意味着很可能有一个 RabbitMQ 服务器正在该 IP 上运行。

确保您的 RabbitMQ 密码正确。例如 Folsom 指南说:

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

(注释掉的行是默认的)

相关内容