Skip to content

Logs are not forwarded to STDOUT until nginx-log-forwarder is restarted (phusion/passenger-ruby25:0.9.34) #224

@thepry

Description

@thepry

UPDATE: Adding RUN rm -f /var/log/nginx/error.log to my Docker file helped with this issue. I'm not sure why, maybe it's some weird bug with nginx-log-forwarder service and error.log file.

....

Hi. I'm using phusion/passenger-ruby25:0.9.34 with Rails. Rails are using STDOUT as log destination, but the log doesn't appear in the docker logs, even though it is present in /var/log/nginx/error.log

If I run docker exec backend sv restart nginx-log-forwarder it appears.

Do you have any idea how to fix this problem?

What does your software stack look like?

Nginx + passenger + rails 5.1.4

What operating system and processor architecture are you using?

ubuntu EC2 (couldn't reproduce on my mac)

What did you do? 😱

nothing :)

What did you expect to see?

New Logs appear in the STDOUT

What did you see instead?

Only initial log:

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Jul  2 16:45:26 5056e3a95c28 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
Jul  2 16:45:27 5056e3a95c28 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/my_init.d/30_presetup_nginx.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 17
Jul  2 16:45:27 5056e3a95c28 cron[24]: (CRON) INFO (pidfile fd = 3)
Jul  2 16:45:27 5056e3a95c28 cron[24]: (CRON) INFO (Running @reboot jobs)
ok: run: /etc/service/nginx-log-forwarder: (pid 26) 1s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions