Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942868 - www-servers/nginx-1.26.2-r6: start-stop-daemon: did not create a valid pid in `/run/nginx/nginx.pid'
Summary: www-servers/nginx-1.26.2-r6: start-stop-daemon: did not create a valid pid in...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal critical
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-04 09:25 UTC by Agostino Sarubbo
Modified: 2024-11-04 09:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-11-04 09:25:20 UTC
I'm on nginx-1.26.2-r6

When starting:

 ~ # /etc/init.d/nginx restart
 * Starting nginx ...
 * start-stop-daemon: did not create a valid pid in `/run/nginx/nginx.pid'
 * Failed to start nginx                                                                                                                                                         [ !! ]
 * ERROR: nginx failed to start


but:
 ~ # ps aux | grep nginx
root      2102  0.0  0.1  63592  3792 ?        Ss   10:19   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx     2103  0.0  0.4  63876  8512 ?        S    10:19   0:00 nginx: worker process
nginx     2104  0.0  0.4  63840  8572 ?        S    10:19   0:00 nginx: worker process

and:
 ~ # cat /run/nginx.pid 
2102


So basically it writes /run/nginx.pid but /run/nginx/nginx.pid is expected.


Probably broken by:

commit 108a642ef4da9fa6ae4f0d33580a05cea3f70678
Author: Alexander Lopatin <alopatindev@codonaft.com>
Date:   Sat Sep 14 01:01:51 2024 +0800

    www-servers/nginx: fix directory path to pid file
    
    Closes: https://bugs.gentoo.org/939560
    Signed-off-by: Alexander Lopatin <alopatindev@codonaft.com>
    Closes: https://github.com/gentoo/gentoo/pull/38593
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-04 09:27:59 UTC
See https://bugs.gentoo.org/939560#c6.
Comment 2 Joonas Niilola gentoo-dev 2024-11-04 09:38:09 UTC
Yeah, etc-update or dispatch-conf should be triggered on update. But I'll admit it's not obvious why "pid /run/nginx.pid" is removed from nginx.conf, and maybe the config file itself should have a comment about it.

# Handled by init.d/service files now.
# pid /run/nginx.pid;

Although doing that requires some extra steps in the ebuild :I
Comment 3 Agostino Sarubbo gentoo-dev 2024-11-04 09:39:31 UTC
etc-update did not propose anything :/

Anyway I had:
pid /run/nginx.pid;
in nginx.conf