multivisor
multivisor copied to clipboard
Add remote host to multivisor web server
Hi, My question is about basic configuration. I will use one instance as a central server to manage all the processes I have up in other instances.
In multivisor web server i add this [sql0] url=10.54.130.5:9001
[sql1] url=10.54.130.4:9001
In the remote instances I have added this configuration to the supervisor.
[rpcinterface:multivisor] supervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface bind=*:9001
From the web interface I am not being able to see the other supervisor, what am I doing wrong?
REgards,
Can you paste the full supervisor configurations, please?
If you have inet_http_server
and rpcinterface:multivisor
sections make sure port
in inet_http_server
and bind
in rpcinterface:multivisor
are different. Example
[inet_http_server]
port=:9001
[rpcinterface:multivisor]
supervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface
bind=*:9002
Hi, thanks for the reply. Here my supervisor configuration:
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[include]
files = /etc/supervisor/conf.d/*.conf
/etc/supervisor/conf.d
sqlp01.conf
[program:sql01]
directory=/opt/sql01
command=python -u sql_service.py
autostart=true
stdout_logfile=/var/log/sql01.log
stderr_logfile=/var/log/sql01log
stdout_logfile_maxbytes=0
From the firewall of the instance where the web server is installed I have all the traffic allowed incoming from the instance where I installed the multivisor RPC service.
My Python application is running on port 9001, should I bind to port 9002 in order to manage it from the web interface?
Maybe it’s a configuration error of mine for misinterpreting English, I’m not an advanced user in English language.
Regards,
To avoid port conflicts please configure it like this:
In each supervisor config file put
[rpcinterface:multivisor]
supervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface
bind=*:9002
Also make sure that multivisor is installed and accessible to supervisor on each supervisor machine. You can find out if you start supervisor in foreground (with -n
command line option). If there are error messages concerning multivisor it means it is not well installed.
In your multivisor configuration file, for each supervisor:
[<supervisor name>]
url=<host or IP>:9002
Restart all supervisors and multivisor
@tiagocoutinho thanks for the reply.
From the instance where I installed the web servers I still do not see the supervisor of the client instances.
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid ;
childlogdir=/var/log/supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[rpcinterface:multivisor]
supervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface
bind=*:9002
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
[include]
files = /etc/supervisor/conf.d/*.conf
I don’t see any erros in the supervisor’s logs:
2022-01-18 17:55:36,853 INFO RPC interface 'multivisor' initialized
I try with eventlistener but not see process in the web server.
supervisorctl status
data-service RUNNING pid 17655, uptime 0:06:38
multivisor-rpc RUNNING pid 17654, uptime 0:06:38
Which ports should I open on the server and on the client?
Regards,
The connection to port 9002 of the instance where the rpc interface is installed from the webserver can be done correctly nc -v 10.54.130.34 9002 Connection to 10.54.130.34 9002 port [tcp/*] succeeded!
Hello, any helps?