unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49205: [services]: nginx doesn't restart after guix system reconfigure
@ 2021-06-24 11:35 Raghav Gururajan via Bug reports for GNU Guix
  2021-06-24 18:30 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2023-07-01  2:38 ` bug#49205: Closing Bug#49205: Usually caused by misconfigurations of Nginx Felix Lechner via Bug reports for GNU Guix
  0 siblings, 2 replies; 4+ messages in thread
From: Raghav Gururajan via Bug reports for GNU Guix @ 2021-06-24 11:35 UTC (permalink / raw)
  To: 49205


[-- Attachment #1.1: Type: text/plain, Size: 548 bytes --]

Hello Guix!

I am using certbot-service-type which also brings in nginx service. Upon 
`guix system reconfigure`, I get the following:

guix system: warning: exception caught while executing 'start' on 
service 'nginx':
Throw to key `%exception' with args `("#<&invoke-error program: 
\"/gnu/store/g6nhdp7i1sr51anq86hd6adrsm5ha857-nginx-1.21.0/sbin/nginx\" 
arguments: (\"-c\" 
\"/gnu/store/2igpjf27rm92np6jn6hfrxzx5m55a468-nginx.conf\" \"-p\" 
\"/var/run/nginx\") exit-status: 1 term-signal: #f stop-signal: #f>")'.

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#49205: [services]: nginx doesn't restart after guix system reconfigure
  2021-06-24 11:35 bug#49205: [services]: nginx doesn't restart after guix system reconfigure Raghav Gururajan via Bug reports for GNU Guix
@ 2021-06-24 18:30 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2022-12-09  9:14   ` Ludovic Courtès
  2023-07-01  2:38 ` bug#49205: Closing Bug#49205: Usually caused by misconfigurations of Nginx Felix Lechner via Bug reports for GNU Guix
  1 sibling, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2021-06-24 18:30 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: 49205

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Raghav Gururajan via Bug reports for GNU Guix 写道:
> Throw to key `%exception' with args `("#<&invoke-error program:
> \"/gnu/store/g6nhdp7i1sr51anq86hd6adrsm5ha857-nginx-1.21.0/sbin/nginx\" 
> arguments: (\"-c\"
> \"/gnu/store/2igpjf27rm92np6jn6hfrxzx5m55a468-nginx.conf\" 
> \"-p\" 
> \"/var/run/nginx\") exit-status: 1 term-signal: #f stop-signal: 
> #f>")'.

The shortest answer is to run this command manually and see what 
it prints out.  So

  $ sudo /gnu/store/g6n…/sbin/nginx -c /gnu/store/… -p 
  /var/run/nginx

in a terminal.

I saw you mention nginx and certbot in #guix.  It's unfortunately 
common to end up in a catch-22 with Guix's nginx and certbot 
services when using HTTP authentication, where nginx needs to be 
running to receive your first certificate but refuses to start 
because of missing certificates…

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#49205: [services]: nginx doesn't restart after guix system reconfigure
  2021-06-24 18:30 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2022-12-09  9:14   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-12-09  9:14 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Raghav Gururajan, 49205

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Raghav Gururajan via Bug reports for GNU Guix 写道:
>> Throw to key `%exception' with args `("#<&invoke-error program:
>> \"/gnu/store/g6nhdp7i1sr51anq86hd6adrsm5ha857-nginx-1.21.0/sbin/nginx\"
>> arguments: (\"-c\"
>> \"/gnu/store/2igpjf27rm92np6jn6hfrxzx5m55a468-nginx.conf\" \"-p\"
>> \"/var/run/nginx\") exit-status: 1 term-signal: #f stop-signal:
>> #f>")'.
>
> The shortest answer is to run this command manually and see what it
> prints out.  So
>
>  $ sudo /gnu/store/g6n…/sbin/nginx -c /gnu/store/… -p   /var/run/nginx
>
> in a terminal.

These days, with the Shepherd 0.9.3, the stdout/stderr or nginx is
captured in /var/log/messages when it starts.  That should make it
easier to debug startup failures.

If you don’t have more info on this bug Raghav (it’s been some time…), I
suggest we close it.

> I saw you mention nginx and certbot in #guix.  It's unfortunately
> common to end up in a catch-22 with Guix's nginx and certbot services
> when using HTTP authentication, where nginx needs to be running to
> receive your first certificate but refuses to start because of missing
> certificates…

I wonder how we could address that.

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#49205: Closing Bug#49205: Usually caused by misconfigurations of Nginx
  2021-06-24 11:35 bug#49205: [services]: nginx doesn't restart after guix system reconfigure Raghav Gururajan via Bug reports for GNU Guix
  2021-06-24 18:30 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2023-07-01  2:38 ` Felix Lechner via Bug reports for GNU Guix
  1 sibling, 0 replies; 4+ messages in thread
From: Felix Lechner via Bug reports for GNU Guix @ 2023-07-01  2:38 UTC (permalink / raw)
  To: 49205-done; +Cc: Raghav Gururajan, Ludovic Courtès, Tobias Geerinckx-Rice

Hi,

I have also seen this error several times. In my experience, it is
almost always caused by a misconfiguration of Nginx.

On my equipment, there is an exception to that rule when Nginx serves
outside connections as a reverse proxy to the local network, i.e.
something like: [1]

(body (list
  "proxy_pass http://lechner-desktop.us-core.com:3011;"
  "proxy_set_header Host $host;"
  "proxy_set_header X-Real-IP $remote_addr;"
  "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;"))

but that's somewhat exotic. It triggers a "host not found" in the logs.

My particular failure may have to do with the service ordering in
Shepherd, although I have not been able to fix it. For example, the
default prerequisites for Nginx do not even include 'networking. [2]
Either way, Nginx is configured to respawn, so my bug is probably
elsewhere.

Closing this issue.

Kind regards
Felix

[1] https://codeberg.org/lechner/system-config/src/commit/fca07b73068b043d57930266a2102af05b0b0aa9/host/wallace-server/operating-system.scm#L892-L895
[2] https://codeberg.org/lechner/guix/src/commit/f25529b08e356f89ca7cecc44295085531a8faba/gnu/services/web.scm#L567




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-02  2:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 11:35 bug#49205: [services]: nginx doesn't restart after guix system reconfigure Raghav Gururajan via Bug reports for GNU Guix
2021-06-24 18:30 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-12-09  9:14   ` Ludovic Courtès
2023-07-01  2:38 ` bug#49205: Closing Bug#49205: Usually caused by misconfigurations of Nginx Felix Lechner via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).