-   Slackware (
-   -   Remote execution of `rc.mysqld start` hangs (

zordrak 02-18-2009 04:08 AM

Remote execution of `rc.mysqld start` hangs
As seems normal for a slackware box, when execiting /etc/rc.d/rc.mysqld start locally, the script seems to hang after starting the server and exits when it gets a carriage return. I've never questioned this before, it never stopped it working.

Problem is, I'm now scripting a mysql slave backup and trying to stop and start the server remotely with ssh. In doing so, I discovered that running:

ssh root@host '/etc/rc.d/rc.mysqld start'

just hangs and won't return unless you kill it. No amount of carriage returns makes any difference.

Looking at the script, it doesn't seem there's any reason. All start does is create a pid file and then execute mysqld_safe in the background (&)..

Anyone know what to do aboot this?

zordrak 02-18-2009 04:20 AM

Bah! It's something to do with the way the output is handled and the infamous nohup warning message.

It seems if I redirect *all* output to /dev/null in rc.mysqld.start() then it works perfectly. But I was hoping to trap output so cron can e-mail me if anything is wrong.

All times are GMT -5. The time now is 03:07 PM.