Forum: NGINX Nginx not starting with named pipe (fifo) for access_log

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
865853bfbf2b8797d0f32e72e887739a?d=identicon&s=25 Sven Wiese (Guest)
on 2014-01-02 18:00
(Received via mailing list)
Heya,

there seems to be a issue with Nginx and named pipes (fifo).

Tested nginx versions:
- 1.1.19 (Ubuntu 12.04.3 LTS amd64)
- 1.4.4 (Ubuntu 12.04.3 LTS amd64 with PPA
https://launchpad.net/~nginx/+archive/stable )
- 1.4.4 (CentOS 6.5 amd64 with repo
http://nginx.org/packages/centos/$releasever/$basearch/ )

Issue description:
As soon as a named pipe is defined as access_log, nginx refuses to
start. It just stales during the start and that's it. The only you can
do is kill the process.
The named pipe has been created with: mkfifo -m 0666 /var/log/test.log

I have tested 2 versions of Nginx (1.1.19, 1.4.4) using Ubuntus
repository. Different locations and different permissions of the named
pipe have been tried, didn't help.
Other programs work just fine with the named pipe, only Nginx seems to
refuse it.

Configuration:
--snip--
http {
[...]
         access_log /var/log/nginx/access.log;
         error_log /var/log/nginx/error.log;
         access_log /var/log/test.log;
[...]
}
--snap--

strace output:
--snip--
[...]
open("/var/log/nginx/access.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
open("/var/log/nginx/error.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 6
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
open("/var/log/test.log", O_WRONLY|O_CREAT|O_APPEND, 0644
[ CTRL+C ]
--snap--


Did anyone else experience such behavior? I tried searching for it but
couldn't find anything, only people seeming to successfully use named
pipes (eg. in conjunction with syslog-ng).

Cheers,
Sven
6064b942ed0fecb4b876af1d61b384a5?d=identicon&s=25 Manole, Sorin (Guest)
on 2014-01-26 17:55
(Received via mailing list)
Do you have a program set up to read from the other end of those pipes?
This topic is locked and can not be replied to.