Can you really start Apache manually?

If so, you need to make this your command assynchronously:
sleep 30 ; systemctl start httpd
(forking from the rest of boot process)
Because without forking, you might be pausing whole boot process and
only delaying the problem 30 seconds.
One way can be o write that line to a separate script (such as
/etc/mywait.sh) and call* this from /etc/rc.d/rc.local :
/etc/mywait.sh &
(ampersand makes to fork the command to the background)

(*) Sure that that is really being executed (e.g. "touch /tmp/executed")


Did you try to not bind Apache to a specific address (if it's not a
problem for your setup) ?




El 11/08/17 a les 10:20, Daniel Bethe ha escrit:
> Hi guys. I have an openvz VPS at a data center facility. My VPS contains
> stock CentOS 7 and the problem is that Apache doesn't launch on boot. I
> don't know anything about the physical host server and I have never used
> openvz. I don't know how it's configured or what version it is.
> 
> https://paste.fedoraproject.org/paste/P8dqs3aGMyrRFbVCi7KgYw
> 
> Linux v 2.6.32-042stab120.11 #1 SMP Wed Nov 16 12:05:45 MSK 2016 x86_64
> x86_64 x86_64 GNU/Linux
> 
> Openvz hasn't fully initialized the venet network interface by the time
> Apache is trying to bind to its IP address. SSHD is my only other
> service on this VPS and it starts fine because it's presently not
> configured to bind to a specific IP address as Apache is configured to do.
> 
> This is the only article I can find on the subject, where someone else
> has the same problem:
> 
> https://serverfault.com/questions/834616/centos-7-http-wont-start-at-boot-if-it-listens-to-a-specific-ip-address
> 
> I did try that workaround to try to delay the boot process until the
> network is up. I installed NetworkManager and ran 'systemctl edit
> httpd.service' and added that line, and the only result is that the
> network doesn't come up at all. I don't know why the network doesn't
> start at all, lol.
> 
> So I undid those changes and uninstalled NetworkManager and I'm back to
> where I started. I tried adding 'sleep 30 ; systemctl start httpd' to
> /etc/rc.d/rc.local but that did nothing, lol.
> 
> What can I do to CentOS to work around this, or is there some obvious
> thing I can tell the data center admin? Thanks.
> 
> 
> _______________________________________________
> Users mailing list
> Users@openvz.org
> https://lists.openvz.org/mailman/listinfo/users
> 
_______________________________________________
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users

Reply via email to