Storm because it is a fast-fail system, the cluster can stop running after a while. Use Daemontools to monitor storm, zookeeper, and to automatically reboot when it fails.
Installation of Daemontools
/pacakage directory (you can create any directory where you use package just to keep in line with the English author):
Mkdir-p/package
chmod 1755/package
Cd/package
Download the daemontools-0.76.tar.gz to the/package directory and extract the package.
Http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
Tar xvzf daemontools-0.76.tar.gz
CD admin/daemontools-0.76
Compiling and installing the Daemontools program
Package/install
"Note": If the installation fails during installation, it is because the Daemontools
Need a patch Daemontools-0.76.errno.patch, this patch is in the QMail package.
or modify the Daemontools source code to fix the bug
How to modify: The first line of the conf-cc file under SRC is finally added with the following code-include/usr/include/errno.h
# VI SRC/CONF-CC
Add-include/usr/include/errno.h at the end
Installation Reference link
Daemontools configuration Storm and zookeeper
Mkdir/service
Cd/service
MkDir Storm
CD Storm
Vim Run
Run's content:
#!/bin/sh
EXEC 2>&1
Exec/usr/local/apache-storm-0.9.3/bin/storm Nimbus
This is the start of the Nimbus, supervise, UI, DRPCG change the corresponding part
Zookeeper's Run
#!/bin/sh
exec/usr/local/zookeeper-3.4.6/bin/zkserver.sh start
Note: Give executable permissions to the run file before you start again
Nohup Supervise/service/storm &
Nohup Supervise/service/zookeeper &
View the storm and zookeeper start process Id,kill process through the JPS command to see if a process is automatically generated
Machine reboot or in some cases, storm or zookeeper does not exist, you need to delete the supervise folder corresponding to the run file sibling, and then quickly execute the start command