In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to deploy Supervisor in ubuntu". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Supervisor is a set of general process management program developed with Python, which can change an ordinary command line process into background daemon, monitor the status of the process, and restart automatically when an exception exits. It starts these managed processes as children of supervisor by fork/exec, so as long as the path of the executable of the process to be managed is written in the supervisor configuration file.
1, install python,supervisor# apt-get install python supervisor2 Configure supervisor# cat / etc/supervisor/conf.d/mini_breakpad.conf [program:minibreakpad] / / process name directory = / root/error/mini-breakpad-server / / the startup directory of the program command = node lib/app.js / / startup command autostart = true / / also automatically start when supervisord starts startsecs = 5 / / if you do not exit after 5 seconds of startup, you will be deemed to have started autorestart = true / / program. Automatic restart after frequent exit startretries = 5 / failed automatic retries 5 user = root / / with which user to start redirect_stderr = true / / redirect stderr to the stdout default false If it is false, you do not need to set the following log configuration stdout_logfile_maxbytes = 20MB / / stdout log file size. By default, 50MB stdout_logfile_backups = 20 / / number of stdout log file backups / / stdout log file. You need to note that you cannot start normally when the specified directory does not exist, so you need to manually create a directory (supervisord will automatically create log files) stdout_logfile = / root/error/mini-breakpad-server/logs/stdout.log3, and restart supervisor Check status # / etc/init.d/supervisor restart # supervisorctl status minibreakpad RUNNING pid 17655, uptime 2:57:07
Note: if the program running in the background, there are daemons, do not use supervisor, not even with nohup. The following error will be reported
# supervisorctl statusminibreakpad FATAL Exited too quickly (process log may have details) "how to deploy Supervisor in ubuntu" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.