vflow
vflow copied to clipboard
Supervisord Stdout and Stderr are lost when running in a docker container
Currently, there are two places where logs end up when running in a docker container, the docker logs (seen by running docker logs <container name>
) and the vFlow logs (set in the config value log-file
). This does not capture the Supervisord stdout and stderr.
I ran into this when I set the wrong volume path for the docker container. I continually kept seeing the following:
2017-12-19 00:37:23,626 INFO spawned: 'vflow' with pid 9
2017-12-19 00:37:24,415 INFO exited: vflow (exit status 1; not expected)
2017-12-19 00:37:25,417 INFO spawned: 'vflow' with pid 17
2017-12-19 00:37:26,211 INFO exited: vflow (exit status 1; not expected)
2017-12-19 00:37:28,218 INFO spawned: 'vflow' with pid 27
2017-12-19 00:37:29,005 INFO exited: vflow (exit status 1; not expected)
2017-12-19 00:37:32,010 INFO spawned: 'vflow' with pid 36
2017-12-19 00:37:32,816 INFO exited: vflow (exit status 1; not expected)
2017-12-19 00:37:33,818 INFO gave up: vflow entered FATAL state, too many start retries too quickly
And since my volume path was messed up vFlow never properly started and read my config file so I never got logs in my vflow log-file.
It wasn't until I set the supervisord stdout and stderr log files using the following in vflow.supervisor did I see my error:
stdout_logfile=/etc/vflow/stdout.log
stderr_logfile=/etc/vflow/stderr.log
I'm not sure what the ramifications of hardcoding those values would be but that worked for my use-case.