# Nginx not starting with named pipe (fifo) for access\_log

**URL:** <https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307>\
**Category:** NGINX\
**Created:** [January 2, 2014, 6:00pm UTC](https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307 "2014-01-02T18:00:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [January 2, 2014, 6:00pm UTC](https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307/1 "2014-01-02T18:00:31Z")

</div>

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  
[NGINX Stable : “Nginx” team](https://launchpad.net/~nginx/+archive/stable) )
- 1.4.4 (CentOS 6.5 amd64 with repo  
[http://nginx.org/packages/centos/$releasever/$basearch/](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

---

<div class="post-metadata">

**Author:** ![Sven\_Wiese](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@Sven\_Wiese](https://www.ruby-forum.com/u/Sven_Wiese)\
**Post date:** [January 26, 2014, 5:55pm UTC](https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307/2 "2014-01-26T17:55:32Z")

</div>

Do you have a program set up to read from the other end of those pipes?
