0

I am trying to run supervisor as following:

azure@G01:~$ sudo supervisord -c /etc/supervisor/supervisord.conf I tried to trouble shoot as mucg as I could with no results. I do not know what the issue is about. I even create the file /var/run/supervisor.sock manually with the same user azure and with 0777 and it did not work.

Error: Cannot open an HTTP server: socket.error reported errno.EADDRNOTAVAIL (99) For help, use /usr/bin/supervisord -h

Here is my supervisord.conf

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0777                      ; sockef file mode (default 0700)

[inet_http_server]          ; inet (TCP) server disabled by default
port=X.X.X.180:9001     ; (ip_address:port specifier, *:port for all iface)
username=xxxxx; (default is no username (open server))
password=xxxxx@2024   ; (default is no password (open server))

[supervisord]
logfile=/var/www/html/mywebsite.com/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid                          ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor                           ; ('AUTO' child log dir, default $TEMP)
logfile_maxbytes=50MB       ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10          ; (num of main logfile rotation backups;default 10)
loglevel=info               ; (log level;default info; others: debug,warn,trace)
nodaemon=false              ; (start in foreground if true;default false)
minfds=1024                 ; (min. avail startup file descriptors;default 1024)
minprocs=200                ; (min. avail process descriptors;default 200)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf
2
  • 1
    Welcome, the PID file will be created when the process is up. I think you did not read the error correctly, it says (for me) that the port is already in use.
    – djdomi
    Apr 3 at 5:30
  • Hi. Thanks for your reply. I don't think the port 9001 is in use. I noticed that supervisor runs is I remove the inet_http_server part and if I use it it does not run with the error I posted. The journalctl log says : Error: Cannot open an HTTP server: socket.error reported errno.EADDRNOTAVAIL (99) systemd[1]: supervisor.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    – Dev Dev
    Apr 3 at 10:42

1 Answer 1

1

This issue depends on the server you are using. Mine was Azure server. The only way I could fix my issue is by using 0.0.0.0 as IP address.

[inet_http_server]          ; inet (TCP) server disabled by default
port=0.0.0.0:9001     ; (ip_address:port specifier, *:port for all iface)

This post here helped me: NodeJS - Error: listen EADDRNOTAVAIL: address not available

2
  • I see that my hunt was useful, sofar I please you to accept your answer in 24 hours afterwards
    – djdomi
    Apr 3 at 18:09
  • I will do thanks.
    – Dev Dev
    Apr 4 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .