[SOLVED] beat/consumer: Connection error: Errno 111 Connection refused on fresh install (Mayan 3.3.6/Windows8)

When things don't work as they should.
Post Reply
maathieu
Posts: 15
Joined: Tue Dec 24, 2019 10:17 am

[SOLVED] beat/consumer: Connection error: Errno 111 Connection refused on fresh install (Mayan 3.3.6/Windows8)

Post by maathieu »

Hello again,

On for next question. I have run a fresh docker install of Mayan-EDMS on a Windows 8 computer using shares created following the info on another thread and a personal MySQL server running on the host using the following command:

Code: Select all

$ docker run -d --name mayan-edms --restart=always -p 80:8000 \
-e MAYAN_DATABASE_ENGINE=django.db.backends.mysql –e MAYAN_DATABASE_HOST=******** \
-e MAYAN_DATABASE_NAME=*** -e MAYAN_DATABASE_PASSWORD=***** -e MAYAN_DATABASE_CONN_MAX_AGE=0 \
-v /mayan-media:/var/lib/mayan mayanedms/mayanedms:latest
DB is properly accessed and the installation script creates the tables and everything. The file sharing between host and guest works too, and I can see some configuration files appearing on the host's folder during the install process.

However, after the installation is finished, I have this in the error log:

Code: Select all

[2019-12-24 13:35:15,364: ERROR/MainProcess] beat: Connection error: [Errno 111]
 Connection refused. Trying again in 32.0 seconds...
[2019-12-24 13:35:19,464: ERROR/MainProcess] consumer: Cannot connect to amqp://
guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 32.00 seconds...

[2019-12-24 13:35:26,496: ERROR/MainProcess] consumer: Cannot connect to amqp://
guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 32.00 seconds...

[2019-12-24 13:35:26,499: ERROR/MainProcess] consumer: Cannot connect to amqp://
guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 32.00 seconds...

[2019-12-24 13:35:47,432: ERROR/MainProcess] beat: Connection error: [Errno 111]
 Connection refused. Trying again in 32.0 seconds...
[2019-12-24 13:35:51,608: ERROR/MainProcess] consumer: Cannot connect to amqp://
guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 32.00 seconds...
etc.

And I can't access http://localhost/ or http://localhost:8000/

What am I doing wrong?

VERSION files says I am running Mayan-EDMS 3.3.6

User avatar
rssfed23
Moderator
Moderator
Posts: 213
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: ERROR/MainProcess] beat/consumer: Connection error: Errno 111 Connection refused on fresh install (Mayan 3.3.6/Windo

Post by rssfed23 »

That error occurs because you're not running either the redis or rabbitmq message broker containers.

For simple/test deployments redis is easiest and is described in the documentation: https://docs.mayan-edms.com/chapters/do ... er-install (you need to run step 6 - run the redis container)
The main thing to check are your environment variables. You'll see in step 7:
-e MAYAN_CELERY_BROKER_URL="redis://172.17.0.1:6379/0" \
-e MAYAN_CELERY_RESULT_BACKEND="redis://172.17.0.1:6379/1" \

The above 2 values are missing from the command you put in. Mayan needs a message broker to function (it's how you can distribute it across multiple nodes) and without redis or rabbitmq you'll get the error you've put below.

Those are what connect mayan to the redis you deploy.

I also recommend you check out the docker-compose version as it makes life a lot easier managing multible containers (and is likely how you'll end up deploying in production). https://docs.mayan-edms.com/chapters/do ... mpose.html will deploy Mayan + Postgres + Redis + Rabbitmq.

Redis is great for smaller or single-node installs. RabbitMQ is better for larger installs or if you need multible nodes to run Mayan.

The reason you still need Redis even if you choose rabbitmq is Celery (the tool that manages tasks in Mayan) stores results (did this task complete ok type data) in Redis even though it uses rabbitmq for the actual distribution of commands.

This is all mainly for background information when you come to deploy Mayan in production. For a simple test deployment you can ignore every sentence I mention rabbitmq as you only need redis. If you follow step 6 to deploy a redis container on the same node and then copy those extra environment variables from step 7 and start it again you should have a fully functioning mayan instance at the end of it. (or use the docker-compose yaml to bring up everything in one hit)
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.

User avatar
rssfed23
Moderator
Moderator
Posts: 213
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: ERROR/MainProcess] beat/consumer: Connection error: Errno 111 Connection refused on fresh install (Mayan 3.3.6/Windo

Post by rssfed23 »

Side note as you're on windows 8: you won't be able to access localhost as you're running the whole docker environment inside a virtual machine. This is described in the docker documentation but in essence instead of localhost you need to access the IP of the virtual machine running docker (virtualbox may show you what the IP is on the vm overview page).

Accessing localhost would be to access things running on your windows install whereas mayan is running in a completely seperate virtual machine with its own dedicated IP.


Extra side note: If you can you really should upgrade to windows 10 as your life will become so much easier with it. You can use Windows Subsystem for Linux then and run Mayan natively on a localhost install :)
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.

maathieu
Posts: 15
Joined: Tue Dec 24, 2019 10:17 am

Re: ERROR/MainProcess] beat/consumer: Connection error: Errno 111 Connection refused on fresh install (Mayan 3.3.6/Windo

Post by maathieu »

Yes, it works! Thanks :)

I realize that was using the page for version 3.2.11 of Mayan... Oh well, my bad.

Yes, I wish I could have a Linux box to do this testing...

Post Reply