Service startup order problem

Anyone know how I can get Zabbix to wait for MySQL to finish loading before running on startup. "REQUIRE mysql" doesn't seem to work.

Is there a clean way to hold off the startup of a service waiting for mysql to finish loading, or am I going to be forced to use a script with a long sleep in it?

Thanks for any help.
 
The PROVIDE in the mysql-startup script is
# PROVIDE mysql

And is what I based my REQUIRE off of. Is that not correct, should I be using mysqld or mysql-server?
 
Neither of these worked either.
Code:
# REQUIRE: mysqld
Code:
# REQUIRE: mysql-server

Is it possible it's a situation where the mysql process is running so the REQUIRE see's it, but it hasn't finished loading the database so my other process fails? Is there anything else I could do to my startup scripts if this is the case?
 
Check the output of rcorder /etc/rc.d/* /usr/local/etc/rc.d/* and check where mysql and zabbix are listed in relation to each other. You can also check for things later in the list and put one of those into the REQUIRE: line.
 
Got It!

Thanks for the tip about rcorder and using multiple REQUIRE arguments.

When I ran my rcorder, mysql was being required to start first, but the process that required it was starting second which must not have been enough time. I added several other processes to the require list and not it's working.
 
Maybe ping Zabbix's port maintainer about this? He's the one in charge of positioning Zabbix into the right order of start-up scripts, and there are bound to be others having the same problem with Zabbix trying to latch onto mysql too early.
 
Back
Top