sdr-enthusiasts / docker-reversewebproxy

GNU General Public License v3.0
15 stars 7 forks source link

log errors from awk; nginx not writing access.log #55

Closed dziban303 closed 6 months ago

dziban303 commented 9 months ago

As we discussed in Discord, webproxy is repeatedly throwing errors into the container logs once per minute. Webproxy still works fine. The error is:

awk: fatal: cannot open file `/var/log/nginx/access.log' for reading: No such file or directory

Within the container, examining /var/log/nginx shows:

image

a bunch of logs with size = 0, and notably, no access.log or error.log.

Looking at /etc/nginx/nginx.conf, the final lines say

        # This entry is to enable iptables blocking. The ### will be removed if enabled upon start of the container:
access_log /dev/stdout ;

}

You had some suspicion that the issue lies with VERBOSELOG but honestly I kind of lost the train of though while trying different things on my own. After setting VERBOSELOG=OFF, restarting the container, then VERBOSELOG=ON again, and restarting again, whether right or wrong, does seem to have stopped the behavior. No more awk errors, /var/log/nginx/access.log exists and is being written to.

image

Anyway, now there's an issue to track this behavior.