In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Managing the process is a troublesome thing, sometimes the process crashes because the memory is preempted by other processes, and there is no good way to solve it, then it involves how to make it hang up and start automatically, supervisor is such a software, before you do it, please make sure that you need to let the process start automatically, otherwise the process may not be able to restart the machine to solve the process occupation of IO and other problems that lead to ssh can not connect. The following describes how to install and configure, and how to view the status of the page.
Install supervisor
Yum install supervisor-y
Ambari detects whether the process is started according to the pid file. In order for ambari to detect the process status, to ensure that the file name of the process number is the same, HBASE_IDENT_STRING will be used as a variable in the process startup file to name the process pid file.
Echo 'export HBASE_IDENT_STRING=hbase' > > / etc/init.d/supervisord
Edit / etc/supervisord.conf
[unix_http_server]
File=/tmp/supervisor.sock
[supervisord]
Http_port=/var/tmp/supervisor.sock
Http_port=0.0.0.0:9001; (alternately, ip_address:port specifies AF_INET)
Logfile=/tmp/supervisord.log; (main logfile; default $CWD/supervisord.log)
Logfile_maxbytes=50MB; (max main logfile bytes b4 rotation;default 50MB)
Logfile_backups=10; (num of main logfile rotation backups;default 10)
Loglevel=info; (loglevel; default info; others: debug,warn,trace)
Pidfile=/tmp/supervisord.pid; (supervisord pidfile;default supervisord.pid)
Nodaemon=false; (start in foreground if true;default false)
Minfds=1024; (min. Avail startup file descriptors;default 1024)
Minprocs=200; (min. Avail process descriptors;default 200)
[rpcinterface:supervisor]
Supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
Serverurl=unix:///var/tmp/supervisor.sock; use a unix:// URL for a unix socket
[program:regionserver]
Command=bash / usr/hdp/current/hbase-regionserver/bin/hbase-daemon.sh-- config / usr/hdp/current/hbase-regionserver/conf foreground_start regionserver
Process_name=% (program_name) s
Numprocs=1
; directory=/usr/hdp/current/hbase-regionserver/bin/
Autostart=true
Autorestart=true
Startretries=3
Exitcodes=0,2
Stopsignal=INT
User=hbase
Stdout_logfile=regionserver_out.log
Stdout_logfile_maxbytes=1MB
Stdout_logfile_backups=10
Stdout_capture_maxbytes=1MB
Stderr_logfile=test_err.log
Stderr_logfile_maxbytes=1MB
Stderr_logfile_backups=10
Stderr_capture_maxbytes=1MB
If you want to start other programs, you can add them directly on the last line, such as
[program:wpiweibo]
Command=/usr/jdk64/jdk1.8.0_40/bin/java-jar / home/luoweimin/wpiindex/WPIIndex-1.0-SNAPSHOT.jar
Numprocs=1
User=luoweimin
Stdout_logfile=wpiweibo.out
Stderr_logfile=wpiweibo.err
Start
/ etc/init.d/superversiord start
Since I have monitored port 9001, you can use ip:9001 to monitor the page to check the status and start and stop the service.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.