Supervisor: Supervisor not outputting child process logs

Created on 20 Feb 2017  路  1Comment  路  Source: Supervisor/supervisor

So I've got a process called configurator that I'm running out of supervisor, and the output for said process aren't making it into the supervisor (or child processes) logs.

If I start the script by hand, here's the log output:

Starting server
Listening on: https://0.0.0.0:3218

But if I start the script via supervisor here's the log output:

==> /var/log/supervisor/configurator-err.log <==

==> /var/log/supervisor/configurator-out.log <==

==> /var/log/supervisor/supervisord.log <==
2017-02-20 14:58:09,079 CRIT Supervisor running as root (no user in config file)
2017-02-20 14:58:09,080 WARN Included extra file "/etc/supervisor/conf.d/hass-configurator.conf" during parsing
2017-02-20 14:58:09,115 INFO RPC interface 'supervisor' initialized
2017-02-20 14:58:09,116 INFO RPC interface 'supervisor' initialized
2017-02-20 14:58:09,117 INFO supervisord started with pid 15350
2017-02-20 14:58:10,123 INFO spawned: 'hass-configurator' with pid 15354
2017-02-20 14:58:11,127 INFO success: hass-configurator entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Here's the supervisor config for the script:

[program:hass-configurator]
directory = /etc/homeassistant/.homeassistant/
command = /etc/homeassistant/.homeassistant/configurator.py /etc/homeassistant/.homeassistant/settings.conf 2>&1
user = hass
stdout_logfile=/var/log/supervisor/configurator-out.log
stderr_logfile=/var/log/supervisor/configurator-err.log

No matter what config options i've tried, I can not get the scripts output to show up in the supervisor logs.

What am I doing wrong here?

logging question

Most helpful comment

Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.

Your Python program configurator.py may be buffering its output. You can try explicitly flushing stdout with sys.stdout.flush() in the program or running it unbuffered with python -u (or PYTHONUNBUFFERED).

>All comments

Please ask questions about using Supervisor on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself.

Your Python program configurator.py may be buffering its output. You can try explicitly flushing stdout with sys.stdout.flush() in the program or running it unbuffered with python -u (or PYTHONUNBUFFERED).

Was this page helpful?
0 / 5 - 0 ratings