Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rc-service nginx don't start at reboot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Wed Nov 23, 2022 9:12 pm    Post subject: rc-service nginx don't start at reboot Reply with quote

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
View user's profile Send private message
hdcg
Tux's lil' helper
Tux's lil' helper


Joined: 07 Apr 2013
Posts: 120

PostPosted: Thu Nov 24, 2022 6:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
denn0n
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2020
Posts: 87

PostPosted: Thu Nov 24, 2022 10:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum