You are not logged in.

#1 2013-10-12 16:15:45

wombalton
Member
Registered: 2011-07-18
Posts: 17

Failed to read PID from file /run/nginx.pid: Invalid argument

Hi,

tried to get an nginx server running to set up an owncloud environment.

When starting the nginx server

  $  systemctl start nginx.service

I get the message: "Failed to read PID from file /run/nginx.pid: Invalid argument"

[root@klaus /etc/nginx]# systemctl status nginx
nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled)
   Active: active (running) since Sat 2013-10-12 17:50:46 CEST; 8min ago
  Process: 1823 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 1821 ExecStartPre=/usr/bin/nginx -t -q -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 1825 (nginx)
   CGroup: /system.slice/nginx.service
           ├─1825 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on;
           └─1826 nginx: worker process

Oct 12 17:50:46 klaus systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Oct 12 17:50:46 klaus systemd[1]: Started A high performance web server and a reverse proxy server.

but /run/nginx.pid is readable:

   # cat /run/nginx.pid 
  2058
  # ll /run/nginx.pid
  -rw-r--r-- 1 root root 4 Oct 12 17:39 /run/nginx.pid

It seems nginx is runnung thought but in my browser I only get a blank page.

Any help appreciated.

Last edited by wombalton (2013-10-13 14:17:46)

Offline

#2 2013-10-13 19:41:40

trogdor1138
Member
From: The AWS cloud
Registered: 2012-12-19
Posts: 12
Website

Re: Failed to read PID from file /run/nginx.pid: Invalid argument

How experienced are you with nginx? If you're getting a blank page and not an error then nginx is indeed running and answering HTTP requests. Most likely there is an error in your PHP configuration somewhere so that no HTML is generated.

It would be helpful to see your nginx configuration and the site configuration. I'm not a certified expert but I do set up servers almost daily with nginx so I can hopefully offer some pointers. I've also run ownCloud on nginx and PHP-FPM so I know it can indeed be done.

I don't know in regards to your PID issue. A quick Google search seemed to indicate this may just be systemd trying to read the file too soon after starting the process, resulting in a failure to read.

Offline

#3 2013-10-14 13:09:17

wombalton
Member
Registered: 2011-07-18
Posts: 17

Re: Failed to read PID from file /run/nginx.pid: Invalid argument

Actually it's the first time I tried to set up one.

I Basically followed this guide [1] adopting it to arch.
That's where i got my nginx.conf from. Taking the standard nginx.conf that comes by install and replacing the server part.
After some searching I found the owncloud manual[2] with an example nginx.conf. Comparing that with my one I found some differences. Applying them works out fine.

I get now the owncloud page.

The systemd error  still ocurs, but I think it does not matter to run the server.

Thanks for your help.

[1] https://docs.google.com/file/d/0B0ZsTQd … ring&pli=1
[2] http://doc.owncloud.org/server/5.0/admi … figuration

EDIT:
Just in case someone stumbles over this and tries to use the config:
This one [3] really works

[3] http://doc.owncloud.org/server/5.0/admi … thers.html

Last edited by wombalton (2013-10-14 13:31:22)

Offline

Board footer

Powered by FluxBB