View previous topic :: View next topic |
Author |
Message |
denn0n Tux's lil' helper
Joined: 24 May 2020 Posts: 87
|
Posted: Wed Nov 23, 2022 9:12 pm Post subject: rc-service nginx don't start at reboot |
|
|
Hi I have a VM Gentoo whit nginx and when reboot this service don't start and it is in default runlevel
Code: | rc-update
binfmt | boot
bootmisc | boot
cgroups | sysinit
dbus | default
devfs | sysinit
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default nonetwork
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
nginx | default
openvpn.client | default
php-fpm | default
procfs | boot
root | boot
save-keymaps | boot
save-termencoding | boot
savecache | shutdown
sshd | boot
swap | boot
sysctl | boot
sysfs | sysinit
systemd-tmpfiles-setup | boot
systemd-tmpfiles-setup-dev | sysinit
termencoding | boot
udev | sysinit
udev-trigger | sysinit
urandom | boot
virtualbox-guest-additions | default |
|
|
Back to top |
|
|
hdcg Tux's lil' helper
Joined: 07 Apr 2013 Posts: 120
|
Posted: Thu Nov 24, 2022 6:29 pm Post subject: |
|
|
Hi denn0n,
what is reported in the nginx logs?
My guess for the cause would be a missing service dependency.
Seeing php-fpm in your list as well, may be nginx has to be started after it.
If the dependency is the cause, add the necessary rc_need statement to /etc/conf.d/nginx.
See /etc/rc.conf for examples:
Code: | # It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net" |
Best Regards,
Holger |
|
Back to top |
|
|
denn0n Tux's lil' helper
Joined: 24 May 2020 Posts: 87
|
Posted: Thu Nov 24, 2022 10:38 pm Post subject: |
|
|
Hi Holger
Thank you for you advise in the error log
Code: |
2022/11/24 16:24:50 [emerg] 2279#0: bind() to 10.8.100.20:80 failed (99: Cannot assign requested address)
2022/11/24 16:24:50 [emerg] 2328#0: bind() to 10.8.100.20:80 failed (99: Cannot assign requested address)
|
the IP to bind it comes from openvpn then I add
rc_need="openvpn.client"
to
/etc/conf.d/nginx
and works perfectly
Thank You a lot !
hdcg wrote: | Hi denn0n,
what is reported in the nginx logs?
My guess for the cause would be a missing service dependency.
Seeing php-fpm in your list as well, may be nginx has to be started after it.
If the dependency is the cause, add the necessary rc_need statement to /etc/conf.d/nginx.
See /etc/rc.conf for examples:
Code: | # It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net" |
Best Regards,
Holger |
|
|
Back to top |
|
|
|