Rkt: /proc/self/fd/2 inside Rkt-containers

Created on 28 Sep 2016  路  4Comments  路  Source: rkt/rkt

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
componenstage1 kinquestion

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/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.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s-urbaniak picture s-urbaniak  路  4Comments

monder picture monder  路  3Comments

waisbrot picture waisbrot  路  6Comments

tjdett picture tjdett  路  5Comments

onlyjob picture onlyjob  路  4Comments