amqp connection refused AMQPConnectionError

7,505 views
Skip to first unread message

Zhaodong Wei

unread,
Jan 2, 2014, 5:55:18 AM1/2/14
to edx-...@googlegroups.com
Hi
    I am testing the edx deployment version(20131103) instance installed in Ubuntu 12.04.
    Everything appears ok except the ora problem, I'm receiving the following error when viewing the course's Open Ended Panel> Staff grading (/staff_grading) page.

Cannot find any open response problems in this course. Have you submitted answers to any open response assessment questions? If not, please do so and return to this page.

So I tried to find the error info in the log files, these information below are what I found, and I don't know how solve them...
     
file: /edx/var/log/lms/edx.log

Dec 20 09:49:15 precise64 [service_variant=lms][celery.redirected][env:sandbox] WARNING [precise64  1152] [log.py:246] - cel...@edx.lms.core.high_mem.`hostname` ready.
Dec 20 09:49:15 precise64 [service_variant=lms][celery.redirected][env:sandbox] WARNING [precise64  1153] [log.py:246] - cel...@edx.lms.core.default.`hostname` ready.
Dec 20 09:49:15 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1152] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 2.00 seconds...
Dec 20 09:49:15 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1153] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 2.00 seconds...
Dec 20 09:49:17 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1157] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds...
Dec 20 09:49:17 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1155] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds...
Dec 20 09:49:17 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1152] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds...
Dec 20 09:49:17 precise64 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [precise64  1153] [consumer.py:796] - consumer: Cannot connect to amqp://cel...@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds...
 
file: /edx/var/log/supervisor/xqueue_consumertderr.log

Traceback (most recent call last):
  File "/edx/app/xqueue/venvs/xqueue/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/edx/app/xqueue/venvs/xqueue/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/xqueue/venvs/xqueue/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/xqueue/venvs/xqueue/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/xqueue/venvs/xqueue/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/xqueue/xqueue/queue/management/commands/run_consumer.py", line 77, in handle
    worker = Worker(queue_name=name, worker_url=url)
  File "/edx/app/xqueue/xqueue/queue/consumer.py", line 205, in __init__
    self.connection = self.connect()
  File "/edx/app/xqueue/xqueue/queue/consumer.py", line 208, in connect
    return pika.SelectConnection(self.parameters, self.on_connected)
  File "/edx/app/xqueue/venvs/xqueue/src/pika/pika/adapters/base_connection.py", line 61, in __init__
    super(BaseConnection, self).__init__(parameters, on_open_callback)
  File "/edx/app/xqueue/venvs/xqueue/src/pika/pika/connection.py", line 513, in __init__
    self._connect()
  File "/edx/app/xqueue/venvs/xqueue/src/pika/pika/connection.py", line 812, in _connect
    self._adapter_connect()
  File "/edx/app/xqueue/venvs/xqueue/src/pika/pika/adapters/select_connection.py", line 29, in _adapter_connect
    super(SelectConnection, self)._adapter_connect()
  File "/edx/app/xqueue/venvs/xqueue/src/pika/pika/adapters/base_connection.py", line 119, in _adapter_connect
    raise exceptions.AMQPConnectionError(self.params.connection_attempts)
pika.exceptions.AMQPConnectionError: 1


Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/handlers.py", line 807, in emit
    self._connect_unixsocket(self.address)
  File "/usr/lib/python2.7/logging/handlers.py", line 745, in _connect_unixsocket
    self.socket.connect(address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
Logged from file base_connection.py, line 149
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/handlers.py", line 807, in emit
    self._connect_unixsocket(self.address)
  File "/usr/lib/python2.7/logging/handlers.py", line 745, in _connect_unixsocket
    self.socket.connect(address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
Logged from file connection.py, line 1160
 

John Jarvis

unread,
Jan 2, 2014, 11:52:32 AM1/2/14
to Zhaodong Wei, edx-...@googlegroups.com
This looks like a problem with rabbit, have you confirmed that it is running?
Can you issue a `sudo service rabbitmq-server status` from the shell
and get a status back?
-John

Zhaodong Wei

unread,
Jan 2, 2014, 11:29:45 PM1/2/14
to edx-...@googlegroups.com, Zhaodong Wei
The rabbit is running, when I ran the `sudo service rabbitmq-server status`, the following returned.

edx@precise64:~$ sudo service rabbitmq-server status
Status of node rabbit@precise64 ...
[{pid,1502},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.2.2"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.2.2"},
      {rabbit,"RabbitMQ","3.2.2"},
      {os_mon,"CPO  CXC 138 46","2.2.7"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.2.2"},
      {webmachine,"webmachine","1.10.3-rmq3.2.2-gite9359c7"},
      {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.2.2-git680dba8"},
      {xmerl,"XML parser","1.2.10"},
      {inets,"INETS  CXC 138 49","5.7.1"},
      {mnesia,"MNESIA  CXC 138 12","4.5"},
      {amqp_client,"RabbitMQ AMQP Client","3.2.2"},
      {sasl,"SASL  CXC 138 11","2.1.10"},
      {stdlib,"ERTS  CXC 138 10","1.17.5"},
      {kernel,"ERTS  CXC 138 10","2.14.5"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threa                                                              ds:30] [kernel-poll:true]\n"},
 {memory,
     [{total,34777680},
      {connection_procs,901968},
      {queue_procs,346592},
      {plugins,358856},
      {other_proc,9433064},
      {mnesia,102840},
      {mgmt_db,1074256},
      {msg_index,43920},
      {other_ets,1092272},
      {binary,713368},
      {code,17185735},
      {atom,1553689},
      {other_system,1971120}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,2924332646},
 {disk_free_limit,50000000},
 {disk_free,64675733504},
 {file_descriptors,
     [{total_limit,924},{total_used,20},{sockets_limit,829},{sockets_used,9}]},
 {processes,[{limit,1048576},{used,326}]},
 {run_queue,0},
 {uptime,47925}]
...done.


在 2014年1月3日星期五UTC+8上午12时52分32秒,John Jarvis写道:

Umaimath Thonikkadavan

unread,
Feb 13, 2014, 12:19:40 AM2/13/14
to edx-...@googlegroups.com, Zhaodong Wei
Hi ,

Please let us know if your problem has resolved?? We are also facing the same issue.

Thank you,
Umaimath

e-hanane

unread,
Mar 25, 2015, 10:44:45 AM3/25/15
to edx-...@googlegroups.com, wzd....@gmail.com
Hi, 
we have a same problem, please any idea?
Thanks
Hanane

Umaimath Thonikkadavan

unread,
Mar 26, 2015, 3:46:26 AM3/26/15
to edx-...@googlegroups.com, wzd....@gmail.com
Hi Hanane,

I don't remember what was the actual issue, it was almost a year ago. May be your rabbitmq was not installed properly, or proper permission is not set.

Check whether rabbitmq is working find.
 sudo service rabbitmq-server status

Or login to http://ip-address:15672 with username edx and password edx and see the connections if it is running.
Please find the attached screen shot.

Go to Admin tab and check if all the users have correct permission, give * to all.

Or from the command prompt.

#give admin role to edx,celery,admin users in rabbitmq
sudo rabbitmqctl set_user_tags edx administrator
sudo rabbitmqctl set_user_tags celery administrator
sudo rabbitmqctl set_user_tags admin administrator

#set permission
sudo rabbitmqctl set_permissions -p / edx ".*" ".*" ".*"
sudo rabbitmqctl set_permissions -p / celery ".*" ".*" ".*"
sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"


Restart rabbitmq
sudo service rabbitmq-server restart

If rabbitmq installation is not successful, follow the instructions mentioned in the text file.


Please let me know what error exactly showing and if you are able to login to rabbitmq.

Thanks,
Umaimath



--
You received this message because you are subscribed to a topic in the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/e9c9fe90-425c-4e5b-a1de-71662b26db42%40googlegroups.com.

rabbitmq.png
rabbitmq-permission.png
rabbitmq-installation
Reply all
Reply to author
Forward
0 new messages