Closed gjchung closed 5 years ago
@gjchung May be related to: https://github.com/moby/moby/issues/31243
in particular, this line:
sh = logging.StreamHandler(sys.stdout)
Let me know if changing that fixes it. You could also try the patch in https://github.com/jegesh/python-sqs-listener/pull/17
I've removed the logging lines for now and passed in a different logs for stdout and stderr to write to.
daemon = VoteMessagesDaemon('/var/run/sqs_daemon.pid', stdout='/var/log/daemon/access.log', stderr='/var/log/daemon/error.log')
But now it looks like it runs and few times and dies.
[2018-10-17 18:05:51 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2018-10-17 18:05:51 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2018-10-17 18:05:51 +0000] [1] [INFO] Using worker: sync
[2018-10-17 18:05:51 +0000] [7] [INFO] Booting worker with pid: 7
[2018-10-17 18:05:51 +0000] [7] [INFO] Worker exiting (pid: 7)
[2018-10-17 18:05:51 +0000] [8] [INFO] Worker exiting (pid: 7)
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e112b38>
Starting vote listener daemon
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e112b38>
Starting vote listener daemon
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e112b38>
Starting vote listener daemon
[2018-10-17 18:05:52 +0000] [10] [INFO] Booting worker with pid: 10
[2018-10-17 18:05:53 +0000] [10] [INFO] Worker exiting (pid: 10)
[2018-10-17 18:05:53 +0000] [11] [INFO] Worker exiting (pid: 10)
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e102c18>
Starting vote listener daemon
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e102c18>
Starting vote listener daemon
__name__ = joker.poller.app
******************** Trying to start daemon *********************
daemon = <joker.poller.app.VoteMessagesDaemon object at 0x7f946e102c18>
Starting vote listener daemon
[2018-10-17 18:05:53 +0000] [1] [INFO] Shutting down: Master
[2018-10-17 18:05:53 +0000] [1] [INFO] Reason: Worker failed to boot.
exited with code 3
It's dying immediately and restarting, so either the same issue is occurring or you're hitting something else. What do the logs say?
Nothing is being written to the log files
Suggest you check your docker user's permissions and see if you have access to write to those locations. Seems likely it's a docker misconfiguration issue, so you may want to ask your local docker expert.
Hi,
I'm trying to get this listener up and running in Docker but I'm getting the following error when the daemon starts up:
Here's my code:
Any thoughts on what is the cause of the problem?
Thank you for your help! Joycelyn