GNU bug report logs - #36388
nginx startup logging error, at odds with documentation

Previous Next

Package: guix;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Wed, 26 Jun 2019 05:19:02 UTC

Severity: normal

To reply to this bug, email your comments to 36388 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#36388; Package guix. (Wed, 26 Jun 2019 05:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Vollmert <rob <at> vllmrt.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 26 Jun 2019 05:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Vollmert <rob <at> vllmrt.net>
To: bug-guix <at> gnu.org
Subject: nginx startup logging error, at odds with documentation
Date: Wed, 26 Jun 2019 07:18:38 +0200
The documentation states:

   At startup, ‘nginx’ has not yet read its configuration file, so it
uses a default file to log error messages.  If it fails to load its
configuration file, that is where error messages are logged.  After the
configuration file is loaded, the default error log file changes as per
configuration.  In our case, startup error messages can be found in
‘/var/run/nginx/logs/error.log’, and after configuration in
‘/var/log/nginx/error.log’.  The second location can be changed with the
LOG-DIRECTORY configuration option.

But I see:

creating nginx log directory '/var/log/nginx'
creating nginx run directory '/var/run/nginx'
creating nginx temp directories '/var/run/nginx/{client_body,proxy,fastcgi,uwsgi,scgi}_temp'
nginx: [alert] could not open error log file: open() "/gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/logs/error.log" failed (2: No such file or directory)

It seems the documentation assumes nginx’s prefix directory is /var/run/nginx
instead of in the store. Some likely ways to improve this would be to pass
`-p /var/run/nginx` or `-g “error_log /var/log/nginx/error.log”` as command
line flags when starting nginx:

$ /gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/sbin/nginx -h
nginx version: nginx/1.17.0
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -T            : test configuration, dump it and exit
  -q            : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: /gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file






Information forwarded to bug-guix <at> gnu.org:
bug#36388; Package guix. (Wed, 26 Jun 2019 18:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 36388 <at> debbugs.gnu.org (full text, mbox):

From: Robert Vollmert <rob <at> vllmrt.net>
To: 36388 <at> debbugs.gnu.org
Subject: activation?
Date: Wed, 26 Jun 2019 20:23:23 +0200
Could it be that the errors happen in the activation script,
but not when actually starting nginx? I see in the code that
we appear to pass a “-p” flag already when starting nginx;
maybe we should simply do the same when testing the config
during activation?



Information forwarded to bug-guix <at> gnu.org:
bug#36388; Package guix. (Thu, 27 Jun 2019 15:22:03 GMT) Full text and rfc822 format available.

Message #11 received at 36388 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Robert Vollmert <rob <at> vllmrt.net>
Cc: 36388 <at> debbugs.gnu.org
Subject: Re: bug#36388: activation?
Date: Thu, 27 Jun 2019 17:21:47 +0200
Hi,

Robert Vollmert <rob <at> vllmrt.net> skribis:

> Could it be that the errors happen in the activation script,
> but not when actually starting nginx? I see in the code that
> we appear to pass a “-p” flag already when starting nginx;
> maybe we should simply do the same when testing the config
> during activation?

Probably, that must be where the error comes from.

Ludo’.




This bug report was last modified 4 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.