Auto Restart of MINE and FETCHER

 

Auto-restart of Mine and Fetcher process 

When running setup wizard scripts will be created for auto-restart the mine and fetcher processes for different system startup and service managers like initd, systemd, and upstart.

We support the following services (daemons) which handle starting of mine/fetcher processes and services during boot, stopping them during shutdown and supervising them while the system is running.
1. SystemV initd service scripts (e.g. Oracle Linux)
2. systemd service script (e.g SUSE Linux)
3. upstart service script (e.g.Ubuntu Linux)

setup wizard creates new directory "scripts" under SETUP_SCRIPT_PATH   - e.g SETUP_SCRIPT_PATH = /home/oracle/dev1

e.g. /home/oracle/dev1/scripts contains the initd files:
dev1-dbserver1-vmrr-MINE.sh
dev1-dbserver1-start-MINE.sh
dev1-dbserver1-stop-MINE.sh

and the respective upstart and systemd files:
upstart-vmrr-MINE_dev1.conf
systemd-vmrr-MINE_dev1.service

 

The Mine process is depending on database and listener to be up and running.
Make sure additional service processes are in place for database and listener.

 

 

1.  Setup instructions for auto-restart using initd scripts:

as root;
cp /home/oracle/dev1/scripts/dev1-dbserver1-vmrr-MINE.sh /etc/init.d

# update runlevel information for MINE service
# this adds the MINE service to runlevel 3,4,5
chkconfig --add dev1-dbserver1-vmrr-MINE.sh

# check runlevel dirs
ls -al /etc/rc.d/[ rc3.d |rc4.d | rc5.d ]

shows the the line:
S99dev1-dbserver1-vmrr-MINE.sh -> ../init.d/dev1-dbserver1-vmrr-MINE.sh

 

2. Setup instructions for auto-restart using systemd:

/usr/lib/systemd tells you you're on a systemd based system.

http://www.freedesktop.org/software/systemd/man/systemd.service.html

 

1. copy systemd-vmrr-MINE_dev1.service to /etc/systemd/system/

2. # make systemd take notice of it
invoke systemctl daemon-reload

3. # start service manually
systemctl start systemd-vmrr-MINE_dev1.service

4. # stop service manually
systemctl stop systemd-vmrr-MINE_dev1.service

5. # enable it when booting
systemctl enable systemd-vmrr-MINE_dev1.service


3. Setup instructions for auto-restart using upstart:

/usr/share/upstart is a pretty good indicator that you're on an Upstart-based system.

http://upstart.ubuntu.com/cookbook/#service-job

1. copy upstart-vmrr-MINE_dev1.conf to /etc/init/

2. # syntax check
init-checkconf /etc/init/upstart-vmrr-MINE_dev1.conf

3. # re-start the service
sudo upstart-vmrr-MINE_dev1.service restart

4. # start the service
sudo upstart-vmrr-MINE_dev1 start

5. # stop the service
sudo upstart-vmrr-MINE_dev1 stop

6. # display the  status of the service
sudo upstart-vmrr-MINE_dev1 status

7. # check the log file
cat /var/log/upstart-vmrr-MINE_dev1.log

 

Â