stefalee / mysql-master-ha

Automatically exported from code.google.com/p/mysql-master-ha
0 stars 0 forks source link

Don't working if mysql in chroot #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add to config 
[mysqld]                                                                        

chroot=/var/lib/mysql   
2. Try start masterha_check_repl --conf=/etc/app1.cnf
3. Get error:

Tue Oct 25 21:16:45 2011 - [info] Checking SSH publickey authentication and 
checking recovery script configurations on the current master..
Tue Oct 25 21:16:45 2011 - [info]   Executing command: save_binary_logs 
--command=test --start_file=mysql-bin.000003 --start_pos=4 
--binlog_dir=/var/lib/mysql/binlog 
--output_file=/var/lib/mysql/tmp/save_binary_logs_test --manager_version=0.52 
Tue Oct 25 21:16:45 2011 - [info]   Connecting to root@db1(db1).. 
  Creating /var/lib/mysql/tmp if not exists..    ok.
  Checking output directory is accessible or not..
   ok.
  Binlog found at /var/lib/mysql/binlog, up to mysql-bin.000003
Tue Oct 25 21:16:46 2011 - [info] Master setting check done.
Tue Oct 25 21:16:46 2011 - [info] Checking SSH publickey authentication and 
checking recovery script configurations on all alive slave servers..
Tue Oct 25 21:16:46 2011 - [info]   Executing command : apply_diff_relay_logs 
--command=test --slave_user=root --slave_host=db2 --slave_ip=192.168.10.4 
--slave_port=3306 --workdir=/var/lib/mysql/tmp --target_version=5.1.59-log 
--manager_version=0.52 --relay_log_info=/db/relay-log.info  --slave_pass=xxx
Tue Oct 25 21:16:46 2011 - [info]   Connecting to root@192.168.10.4(db2).. 
  Checking slave recovery environment settings..
    Opening /db/relay-log.info ...Could not open relay-log-info file /db/relay-log.info.
 at /usr/bin/apply_diff_relay_logs line 274
Tue Oct 25 21:16:46 2011 - [error][/usr/share/perl5/MHA/MasterMonitor.pm, 
ln129] Slaves settings check failed!
Tue Oct 25 21:16:46 2011 - [error][/usr/share/perl5/MHA/MasterMonitor.pm, 
ln304] Slave configuration failed.
Tue Oct 25 21:16:46 2011 - [error][/usr/share/perl5/MHA/MasterMonitor.pm, 
ln315] Error happend on checking configurations.  at 
/usr/bin/masterha_check_repl line 48
Tue Oct 25 21:16:46 2011 - [error][/usr/share/perl5/MHA/MasterMonitor.pm, 
ln396] Error happened on monitoring servers.
Tue Oct 25 21:16:46 2011 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

What version of the product are you using? On what operating system?
$ rpm -qa | grep -i mysql
libmysqlclient16-5.1.59-alt1
perl-DBD-mysql-4.020-alt2
mha4mysql-node-0.52-alt1
MySQL-client-5.1.59-alt1
MySQL-server-5.1.59-alt1

Original issue reported on code.google.com by dub...@gmail.com on 25 Oct 2011 at 9:51

GoogleCodeExporter commented 9 years ago
I understand about requirements. But currently I do not have plans to implement 
this in MHA side. I welcome patches.

Is it possible for you to configure chroot in sshd_config? I assume this can be 
a workaround.

Original comment by Yoshinor...@gmail.com on 17 Nov 2011 at 10:20