Problem using xqueue

Hi
I have followed the instructions on https://pypi.org/project/tutor-xqueue/ to enable xqueue. When I try to navigate to http://xqueue.local.overhang.io/ I get Not Found error and the tutor logs tail is:
xqueue_1 | File "/usr/local/lib/python3.8/dist-packages/django/db/backends/base/base.py", line 195, in connect

Also when I try tutor xqueue submissions count I get the following error:
Traceback (most recent call last): File "main.py", line 21, in <module> File "tutor/commands/cli.py", line 38, in main File "click/core.py", line 829, in __call__ File "click/core.py", line 782, in main File "click/core.py", line 1259, in invoke File "click/core.py", line 1259, in invoke File "click/core.py", line 1259, in invoke File "click/core.py", line 1066, in invoke File "click/core.py", line 610, in invoke File "click/decorators.py", line 33, in new_func File "tutorxqueue/plugin.py", line 73, in count_submissions File "tutorxqueue/plugin.py", line 103, in print_result File "tutorxqueue/plugin.py", line 120, in __init__ File "tutorxqueue/plugin.py", line 137, in login File "tutorxqueue/plugin.py", line 184, in request File "requests/models.py", line 898, in json File "json/__init__.py", line 354, in loads File "json/decoder.py", line 339, in decode File "json/decoder.py", line 357, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) [34930] Failed to execute script main

What’s the output of docker ps? I suspect that some of your dev containers are running, which prevents the mysql container from running.

Sorry for the first post. It was really messy. let me post everything more clearly.
docker ps output:

CONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS                                                 NAMES
8bae1c2d6a5b        overhangio/openedx-xqueue:10.1.2             "/bin/sh -c 'gunicor…"   23 hours ago        Up 23 hours         8000/tcp                                              tutor_local_xqueue_1
d898c311280c        overhangio/openedx-xqueue:10.1.2             "sh -e -c 'while tru…"   23 hours ago        Up 23 hours         8000/tcp                                              tutor_local_xqueue_consumer_1
5a85d4a2e26b        overhangio/openedx-ecommerce-worker:10.1.6   "/bin/sh -c 'celery …"   30 hours ago        Up 23 hours                                                               tutor_local_ecommerce-worker_1
f7997034d811        overhangio/openedx-ecommerce:10.1.6          "/bin/sh -c 'gunicor…"   30 hours ago        Up 23 hours         8000/tcp                                              tutor_local_ecommerce_1
f6196ca73f18        nginx:1.13                                   "nginx -g 'daemon of…"   30 hours ago        Up 23 hours         0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp              tutor_local_nginx_1
c835aa8cf3f2        overhangio/openedx-discovery:10.1.7          "/bin/sh -c 'gunicor…"   30 hours ago        Up 23 hours         8000/tcp                                              tutor_local_discovery_1
ef2d3e4fc66d        overhangio/openedx:10.4.0                    "docker-entrypoint.s…"   34 hours ago        Up 23 hours         8000/tcp                                              tutor_local_cms-worker_1
9974b9a1c144        overhangio/openedx:10.4.0                    "docker-entrypoint.s…"   34 hours ago        Up 23 hours         8000/tcp                                              tutor_local_cms_1
ead1645afedb        overhangio/openedx:10.4.0                    "docker-entrypoint.s…"   34 hours ago        Up 23 hours         8000/tcp                                              tutor_local_lms-worker_1
35cfa41b7e25        overhangio/openedx:10.4.0                    "docker-entrypoint.s…"   34 hours ago        Up 23 hours         8000/tcp                                              tutor_local_lms_1
aa6e7c6755f8        overhangio/openedx-forum:10.4.0              "docker-entrypoint.s…"   41 hours ago        Up 23 hours         4567/tcp                                              tutor_local_forum_1
08615c5ef8d0        memcached:1.4.38                             "docker-entrypoint.s…"   41 hours ago        Up 23 hours         11211/tcp                                             tutor_local_memcached_1
d6db908aef7d        namshi/smtp:latest                           "/bin/entrypoint.sh …"   41 hours ago        Up 23 hours         25/tcp                                                tutor_local_smtp_1
dfd0d85f1175        mysql:5.6.49                                 "docker-entrypoint.s…"   41 hours ago        Up 23 hours         3306/tcp                                              tutor_local_mysql_1
faa1dd61864a        mongo:3.6.18                                 "docker-entrypoint.s…"   41 hours ago        Up 23 hours         27017/tcp                                             tutor_local_mongodb_1
36c8fa38dc9f        rabbitmq:3.6.10-management-alpine            "docker-entrypoint.s…"   41 hours ago        Up 23 hours         4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp   tutor_local_rabbitmq_1
966b4a130a7b        elasticsearch:1.5.2                          "/docker-entrypoint.…"   41 hours ago        Up 23 hours         9200/tcp, 9300/tcp                                    tutor_local_elasticsearch_1

output of the xqueue submissions count command:

  File "main.py", line 21, in <module>
  File "tutor/commands/cli.py", line 38, in main
  File "click/core.py", line 829, in __call__
  File "click/core.py", line 782, in main
  File "click/core.py", line 1259, in invoke
  File "click/core.py", line 1259, in invoke
  File "click/core.py", line 1259, in invoke
  File "click/core.py", line 1066, in invoke
  File "click/core.py", line 610, in invoke
  File "click/decorators.py", line 33, in new_func
  File "tutorxqueue/plugin.py", line 73, in count_submissions
  File "tutorxqueue/plugin.py", line 103, in print_result
  File "tutorxqueue/plugin.py", line 120, in __init__
  File "tutorxqueue/plugin.py", line 137, in login
  File "tutorxqueue/plugin.py", line 184, in request
  File "requests/models.py", line 898, in json
  File "json/__init__.py", line 354, in loads
  File "json/decoder.py", line 339, in decode
  File "json/decoder.py", line 357, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[50310] Failed to execute script main

Output of tutor local logs -f --tail=10 when I try to navigate to http://xqueue.local.overhang.io/

xqueue_1            |     self.connect()
xqueue_1            |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/base/base.py", line 195, in connect
xqueue_1            |     self.connection = self.get_new_connection(conn_params)
xqueue_1            |   File "/usr/local/lib/python3.8/dist-packages/django/db/backends/mysql/base.py", line 227, in get_new_connection
xqueue_1            |     return Database.connect(**conn_params)
xqueue_1            |   File "/usr/local/lib/python3.8/dist-packages/MySQLdb/__init__.py", line 84, in Connect
xqueue_1            |     return Connection(*args, **kwargs)
xqueue_1            |   File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 179, in __init__
xqueue_1            |     super(Connection, self).__init__(*args, **kwargs2)
xqueue_1            | django.db.utils.OperationalError: (1045, "Access denied for user 'xqueue'@'172.18.0.9' (using password: YES)")
xqueue_1            | 2020-12-03 14:48:38,074 WARNING 8 [django.request] log.py:222 - Not Found: /
nginx_1             | 192.168.7.22 - - [03/Dec/2020:14:48:38 +0000] "GET / HTTP/1.1" 404 77 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" "-"
xqueue_consumer_1   | running consumers

Did you tutor local quickstart after enabling the plugin? You should – or at least tutor local start -d && tutor local init.

1 Like

No. Since it was not mentioned in https://pypi.org/project/tutor-xqueue/ I had not run tutor local quickstart.
I had only run tutor local stop and tutor local start --detach. apparently they are not enough :grinning:

Anyway the problem is solved now. Thank you very much for the help.