Operating System - HP-UX
1833187 Members
2505 Online
110051 Solutions
New Discussion

process ending after /sbin/rc is done???????

 
Bigcountry_1
Advisor

process ending after /sbin/rc is done???????

We have a mysql startup in rc3. The db starts, then when /sbin/rc is done with rc3 files, the db stops. We tested by putting a dummy start script at the "end" of RC3 and having it call sleep 300. Once the 300 seconds was up, and rc gave control back to init for the next step in the inittab, the db stops. Same start script used on many mysql servers.
9 REPLIES 9
siva0123
Trusted Contributor

Re: process ending after /sbin/rc is done???????

What about the other scripts in rc3 , how do they behave ?

What does /etc/rc.log says?

Thanks,
Siva
Bigcountry_1
Advisor

Re: process ending after /sbin/rc is done???????

The other processes still run. /etc/rc.log is clean, no errors from mysql. We have tried many,many things. It must be a mysql problem?????
mysql still runs fine if I call the rc3 from a command line.
Bill Hassell
Honored Contributor

Re: process ending after /sbin/rc is done???????

If the processes do not automatically place themselves in the background (like daemons), then this is normal. Like any script of process, once it is finished, all child processes will be terminated. Your mysql program(s) must be re-assinged to init. The easiest is to put the processes in the background with &.


Bill Hassell, sysadmin
Bigcountry_1
Advisor

Re: process ending after /sbin/rc is done???????

agreed and they have been in there, here are the two statements:

$manager --user=$user --pid-file=$pid_file >/dev/null 2>&1 &


$bindir/mysqld_safe --timezone=EST5 --datadir=$datadir --pid-file=$server_
pid_file >/dev/null 2>&1 &

Kent Ostby
Honored Contributor

Re: process ending after /sbin/rc is done???????

ChadS --

Is this a new startup script or one that was previously working?

Could you post your entire script here so we could take a look at it?

Thanks,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Bigcountry_1
Advisor

Re: process ending after /sbin/rc is done???????

Should be the default mysql script. It is used on other servers..
OldSchool
Honored Contributor

Re: process ending after /sbin/rc is done???????

suggest that you add "set -x" to the begining of the script and
remove/substitute

">/dev/null 2>&1" w/with ">/some_log 2>&1"

and see what show up in some_log.
Bigcountry_1
Advisor

Re: process ending after /sbin/rc is done???????

Mysql starts and runs fine. you can interact with the DB and everything. As soon as the last script in rc3 runs, and control is turned back over, mysql stops immediatly.
Bigcountry_1
Advisor

Re: process ending after /sbin/rc is done???????

One other thing is that the start script runs fine when ran from the command line after the system is up.