[Bug 2081308] Re: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

2024-09-20 Thread Adam Mosseri
I think 101 should prevent the service to start automatically (for
example in a chroot) and 0 should do nothing (for example for nginx, let
the service start) as it was the behaviour in previous releases.

https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
http://jpetazzo.github.io/2013/10/06/policy-rc-d-do-not-start-services-automatically/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2081308

Title:
  open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 2081308] [NEW] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

2024-09-20 Thread Adam Mosseri
Public bug reported:

Hi,

We've got an issue with Nginx and policy-rc.d on Ubuntu 24.04. Nginx
can't install when we create an policy-rc.d file with an `exit 0` code.

Here is the steps to reproduce :

1. Install Ubuntu 24.04 Live Server from the ISO.
2. Connect to the machine via SSH.
3. Create a **/usr/sbin/policy-rc.d** file containing :

```
#!/bin/sh

exit 0
```

4. Chmod the **policy-rc.d** file :

```
chmod 755 /usr/sbin/policy-rc.d
```

5. Install Nginx :

```
apt update
apt install -y nginx
```

Here is the output.

```
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait  
nginx est déjà la version la plus récente (1.24.0-2ubuntu7.1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 113 non mis à jour.
root@ubuntu24:~# apt remove --purge nginx
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait  
Les paquets suivants seront ENLEVÉS :
  nginx* nginx-common*
0 mis à jour, 0 nouvellement installés, 2 à enlever et 113 non mis à jour.
Après cette opération, 1 596 ko d'espace disque seront libérés.
Souhaitez-vous continuer ? [O/n] Y
(Lecture de la base de données... 83674 fichiers et répertoires déjà installés.)
Suppression de nginx-common (1.24.0-2ubuntu7.1) ...
Suppression de nginx (1.24.0-2ubuntu7.1) ...
Traitement des actions différées (« triggers ») pour man-db (2.12.0-4build2) ...
(Lecture de la base de données... 83649 fichiers et répertoires déjà installés.)
Purge des fichiers de configuration de nginx-common (1.24.0-2ubuntu7.1) ...
Traitement des actions différées (« triggers ») pour ufw (0.36.2-6) ...
root@ubuntu24:~# apt install nginx
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
Lecture des informations d'état... Fait  
Les paquets supplémentaires suivants seront installés : 
  nginx-common
Paquets suggérés :
  fcgiwrap nginx-doc ssl-cert
Les NOUVEAUX paquets suivants seront installés :
  nginx nginx-common
0 mis à jour, 2 nouvellement installés, 0 à enlever et 113 non mis à jour.
Il est nécessaire de prendre 552 ko dans les archives.
Après cette opération, 1 596 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] Y
Réception de :1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 
nginx-common all 1.24.0-2ubuntu7.1 [31,2 kB]
Réception de :2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 nginx 
amd64 1.24.0-2ubuntu7.1 [521 kB]
552 ko réceptionnés en 1s (759 ko/s)
Préconfiguration des paquets...
Sélection du paquet nginx-common précédemment désélectionné.
(Lecture de la base de données... 83626 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../nginx-common_1.24.0-2ubuntu7.1_all.deb ...
Dépaquetage de nginx-common (1.24.0-2ubuntu7.1) ...
Sélection du paquet nginx précédemment désélectionné.
Préparation du dépaquetage de .../nginx_1.24.0-2ubuntu7.1_amd64.deb ...
Dépaquetage de nginx (1.24.0-2ubuntu7.1) ...
Paramétrage de nginx (1.24.0-2ubuntu7.1) ...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for 
details.
invoke-rc.d: initscript nginx, action "start" failed.
× nginx.service - A high performance web server and a reverse proxy server
 Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; preset: 
enabled)
 Active: failed (Result: exit-code) since Fri 2024-09-20 13:20:58 UTC; 12ms 
ago
   Docs: man:nginx(8)
Process: 2641 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; 
master_process on; (code=exited, status=1/FAILURE)
CPU: 3ms

sept. 20 13:20:58 ubuntu24 systemd[1]: Starting nginx.service - A high 
performance web server and a reverse proxy server...
sept. 20 13:20:58 ubuntu24 nginx[2641]: 2024/09/20 13:20:58 [emerg] 2641#2641: 
open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
sept. 20 13:20:58 ubuntu24 nginx[2641]: nginx: configuration file 
/etc/nginx/nginx.conf test failed
sept. 20 13:20:58 ubuntu24 systemd[1]: nginx.service: Control process exited, 
code=exited, status=1/FAILURE
sept. 20 13:20:58 ubuntu24 systemd[1]: nginx.service: Failed with result 
'exit-code'.
sept. 20 13:20:58 ubuntu24 systemd[1]: Failed to start nginx.service - A high 
performance web server and a reverse proxy server.
dpkg: erreur de traitement du paquet nginx (--configure) :
 le sous-processus paquet nginx script post-installation installé a renvoyé un 
état de sortie d'erreur 1
dpkg: des problèmes de dépendances empêchent la configuration de nginx-common :
 nginx-common dépend de nginx (<< 1.24.0-2ubuntu7.1.1~); cependant :
 Le paquet nginx n'est pas encore configuré.

dpkg: erreur de traitement du paquet nginx-common (--configure) :
 problèmes de dépendances - laissé non configuré
Traitement des actions différées (« triggers ») pour ufw (0.36.2-6) ...
Aucun rapport « appor

[Bug 2058628] [NEW] initramfs-tools dhcpcd timeout

2024-03-21 Thread Adam Mosseri
Public bug reported:

Hi,

We found an issue in `initramfs-tools-core` (noble,now 0.142ubuntu20
all) related to this change :
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2024164
(dhclient replaced by dhcpcd).

dhclient was faster to give an IP. In the `initramfs-tools-core`
scripts, in **/usr/share/initramfs-tools/scripts/functions**, the
ROUNDTTT iterations at _2, 3, 4 or even 6 seconds_ fail. This delays
obtaining an IPv4 by at least 20 seconds.


```
# support ip options see linux sources
# Documentation/filesystems/nfs/nfsroot.txt
# Documentation/frv/booting.txt

for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do
local iter_entry_time iter_exit_time

iter_entry_time=$(time_elapsed)

if [ -z "${DEVICE}" ]; then
_set_available_devices_to_up
fi

case ${IP} in
none|done|off)
# Do nothing
IP="done"
;;
""|on|any|dhcp|bootp|both)
dhcpcd -1 -t $ROUNDTTT -4 ${DEVICE:+"${DEVICE}"}
;;
*)
ipconfig -t ${ROUNDTTT} -d "$IP"
```

dhcpcd takes at least 5/6 seconds to give an ipv4 because of the arp
probbing to check that the ip is not already in use.

**Possible Fixes**: `dhcpcd --noarp` prevents waiting, otherwise
redistribute the ROUNDTTT iterations by deleting the iterations at 2 3 4
or even 6 seconds.

NB: this problem probably only concerns obtaining an IP in IPv4, I have
not checked if the problem also arises in IPv6.

** Affects: initramfs-tools (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2058628

Title:
  initramfs-tools dhcpcd timeout

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2058628/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs