Bug 1130494 - error in systemd service file
Summary: error in systemd service file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nginx
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jamie Nguyen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-15 12:11 UTC by Sven Esbjerg
Modified: 2014-08-18 23:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-18 23:46:10 UTC


Attachments (Terms of Use)

Description Sven Esbjerg 2014-08-15 12:11:23 UTC
Description of problem:

Nginx is unable to start due to an error in the systemd service file.
/usr/lib/systemd/system/nginx.service
It has PIDFile=/run/nginx.pid which should have been PIDFile=/var/run/nginx.pid

Version-Release number of selected component (if applicable):
nginx-1.6.1-2.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. yum install nginx
2. configure nginx
3. systemctl start nginx.service

Actual results:
[root@web02 sysconfig]# systemctl start nginx.service
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' 
[root@web02 sysconfig]# systemctl status nginx.service
nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: timeout) since Fri 2014-08-15 11:56:27 UTC; 7s ago

Aug 15 11:54:48 web02 nginx[9497]: nginx: the configuration file /etc/nginx/nginx.conf s
Aug 15 11:54:48 web02 nginx[9497]: nginx: configuration file /etc/nginx/nginx.conf test 
Aug 15 11:54:48 web02 systemd[1]: PID file /run/nginx.pid not readable (yet?) after star
Aug 15 11:56:27 web02 systemd[1]: nginx.service operation timed out. Terminating.
Aug 15 11:56:27 web02 systemd[1]: Failed to start The nginx HTTP and reverse proxy serve
Aug 15 11:56:27 web02 systemd[1]: Unit nginx.service entered failed state.


Expected results:
[root@web02 sysconfig]# systemctl start nginx.service
[root@web02 sysconfig]# ps ax|grep nginx
 9542 ?        Ss     0:00 nginx: master process /usr/sbin/nginx
 9543 ?        S      0:00 nginx: worker process

Additional info:

Comment 1 Warren Togami 2014-08-18 23:46:10 UTC
/run/nginx.pid is the default.  You changed it yourself to /var/run/nginx.pid.


Note You need to log in before you can comment on or make changes to this bug.