← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

 

Cosmic is out of support, closing the task.

** Changed in: nginx (Ubuntu Cosmic)
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1581864

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

Status in nginx package in Ubuntu:
  Fix Released
Status in nginx source package in Xenial:
  Confirmed
Status in nginx source package in Bionic:
  Confirmed
Status in nginx source package in Cosmic:
  Won't Fix
Status in nginx source package in Disco:
  Won't Fix
Status in nginx source package in Eoan:
  Fix Released
Status in nginx package in Debian:
  New

Bug description:
  [Description]

  Nginx logs an error when started on a machine with a single CPU:

  systemctl start nginx
  systemctl status nginx
  ● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2016-05-14 19:35:03 UTC; 2s ago
    Process: 1303 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
    Process: 1307 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 1306 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 1308 (nginx)
      Tasks: 5 (limit: 512)
     Memory: 3.1M
        CPU: 81ms
     CGroup: /system.slice/nginx.service
             ├─1308 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
             ├─1309 nginx: worker process
             ├─1310 nginx: worker process
             ├─1311 nginx: worker process
             └─1312 nginx: worker process

  May 14 19:35:03 ngx systemd[1]: Starting A high performance web server and a reverse proxy server...
  May 14 19:35:03 ngx systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
  May 14 19:35:03 ngx systemd[1]: Started A high performance web server and a reverse proxy server.

  Bumping the number of CPU available makes the error disappear. This is
  reproducible on VMs and containers.

  Lastly, the PID file is properly created and matches the PID of the
  master process.

  [Workaround]

    sudo mkdir /etc/systemd/system/nginx.service.d
    printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" | \
      sudo tee /etc/systemd/system/nginx.service.d/override.conf
    sudo systemctl daemon-reload
    sudo systemctl restart nginx

  [Additional information]

  # lsb_release -rd
  Description:	Ubuntu 16.04 LTS
  Release:	16.04

  # apt-cache policy nginx-core
  nginx-core:
    Installed: 1.10.0-0ubuntu0.16.04.1
    Candidate: 1.10.0-0ubuntu0.16.04.1
    Version table:
   *** 1.10.0-0ubuntu0.16.04.1 500
          500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       1.9.15-0ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: nginx-core 1.10.0-0ubuntu0.16.04.1
  ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
  Uname: Linux 4.4.0-22-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2
  Architecture: amd64
  Date: Sat May 14 19:35:21 2016
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
  SourcePackage: nginx
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864/+subscriptions