MHA monitoring Process exited unexpectedly (MHA version: 0.56)

Source: Internet
Author: User

Recently encountered a very strange problem, the MHA background process itself interrupted the exit. The following is an error:
Mon Dec 20:16:07-[info] OK.
Mon Dec 20:16:07-[WARNING] shutdown_script is not defined.
Mon Dec 20:16:07-[info] Set Master ping interval 1 seconds.
Mon Dec 20:16:07-[info] Set Secondary Check script:/etc/mha/bin/masterha_secondary_check-s 192.168.17.93-s 19 2.168.18.93
Mon Dec 20:16:07-[info] Starting ping Health check on 192.168.17.94 (192.168.17.94:3306):
Mon Dec 20:16:07-[info] Ping (SELECT) succeeded, waiting until MySQL doesn ' t respond.
Tue Dec 10:36:42-[INFO] Got terminate signal. Exit.

Reading the wrong first reaction is understood as the exit process due to disconnection of the interrupt signal

Here's a question: Why do I use Nohup/etc/mha/bin/masterha_manager--conf=/etc/mha/app1.cnf--remove_dead_master_conf--ignore_last_ Failover &
This way executes the background Run command, how does the program exit with the terminal disconnected? I can't figure it out. There's no such thing as an impression of a previous execution, it must be something wrong.

Read Nohup's related information:
Note When using:
After the shell has been prompted to nohup successful, you also need to press the terminal keyboard any key to return to the Shell Input Command window, and then by entering exit in the Shell to exit the terminal, if the nohup after successful execution of the program button to close the terminal, This time will be broken the corresponding session of the command, resulting in the nohup corresponding process is notified to need to shutdown together, do not have to shut down the terminal after the call program continues to run the role of the background.

See here recall before their own operation may be problematic, so the nohup operation is tested below:
Note: The MHA Management Server is installed on a machine,

Test 1: Connect directly to the Mysqla server, perform Nohup/etc/mha/bin/masterha_manager--conf=/etc/mha/app1.cnf--remove_dead_master_conf on a server-- Ignore_last_failover &, Normal exit, or direct shutdown of terminal exit will not cause the MHA background process to exit unexpectedly.

Test 2: First connect the MYSQLB server, then ssh to a server from B server, and then repeat the above command when the background command after the normal exit after the terminal, everything and the above operation, the MHA background process does not exit abnormally.

Test 3: First connect the MYSQLB server, then ssh to a server from the B server, and then repeat the above command when the background command after the execution of the non-normal exit (terminal time-out or directly shut down the SECURECRT program), this time MHA background process also follow the terminal exit and exit.

Carefully recalled that I was indeed through a server SSH to the MHA server above the execution of the command is not normally caused by exit terminal. The problem is finally found.


Of course, if your problem is not the same as mine can also be used to avoid the background process exception exit, that is, the command is written in the script by running the script is foolproof.


Resources:

Http://www.cnblogs.com/mysqlplus/p/5070753.html--About Nohup
Http://www.cnblogs.com/gomysql/p/4688920.html--A similar problem solving method

MHA monitoring Process exited unexpectedly (MHA version: 0.56)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.