I can set error_log = /proc/self/fd/2 in /etc/php7/php-fpm.conf and it will work via Docker, but not in case of Rkt. How to fix it and get similar things in Rkt containers?
I would like to use systemctl status my-php-fpm-custom.service command to see anything related with php-fpm errors. How to get alternative behaviour with Rkt?..
[2049696.466446] sashaboldyreva[5]: [28-Sep-2016 23:14:31] ERROR: failed to open error_log (/proc/self/fd/2): No such device or address (6)
[2049696.466749] sashaboldyreva[5]: [28-Sep-2016 23:14:31] ERROR: failed to post process the configuration
[2049696.467053] sashaboldyreva[5]: [28-Sep-2016 23:14:31] ERROR: FPM initialization failed
Related question about Docker php-fpm image: http://serverfault.com/questions/658367/how-to-get-php-fpm-to-log-to-stdout-stderr-when-running-in-a-docker-container
lrwx------ 1 root root 64 Sep 29 00:38 /proc/self/fd/2 -> /dev/pts/0
Thanks for the report @lorddaedra. For future reference, quoting the full commands/images/units being run would help us in reproducing and triaging issues.
From a quick look at this, it seems you hit https://github.com/coreos/rkt/issues/2300. The current status of this is issue is that we discourage such setup in non-interactive mode, because the /proc/self/fd/2 provided by journald is going to be a socket, while most applications expect it to be a regular file.
If you are trying to run a docker-converted image, pointing it to /dev/stderr should work. The main limitation of this is that error_log will go directly to the _host_ journald as explained here.
@lucab: this can be closed I think.
Most helpful comment
Thanks for the report @lorddaedra. For future reference, quoting the full commands/images/units being run would help us in reproducing and triaging issues.
From a quick look at this, it seems you hit https://github.com/coreos/rkt/issues/2300. The current status of this is issue is that we discourage such setup in non-interactive mode, because the
/proc/self/fd/2provided by journald is going to be a socket, while most applications expect it to be a regular file.If you are trying to run a docker-converted image, pointing it to
/dev/stderrshould work. The main limitation of this is thaterror_logwill go directly to the _host_ journald as explained here.