0

I'm having a hell of a time installing the Volttron Reference Application, and can't figure out what I'm doing wrong.

I've been using Pyenv to manage running multiple versions of Volttron at once -- I've been able to install the versions that use both Python 2.7.x (the current 'master' branch) and the version using Python 3.6.x (the 'volttron-7-preview' branch), but I'm having a hell of a time getting the Reference Application up and running.

Specifically, I can't get Celery to play nicely with the OpenADR VTN server (installation instructions) mentioned in the jupyter notebook. I've followed the instructions to the letter (with the exception of the rabbit-mq step, since that gets installed as part of Volttron and would then be installed twice in different ways), and I've been making sure to link directly to specific versions of Python (3.6.9) to avoid any weirdness with pyenv, but when I run this command

celery -A openadr worker -B

I get this error:

[2019-11-05 16:23:02,570: ERROR/Beat] Process Beat
Traceback (most recent call last):
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__
    return obj.__dict__[self.__name__]
KeyError: 'producer'

and the thing dies after a few additional errors get thrown while trying to handle the above exception (at bottom, since it's a bit long).

Anybody have any suggestions on what I might be doing wrong?

(Separately: I hear there's a Slack channel, but the sign-up link (https://volttron-community.signup.team/) seems to be broken. Any links there, either?)

My setup: Using current master of Volttron (which uses Python 2.7) and current master of Volttron-applications (link) on Ubuntu 18.04 inside a VirtualBox; Python versions managed with pyenv.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/billiard/process.py", line 327, in _bootstrap
    self.run()
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 634, in run
    self.service.start(embedded_process=True)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 558, in start
    interval = self.scheduler.tick()
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 279, in tick
    self.apply_entry(entry, producer=self.producer)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/objects.py", line 44, in __get__
    value = obj.__dict__[self.__name__] = self.__get(obj)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 411, in producer
    return self.Producer(self._ensure_connected(), auto_declare=False)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 395, in _ensure_connected
    _error_handler, self.app.conf.broker_connection_max_retries
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 405, in ensure_connection
    callback)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/functional.py", line 333, in retry_over_time
    return fun(*args, **kwargs)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 261, in connect
    return self.connection
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 802, in connection
    self._connection = self._establish_connection()
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 757, in _establish_connection
    conn = self.transport.establish_connection()
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 130, in establish_connection
    conn.connect()
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 288, in connect
    self.drain_events(timeout=self.connect_timeout)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 471, in drain_events
    while not self.blocking_read(timeout):
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 477, in blocking_read
    return self.on_inbound_frame(frame)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/method_framing.py", line 55, in on_frame
    callback(channel, method_sig, buf, None)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 481, in on_inbound_method
    method_sig, payload, content,
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/abstract_channel.py", line 128, in dispatch_method
    listener(*args)
  File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 368, in _on_start
    b", ".join(self.mechanisms).decode()))
amqp.exceptions.ConnectionError: Couldn't find appropriate auth mechanism (can offer: AMQPLAIN, PLAIN; available: )
[2019-11-11 13:41:24,210: WARNING/Beat] Process Beat:
[2019-11-11 13:41:24,211: WARNING/Beat] Traceback (most recent call last):
[2019-11-11 13:41:24,211: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__
    return obj.__dict__[self.__name__]
[2019-11-11 13:41:24,211: WARNING/Beat] KeyError: 'producer'
[2019-11-11 13:41:24,212: WARNING/Beat] During handling of the above exception, another exception occurred:
[2019-11-11 13:41:24,212: WARNING/Beat] Traceback (most recent call last):
[2019-11-11 13:41:24,212: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/billiard/process.py", line 327, in _bootstrap
    self.run()
[2019-11-11 13:41:24,212: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 634, in run
    self.service.start(embedded_process=True)
[2019-11-11 13:41:24,212: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 558, in start
    interval = self.scheduler.tick()
[2019-11-11 13:41:24,212: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 279, in tick
    self.apply_entry(entry, producer=self.producer)
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/objects.py", line 44, in __get__
    value = obj.__dict__[self.__name__] = self.__get(obj)
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 411, in producer
    return self.Producer(self._ensure_connected(), auto_declare=False)
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/celery/beat.py", line 395, in _ensure_connected
    _error_handler, self.app.conf.broker_connection_max_retries
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 405, in ensure_connection
    callback)
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/utils/functional.py", line 333, in retry_over_time
    return fun(*args, **kwargs)
[2019-11-11 13:41:24,213: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 261, in connect
    return self.connection
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 802, in connection
    self._connection = self._establish_connection()
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/connection.py", line 757, in _establish_connection
    conn = self.transport.establish_connection()
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 130, in establish_connection
    conn.connect()
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 288, in connect
    self.drain_events(timeout=self.connect_timeout)
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 471, in drain_events
    while not self.blocking_read(timeout):
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 477, in blocking_read
    return self.on_inbound_frame(frame)
[2019-11-11 13:41:24,214: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/method_framing.py", line 55, in on_frame
    callback(channel, method_sig, buf, None)
[2019-11-11 13:41:24,215: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 481, in on_inbound_method
    method_sig, payload, content,
[2019-11-11 13:41:24,215: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/abstract_channel.py", line 128, in dispatch_method
    listener(*args)
[2019-11-11 13:41:24,215: WARNING/Beat] File "~/.virtualenvs/openadr/lib/python3.6/site-packages/amqp/connection.py", line 368, in _on_start
    b", ".join(self.mechanisms).decode()))
[2019-11-11 13:41:24,215: WARNING/Beat] amqp.exceptions.ConnectionError: Couldn't find appropriate auth mechanism (can offer: AMQPLAIN, PLAIN; available: )
[2019-11-11 13:41:24,419: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@localhost:5672//: Couldn't find appropriate auth mechanism (can offer: AMQPLAIN, PLAIN; available: ).
Trying to reconnect...
4

1 回答 1

0

我最终能够解决它,以防其他人遇到同样的问题。看起来 pyenv 没有干扰,问题出在 RabbitMQ 上。具体来说,我安装了 RabbitMQ 作为 Volttron 安装的一部分;但这意味着如果您还想将 RabbitMQ 用于 OpenADR VTN 服务器(结果 celery 在连接到 RabbitMQ 服务器时失败,这很明显但从上面不是很清楚),那么您必须聪明地分离端口和/权限错误信息)。我使用 ZeroMQ 选项重新安装了 Volttron,它有效地将两者分开,然后继续安装。

于 2019-11-25T18:12:34.063 回答