gregorg / mysql-master-ha

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

So stage, when i running masterha_check_ssh --conf=/etc/app1.cnf #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dear Yoshinor

In my Production environment

This is 4 servers in IDC room,one master and the others is slave

master:10.10.105.9
slave1:10.10.105.10
slave2:10.10.105.11
slave3+mha_manage:10.10.105.12

1、My operating system is centos6.3

2、I use mysql5.5 version, with the rpm package.

3、MHA version is 0.53 and SSH public key authentication have been configured

4、This is my /etc/app1.cnf
[server default]
#log_level=debug
# mysql user and password
user=root
password=0ps.iz3n3s0ft
ssh_user=ops
repl_user=rep
repl_password=bm5123
master_binlog_dir=/opt/mysql
# working directory on the manager
manager_workdir=/var/log/masterha/app1
# manager log file
manager_log=/var/log/masterha/app1/app1.log
# working directory on MySQL servers
remote_workdir=/var/log/masterha/app1
[server1]
hostname=10.10.105.9
[server2]
hostname=10.10.105.10
[server3]
hostname=10.10.105.11
[server4]
hostname=10.10.105.12

Ok,When I run this script, it outputs the information as shown below
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ops@linux-105-mysql12 .ssh]$ masterha_check_ssh --conf=/etc/app1.cnf 
Tue Jul 30 10:56:10 2013 - [warning] Global configuration file 
/etc/masterha_default.cnf not found. Skipping.
Tue Jul 30 10:56:10 2013 - [info] Reading application default configurations 
from /etc/app1.cnf..
Tue Jul 30 10:56:10 2013 - [info] Reading server configurations from 
/etc/app1.cnf..
Tue Jul 30 10:56:10 2013 - [info] Starting SSH connection tests..
Tue Jul 30 10:56:12 2013 - [debug] 
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.10(10.10.105.10:22) to ops@10.10.105.9(10.10.105.9:22)..
Tue Jul 30 10:56:11 2013 - [debug]   ok.
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.10(10.10.105.10:22) to ops@10.10.105.11(10.10.105.11:22)..
Tue Jul 30 10:56:11 2013 - [debug]   ok.
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.10(10.10.105.10:22) to ops@10.10.105.12(10.10.105.12:22)..
Tue Jul 30 10:56:12 2013 - [debug]   ok.
Tue Jul 30 10:56:12 2013 - [debug] 
Tue Jul 30 10:56:10 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.9(10.10.105.9:22) to ops@10.10.105.10(10.10.105.10:22)..
Tue Jul 30 10:56:11 2013 - [debug]   ok.
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.9(10.10.105.9:22) to ops@10.10.105.11(10.10.105.11:22)..
Tue Jul 30 10:56:11 2013 - [debug]   ok.
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.9(10.10.105.9:22) to ops@10.10.105.12(10.10.105.12:22)..
Tue Jul 30 10:56:12 2013 - [debug]   ok.
Tue Jul 30 10:56:12 2013 - [debug] 
Tue Jul 30 10:56:11 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.11(10.10.105.11:22) to ops@10.10.105.9(10.10.105.9:22)..
Tue Jul 30 10:56:12 2013 - [debug]   ok.
Tue Jul 30 10:56:12 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.11(10.10.105.11:22) to ops@10.10.105.10(10.10.105.10:22)..
Tue Jul 30 10:56:12 2013 - [debug]   ok.
Tue Jul 30 10:56:12 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.11(10.10.105.11:22) to ops@10.10.105.12(10.10.105.12:22)..
Tue Jul 30 10:56:12 2013 - [debug]   ok.
Tue Jul 30 10:56:12 2013 - 
[error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63] 
Tue Jul 30 10:56:12 2013 - [debug]  Connecting via SSH from 
ops@10.10.105.12(10.10.105.12:22) to ops@10.10.105.9(10.10.105.9:22)..
Permission denied (publickey,password).
Tue Jul 30 10:56:12 2013 - 
[error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln107] SSH connection 
from ops@10.10.105.12(10.10.105.12:22) to ops@10.10.105.9(10.10.105.9:22) 
failed!
SSH Configuration Check Failed!
 at /usr/bin/masterha_check_ssh line 44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ops@10.10.105.12(10.10.105.12:22) to ops@10.10.105.9(10.10.105.9:22)..
Permission denied (publickey,password).

