nginx: [crit] pread() "/opt/nginx" failed (21: Is a directory)

Maxim Dounin mdounin at mdounin.ru
Mon Apr 30 11:39:03 UTC 2012


Hello!

On Fri, Apr 27, 2012 at 09:59:15PM -0400, Gray, Steve, Wipro wrote:

> 
> Hi,
> I am using nginx 1.0.15 running on Solaris 10.  When I issue my 
> "/opt/nginx/sbin/nginx -s stop" command, I get this error 
> "nginx: [crit] pread() "/opt/nginx" failed (21: Is a 
> directory)". The funny thing is that I can issue 
> "/opt/nginx/sbin/nginx" to start nginx and get no errors.  Nginx 
> starts okay.  I can also issue "/opt/nginx/sbin/nginx -V or v" 
> and get no errors.  The "nginx: [crit] pread() "/opt/nginx" 
> failed (21: Is a directory)" error happens when I issue the 
> command with the "-s stop|reload|quit|reopen" options.
> My configure argument is --prefix=/opt/nginx. Has anyone seen 
> this or know why this is happening?  Let me know if you need any 
> more information from me.

The message suggests you have pid (either in config via 
http://nginx.org/r/pid or with --pid-path configure argument) set 
to "/opt/nginx".  The fact that nginx starts is actually strange 
though.  Could you please provide "nginx -V" output and full 
config used?

Maxim Dounin



More information about the nginx mailing list