GNU bug report logs - #59515
nginx: Fails to start on boot while upstream service is not yet running

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>; dated Wed, 23 Nov 2022 15:36:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 59515 <at> debbugs.gnu.org:


Received: (at 59515) by debbugs.gnu.org; 25 Nov 2022 08:56:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 25 03:56:13 2022
Received: from localhost ([127.0.0.1]:33451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyUVJ-000060-AI
	for submit <at> debbugs.gnu.org; Fri, 25 Nov 2022 03:56:13 -0500
Received: from mout.web.de ([212.227.17.12]:55315)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonathan.brielmaier@HIDDEN>) id 1oyUVC-00005Q-Or
 for 59515 <at> debbugs.gnu.org; Fri, 25 Nov 2022 03:56:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1669366560; bh=M8AqJxCcVLgoCqe+K22oWALaqXwx74nSUwYY8j9gw7s=;
 h=X-UI-Sender-Class:Date:To:From:Subject;
 b=Zi3pgX65M7bV9bzsU2duuOD4k+U619pFnLyTSpxV3+Ig4IT3FznDqnMCGMu45GI//
 V6xycrKGqZqHGvUQL4jm+IPZ6+IGdtVxJDWhJGRkzpK3YxUPmy03T7QObQtcq3v6ss
 KWa0agpA5VyudR6FvyvW77tKS2HHBZLi1edg04wFnTJB5vKxcBWNPFos8vySc4HwK5
 zvwiDfa4aiktfRinqPzNQFgzvoOKRHXUAzsj//EealYxIhKTKPZd+xFS3NZS7sHaLa
 gwWf6tFk6j2Vo9c8OMYsh1CSQhkhWViWXul1JMJAaES8qIGg3z2BqLnnij1CxFqrbY
 nJTkAcFcPtwgg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from [192.168.178.23] ([77.179.164.143]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mx0Mr-1ooGst2a5b-00y4zs for
 <59515 <at> debbugs.gnu.org>; Fri, 25 Nov 2022 09:56:00 +0100
Message-ID: <ca94c57f-b01e-8201-da00-718991dda7f0@HIDDEN>
Date: Fri, 25 Nov 2022 09:56:00 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.5.0
To: 59515 <at> debbugs.gnu.org
Content-Language: en-US
From: Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>
Subject: nginx: Fails to start on boot while upstream service is not yet
 running
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:v1WgJY0yrYcP3bwGLIMe38G5sIoUm4ri0t3gldE7TJj3NcBpT6v
 DGibF3K9qpm70XC513SrOsHCQPiCCtlq5RtsLd6VR86+jmpzsTzBaCnJByG+mxJhvn63T3v
 7q3HAjYwGAOnjCEil8GprCRkRSBCaLqNdu1pqk5jmEDaMKruH8pZ+BovaSTAibFW4wRcVq5
 llFD3yKknrNbCvG2Dulxw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:5W2cPoC9S0M=;csVLl7N0hS+1s5GHgKPyqR4eNeN
 CAga78RbJg65+0fKnAcB8MsiNnbvqOFssiY6bgk+T/ej5r/fXzBecis8yx5YD2JxKqmJUuJ5H
 bXYwNhpikpwFAXgCFfq+jDdliBsVEdlMYY1Qqin2Zw7VitIO8G5PY0rnWyAsXp1mqWMJA5hGk
 3b1n43uVWEBr6+FSz5PWbJcNT8vyFw9qwbBXHYqwepyJmE38R/VT1wy+5GbiHJx5VxORKuvT/
 G/VxPul+zgNSUeOjSvoxqM7F8bc4SUW1tNa6kJcqQ0Qp24ie7nwr/vdMbkDjG7F5++H/Dp+5a
 Hor9RubNBQKkeswaduOfk8xz2vQW3Lrsk8xc+L1/PFLv08FX/u7I37n2YwKxul9R/Fnysp/Hd
 m+Dy0QXyao1Zd7SJ/gXCgDCuzNNZkIYMYfOIbYgubpsUtz9laVP9QxcknaCHcet/lrVn/yNpa
 fL0NGQkJPW2IGfFf0JG4ZvMTxwQ4hu24Oj77CVVM2fE5pHPz99auRYeoHLfNZWJUF4T//CMwF
 Hg7E6gBxIr0z/Qh+mMlDQMsZ4sBoOtTXoHzAfRh1V7lpgDFZDpjqmuhzpo3pHrLmw7xT809CG
 Ql8OSsmpn+rUORRC/POnotTI1EEBX7j2YVMohTlJxn5EbvdrFKi8s06+WLiRSZbqQco+VMwKb
 dEIIUqKusnKidYXiWyWGZWiBzm+oANQ5dwYcMlTEJuGL7O+9g96AiQVNqKb0Jfc52cAWiqeBJ
 OHOqTaJ4UfCmmWJecWLtJM9sgvAuY1A9E2YDWSin568n80SDZcC8ABHr1MPzao68cDO7acOCx
 YOXF345toCEGwdbLKnLBJwzJv4WnuKHhHHj4xpYoxNf6g2dT3/VA0CBxrRUV7+/oKN3xMYLpA
 WXzM+OYCzVbOmYrUiDzPSWj3ukuWDr3IS5ZJs0q6XBSd+id0tPIl2EiYNAdacqp3Kmj4uaPC2
 ZEOcFg==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 59515
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ah thanks.

I added `(shepherd-requirement '(radicale))` to my nginx-configuration.
Sadly the issue is not fixed, the situation is the same as before.

I assume that radicale takes a fracture of a second to start. And nginx
starts faster up. See this small experiment:

$ sudo herd stop radicale
$ sudo herd start radicale; curl localhost:5232
Service radicale has been started.
curl: (7) Failed to connect to localhost port 5232 after 0 ms:
Verbindungsaufbau abgelehnt

$ sudo herd stop radicale
$ sudo herd start radicale; sleep 0.2; curl localhost:5232
Service radicale has been started.
Redirected to /.web




Information forwarded to bug-guix@HIDDEN:
bug#59515; Package guix. Full text available.

Message received at 59515 <at> debbugs.gnu.org:


Received: (at 59515) by debbugs.gnu.org; 23 Nov 2022 17:35:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 23 12:35:40 2022
Received: from localhost ([127.0.0.1]:56102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxteu-0000L0-FR
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 12:35:40 -0500
Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:57552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mirai@HIDDEN>) id 1oxtes-0000Kr-4R
 for 59515 <at> debbugs.gnu.org; Wed, 23 Nov 2022 12:35:38 -0500
Received: from mail1.netim.hosting (unknown [185.26.106.172])
 by smtpmciv4.myservices.hosting (Postfix) with ESMTP id B3B0620730
 for <59515 <at> debbugs.gnu.org>; Wed, 23 Nov 2022 18:35:35 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
 by mail1.netim.hosting (Postfix) with ESMTP id 5759480099
 for <59515 <at> debbugs.gnu.org>; Wed, 23 Nov 2022 18:35:35 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting
Received: from mail1.netim.hosting ([127.0.0.1])
 by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id VWy18LscPXnb for <59515 <at> debbugs.gnu.org>;
 Wed, 23 Nov 2022 18:35:35 +0100 (CET)
Received: from [192.168.1.239] (unknown [10.192.1.83])
 (Authenticated sender: lumen@HIDDEN)
 by mail1.netim.hosting (Postfix) with ESMTPSA id 0CC1B80098
 for <59515 <at> debbugs.gnu.org>; Wed, 23 Nov 2022 18:35:34 +0100 (CET)
Message-ID: <61612e6d-0ac1-8129-917c-2e72d629c3be@HIDDEN>
Date: Wed, 23 Nov 2022 17:35:34 +0000
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.2
To: 59515 <at> debbugs.gnu.org
Subject: nginx: Fails to start on boot while upstream service is not yet
 running
Content-Language: en-US
From: mirai <mirai@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59515
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

nginx-configuration has a 'shepherd-requirement' parameter that can be used here




Information forwarded to bug-guix@HIDDEN:
bug#59515; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 15:35:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 23 10:35:13 2022
Received: from localhost ([127.0.0.1]:55946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxrmK-0007MC-QR
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 10:35:13 -0500
Received: from lists.gnu.org ([209.51.188.17]:37172)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonathan.brielmaier@HIDDEN>) id 1oxrmF-0007Lz-PK
 for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 10:35:10 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jonathan.brielmaier@HIDDEN>)
 id 1oxrmF-0003m3-Gb
 for bug-guix@HIDDEN; Wed, 23 Nov 2022 10:35:07 -0500
Received: from mout.web.de ([212.227.17.12])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jonathan.brielmaier@HIDDEN>)
 id 1oxrmC-00017f-Er
 for bug-guix@HIDDEN; Wed, 23 Nov 2022 10:35:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1669217700; bh=WUVMlWjDiMsYLE1X6lYVHwK7iCwfdVsiTfRgGDWf4fE=;
 h=X-UI-Sender-Class:Date:To:From:Subject;
 b=HbOAm99Js08S62tQUCjO0LSldqnLpavfTcLPYi6MArg0L2nPQHlpENz7Uc6jhUDJ6
 UBzfnzVovZjw1vPXp380bs1LVAFQRMWi61f3ALuMkbWKW9tBsexJgZf8vUTHPimE6C
 BObKR9FJ69+yBShCbTJIK8r1Hdtm32xcB5VmuEZjumiwhx22hCOzz0qg+ZXSfqX9rC
 9ezB4tnBultqTzeWKvZA+QEAvODeJWofE+kQacNedvihI0Zbdy/haPqUsbWBkPAJgc
 gFg86+S2MBk01a7NKYBW8U2h/Ugcw5/XDIA1ju5lTaZrhK7hdjwDb+eA3wPU57lL5r
 7p2cW98SFX2jg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from [192.168.178.23] ([77.189.2.155]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MIyeG-1oda2Q0wUU-00KaCJ for
 <bug-guix@HIDDEN>; Wed, 23 Nov 2022 16:35:00 +0100
Message-ID: <82b04209-e3ec-a854-314e-d3c77ad14ac4@HIDDEN>
Date: Wed, 23 Nov 2022 16:34:57 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.5.0
To: bug-guix@HIDDEN
Content-Language: en-US
From: Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>
Subject: nginx: Fails to start on boot while upstream service is not yet
 running
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:tS94VUeoRFiCHvASPJMBLkywn8nqq10fkCAt+OEXi+ZYvb3Et0B
 1QJOmpNW6bJ9OyiKuy2EYn6uEGxnoppr62Wq9h3hWT20bO8gaw0AawwvkIBRqCxm2xf8knd
 RtM4dXZaAmkyjlzf3xt1x5aPKtHWK2ng7cW1MP3BpEQfAq0Zwy2R9V7v5Kf3ST/mmWtcyOm
 NugmLKN0LK8mp7SKIbdVA==
X-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=212.227.17.12;
 envelope-from=jonathan.brielmaier@HIDDEN; helo=mout.web.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

When I start my personal server with a radicale service behind a nginx
reverse proxy, nginx fails to start.

The relevant part in the log:
Nov 23 16:02:56 localhost shepherd[1]: Service networking has been started=
.
Nov 23 16:02:56 localhost shepherd[1]: Service radicale has been started.
Nov 23 16:02:56 localhost shepherd[1]: Service ssh-daemon has been started=
.
Nov 23 16:02:56 localhost shepherd[1]: [nginx] nginx: [emerg] host not
found in upstream "localhost:5232" in
/gnu/store/y29zl57pprwxbcxfx593s16456kxk99y-nginx.conf:15
Nov 23 16:02:56 localhost shepherd[1]: Failed to start nginx in the
background.

The config can be found here:
https://gitlab.com/jonsger/jonsger-guix/-/blob/master/config/baebia.scm#L1=
16
```
(upstream-blocks (list
   (nginx-upstream-configuration
     (name "radicale")
     (servers (list "localhost:5232")))))
```

I wonder whats going wrong here. Is there a way to define that nginx
service should wait until radicale service is started?

~Jonathan




Acknowledgement sent to Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#59515; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 25 Nov 2022 09:00:02 UTC

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