priest671 / mysql-master-ha

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

MySQL Replication Health is NOT OK! #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. execute  sudo ./masterha_check_repl --conf=/etc/app1.cnf

2.Expected output:
MySQL Replication Health

3.Output got: Mon Oct 31 16:58:54 2011 - [info] Reading default configuratoins 
from /etc/masterha_default.cnf..
Mon Oct 31 16:58:54 2011 - [info] Reading application default configurations 
from /etc/app1.cnf..
Mon Oct 31 16:58:54 2011 - [info] Reading server configurations from 
/etc/app1.cnf..
Mon Oct 31 16:58:54 2011 - [info] MHA::MasterMonitor version 0.52.
Mon Oct 31 16:58:54 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln315] Error happend 
on checking configurations. Use of uninitialized value $datadir in 
concatenation (.) or string at /usr/local/share/perl/5.10.1/MHA/SlaveUtil.pm 
line 123.
Mon Oct 31 16:58:54 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln396] Error 
happened on monitoring servers.
Mon Oct 31 16:58:54 2011 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ajays20...@gmail.com on 31 Oct 2011 at 11:33

GoogleCodeExporter commented 9 years ago
MHA fails to get datadir but this should not happen. Would you please provide 
more information? If you do not like to publish, please e-mail to myself (you 
can get my email on my blog)?

- Set "log-level=debug" at [server_default] section in /etc/app1.cnf, and paste 
all log outputs
- MySQL client and server version

Original comment by Yoshinor...@gmail.com on 8 Nov 2011 at 10:00

GoogleCodeExporter commented 9 years ago
As i required it immediately I solved it by checking if datadir is defined and 
if its not defined i manually defined it.
if(!defined($datadir)){
        $datadir="path/to/mysql";
  }

but we cant do this on every system.Need  to fix it!

I commented d above part and made the changes to /etc/app1 as you had 
instructed ,i got these errors

Tue Nov  8 21:00:15 2011 - [info] Reading default configuratoins from 
/etc/masterha_default.cnf..
Tue Nov  8 21:00:15 2011 - [info] Reading application default configurations 
from /etc/app1.cnf..
Tue Nov  8 21:00:15 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln315] Error happend 
on checking configurations. Parameter name log-level is invalid!
 at /usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm line 190
Tue Nov  8 21:00:15 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln396] Error 
happened on monitoring servers.
Tue Nov  8 21:00:15 2011 - [info] Got exit code 1 (Not master dead).

Original comment by ajays20...@gmail.com on 8 Nov 2011 at 3:32

GoogleCodeExporter commented 9 years ago
Ah, log_level=debug, not log-level. Sorry.

Original comment by Yoshinor...@gmail.com on 8 Nov 2011 at 3:37

GoogleCodeExporter commented 9 years ago
This is what im getting

Tue Nov  8 21:16:12 2011 - [info] Reading default configuratoins from 
/etc/masterha_default.cnf..
Tue Nov  8 21:16:12 2011 - [info] Reading application default configurations 
from /etc/app1.cnf..
Tue Nov  8 21:16:12 2011 - [info] Reading server configurations from 
/etc/app1.cnf..
Tue Nov  8 21:16:12 2011 - [info] MHA::MasterMonitor version 0.52.
Tue Nov  8 21:16:12 2011 - [debug] Connecting to servers..
Tue Nov  8 21:16:12 2011 - [debug]  Connected to: 127.0.0.1(127.0.0.1:3308), 
user=root
Tue Nov  8 21:16:12 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln315] Error happend 
on checking configurations. Use of uninitialized value $datadir in 
concatenation (.) or string at /usr/local/share/perl/5.10.1/MHA/SlaveUtil.pm 
line 128.
Tue Nov  8 21:16:12 2011 - 
[error][/usr/local/share/perl/5.10.1/MHA/MasterMonitor.pm, ln396] Error 
happened on monitoring servers.
Tue Nov  8 21:16:12 2011 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

Original comment by ajays20...@gmail.com on 8 Nov 2011 at 3:47

GoogleCodeExporter commented 9 years ago
What's the output of the following?

mysql --host=127.0.0.1 --port=3308 --user=root

select version();
select @@global.datadir;

Original comment by Yoshinor...@gmail.com on 8 Nov 2011 at 3:53

GoogleCodeExporter commented 9 years ago
select vserion()- 4.1.22-standard-log
select @@global.datadir-ERROR 1193 (HY000): Unknown system variable 'datadir'

Original comment by ajays20...@gmail.com on 8 Nov 2011 at 4:03

GoogleCodeExporter commented 9 years ago
OK. I got the reason of the error. MHA does not support MySQL 4.1 or earlier. 
The reason is binary log format in MySQL 4.1 (or earlier) is older. I do not 
have any plan to support it. I'll mark "WontFix" of this issue. 

I'll consider returning better error messages.

Suggestion: Please consider upgrading to MySQL 5.0 or higher version.

Original comment by Yoshinor...@gmail.com on 8 Nov 2011 at 4:13

GoogleCodeExporter commented 9 years ago
I have installed mutliple versions of Mysql on same machine.I have mysql 5.1.1 
as the slave to mysql 4.1, so had to deal with it. Anyways thanx for your time!

Original comment by ajays20...@gmail.com on 8 Nov 2011 at 4:26

GoogleCodeExporter commented 9 years ago

Original comment by Yoshinor...@gmail.com on 9 Nov 2011 at 4:25