dfoderick/fullcycle

RabbitMQ Connection failed: timeout

Closed this issue · 13 comments

I can't configure the fcmalert process to connect to RabbitMQ.

If I run when_alert.py I get the error pika.exceptions.ConnectionClosed: Connection to 192.168.1.86:5672 failed: timeout.

I installed RabbitMQ in a docker container.

According to netstat docker-proxy is bound to port 5672 and port 15672 however only using IPv6 (not 4).

Any ideas?

So I figured out I need to reconfigure RabbitMQ and Redis for my system.

docker inspect --format '{{ .NetworkSettings.IPAddress }}' fullcycle-rabbit returns the IP address of the docker container on my system (172.17.0.2).

Changing the Rabbit host in the config to this IP, and I get Waiting for messages on q_alert running when_alert.py.

However, the fcmalert supervisor process is still failing.

Are you able to run the supervisor web site?
http://your_controller_ip:9009

If you can get into that web site then you can click on 'tail' and see any errors in the process.

Also run fcmdiag
Its a command that should have copied to your bin directory. It will tell you if all the services are running.

pi@raspberrypi:~/bin $ fcmdiag
Starting application...
2018-10-21 14:33:43: Starting FCM Init
2018-10-21 14:33:43: Starting FCM Configuration
Starting FCM Cache
started fullcycle
cache is working
message bus is working
database is working, 8846 logs

When I tail the process from the supervisor website I see:

Error Response
Error Code 410.
Message Gone.

fcmdiag returns the same message as you except the number of database logs is 2.

Restarting all supervisor processes from the command line shows:
fullcycle:fcmalert: ERROR (spawn error)

The issue with Error Code 410 looks like its related to Unicode encoding of the : used by the group namespace: Supervisor/supervisor#222

If I run the fcmalert process directly, (python3 when_alert.py) from the backend directory I am still getting Waiting for messages on q_alert. To exit press CTRL+C.

The Error Code 410 is related to Unicode encoding of the : group namespace: Supervisor/supervisor#222.

Ignoring the website interface for a moment, restarting all processes from the command line I get fullcycle:fcmalert: ERROR (spawn error).

However, running python3 when_alerty.py directly from the directory is still get Waiting for messages on q_alert. To exit press CTRL+C

I will research. I have never seen that error.

Which OS are you running on? Run uname -a and tell me the output.

I see that a new version of raspbian was released October 9. I have not tested on that version yet.

I will download and test it on the latest version in the next couple of days.

I installed FullCycle on the October raspbian and made a few small fixes to the install and committed the fixes to github.

I noticed that supervisord was not automatically installed by raspbian. If you installed it manually you should get version 3.3.4

pi@raspberrypi:~ $ supervisord -v
3.3.4

But supervisord is working for me. You might need to uninstall and reinstall supervisord.
Also make sure you only have one version of supervisord installed.

pi@raspberrypi:~ $ whereis supervisord
supervisord: /etc/supervisord.conf /usr/local/bin/supervisord

I had an issue in the past where I had 2 versions of supervisord installed and it caused problems.

Please review the following items.

  1. sudo nano ~/fullcycle/fullcyclepy/backend/config/services.conf
    Make sure the ip addresses are correct. The source file had my network settings. You should probably be using 127.0.0.1

2)sudo nano ~/fullcycle/fullcyclepy/backend/config/miners.conf
Configure at least 1 miner with the correct ip address just to be safe

  1. Sometimes the python libraries in requirements.txt do not install correctly. I need a more robust setup for those. In the mean time you might have to install those python libraries manually.

As a test, run fcmsimple and it should grab the stats of your miner in miner.conf. Let me know if there are any errors.

Thanks and sorry about message ordering yesterday GitHub was failing. I believe the Supervisor message is due to the Unicode encoding.

In the miner conf “default” port is 4048 or similar however running port scan mine are only open on port 22 and 80. Will this use ssh port 22 or do I need to open another port on the miner to interface?

I’ll try reinstalling dependencies and see if that helps too.

Closing this - I bought a Pi instead. I've opened a new tickets relating to setup: #23