But in fact,it no-passphrase ssh connection succeed from 10.10.105.12 to 
10.10.105.9

And this is my first time doing mha experiments when encountered such a strange 
question

Dear Yoshinor,Can u help me 

Original issue reported on code.google.com by yanq...@b5m.com on 30 Jul 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Now I understand what's the trouble!

in my configure file with /etc/app1.cnf

Remove the last two lines, mha servers do not write

Like this

+++++++++++++++++++++++++
[server default]
#log_level=debug
# mysql user and password
user=root
password=0ps.iz3n3s0ft
ssh_user=ops
repl_user=rep
repl_password=bm5123
master_binlog_dir=/opt/mysql
# working directory on the manager
manager_workdir=/var/log/masterha/app1
# manager log file
manager_log=/var/log/masterha/app1/app1.log
# working directory on MySQL servers
remote_workdir=/var/log/masterha/app1
[server1]
hostname=10.10.105.9
[server2]
hostname=10.10.105.10
[server3]
hostname=10.10.105.11

Original comment by yanq...@b5m.com on 4 Aug 2013 at 4:52

GoogleCodeExporter commented 9 years ago
Dear Yoshimori:

I have a similar issue:

My scenario is as follows:

Only 2 server: master and slave.

IP master + mha node): 10.16.49.67 (load-balanced-server2)
IP slave + mha manager): 10.16.49.68 (load-balanced-server1)

My operating system is centos6.3 (SElinux disabled)
Mysql 5.1.69 installed via yum
MHA manager version is 0.55 MHA node version is 0.54 and SSH public key 
authentication have been configured.

This is my /etc/app1.cnf
*************************************
[server default]
  # mysql user and password
  user=root
  password=Hansel&greteL
  ssh_user=root
  repl_user=repl
  repl_password=replpass
  log_level=debug
  # working directory on the manager
  manager_workdir=/var/log/masterha/app1
  # working directory on MySQL servers
  remote_workdir=/var/log/masterha/app1

  [server1]
  hostname=load-balanced-server2
  [server2]
  hostname=load-balanced-server1
************************************

When I run this script, it outputs the information as shown below

************************************
[root@load-balanced-server1 ~]# masterha_check_ssh --conf=/etc/app1.cnf
Fri Sep 13 21:47:46 2013 - [warning] Global configuration file 
/etc/masterha_default.cnf not found. Skipping.
Fri Sep 13 21:47:46 2013 - [info] Reading application default configurations 
from /etc/app1.cnf..
Fri Sep 13 21:47:46 2013 - [info] Reading server configurations from 
/etc/app1.cnf..
Fri Sep 13 21:47:46 2013 - [info] Starting SSH connection tests..
Fri Sep 13 21:47:47 2013 - [debug] 
Fri Sep 13 21:47:46 2013 - [debug]  Connecting via SSH from 
root@load-balanced-server2(10.16.49.67:22) to 
root@load-balanced-server1(10.16.49.68:22)..
Fri Sep 13 21:47:47 2013 - [debug]   ok.
Fri Sep 13 21:47:47 2013 - 
[error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63] 
Fri Sep 13 21:47:47 2013 - [debug]  Connecting via SSH from 
root@load-balanced-server1(10.16.49.68:22) to 
root@load-balanced-server2(10.16.49.67:22)..
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Fri Sep 13 21:47:47 2013 - 
[error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln111] SSH connection 
from root@load-balanced-server1(10.16.49.68:22) to 
root@load-balanced-server2(10.16.49.67:22) failed!
SSH Configuration Check Failed!
 at /usr/bin/masterha_check_ssh line 44
*********************************************
When trying to connect by ssh console from any of the 2 servers I have no 
problems, I can connect without asking key.

What am I doing wrong??

Thanks in advance.

Daniel C.

Original comment by daniel.c...@gmail.com on 13 Sep 2013 at 10:01

GoogleCodeExporter commented 9 years ago
As mentioned here in the tutorial:
https://code.google.com/p/mysql-master-ha/wiki/Tutorial
You shouldn't add an entry for the manager host. If you have 4 hosts, 1, 2, 3 
and 4 (manager), you should add host entries for the first 3 ones only (1, 2 & 
3) then it should work without any problems.

Abdel-Mawla

Original comment by dba.abde...@gmail.com on 9 Mar 2015 at 6:42