Open GoogleCodeExporter opened 8 years ago
I can successfully ssh to dbms101.osl1.fronter.org when I ssh manually from
the mha manager node.
Original comment by khanomai...@gmail.com
on 3 Jul 2013 at 11:54
I am facing issues with seting up mha on three mysql instances. Please note
that all three mysql instances are binded to ipv6 addresses given below.
HOST BIND ADDRESS
dbms104.osl1.fronter.org 2001:700:181:20::1:104
dbms105.osl1.fronter.org 2001:700:181:20::1:105
dbms106.osl1.fronter.org 2001:700:181:20::1:106
The mha config which is exactly the same on all three db hosts is given below.
****************************************************************************
[server default]
#log_level=debug
manager_log=/var/log/masterha/mysql-cluster-02/mysql-cluster-02.log
manager_workdir=/var/log/masterha/mysql-cluster-02
#master_ip_failover_script=/etc/mha/master_ip_failover
password=123abcABC
ping_interval=3
remote_workdir=/var/log/masterha/mysql-cluster-02
ssh_user=root
user=replica
[server1]
hostname=dbms104.osl1.fronter.org
[server2]
hostname=dbms105.osl1.fronter.org
[server3]
hostname=dbms106.osl1.fronter.org
***********************************************
I had setup the ssh login without passwords for root user to all three db hosts
i.e. you can login as root from any of the three db hosts to each other.
I had installed the below mentioned packages first.
# yum install mysql-utilities perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch
perl-Parallel-ForkManager perl-Time-HiRes
I then installed MySQL-shared-compat-5.5.30-1.el6.x86_64
MySQL-client-5.5.30-1.el6.x86_64 MySQL-server-5.5.30-1.el6.x86_64 on all three
db instances with the exact same my.cnf which is also given below except the
bindaddress and slow and error log filenames.
************************************************************
[client]
#password = your_password
port = 3306
socket = /var/run/dbms/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
bind-address = 2001:700:181:20::1:104
server-id = 104
user = mysql
datadir = /fronter/data/database/
socket = /var/run/dbms/mysql.sock
pid-file = /var/run/dbms/mysqld.pid
log-error = /var/log/mysql/dbms104.err
slow_query_log = 1
slow_query_log_file=/var/log/mysql/dbms104.slow.log
long_query_time = 10
# general_log can log all queries. By default it should be disabled.
general_log_file = /var/log/mysql/mysql.log
general_log = 0
skip-log-warnings
skip-external-locking
#skip-name-resolve
key_buffer = 2048M
max_allowed_packet = 16M
table_cache = 4000
sort_buffer_size = 6M
read_buffer_size = 6M
read_rnd_buffer_size = 6M
thread_cache = 250
tmp_table_size = 128M
max_heap_table_size = 128M
max_tmp_tables = 256
max_connections = 250
max_connect_errors = 1000
thread_concurrency = 16
myisam_sort_buffer_size = 256M
query_cache_limit = 1M
#query_cache_size = 256M
query_cache_type = 0
wait_timeout = 30
net_write_timeout = 30
transaction-isolation = READ-COMMITTED
myisam-recover = backup,force
back_log = 500
#core-file
log_bin = /fronter/data/bin/mysql-bin.log
log-slave-updates = 1
binlog-format = STATEMENT
# Point the following paths to different dedicated disks
tmpdir = /mysql-tmp/dbms/
#log-update = /path-to-dedicated-directory/hostname
innodb_data_home_dir = /fronter/data/innodb/
innodb_data_file_path = ibdata1:2G;ibdata2:2G;ibdata3:2G;ibdata4:2G
innodb_log_group_home_dir = /fronter/data/innodb/log
innodb_mirrored_log_groups = 1
innodb_log_files_in_group = 4
innodb_log_file_size = 64M
innodb_log_buffer_size = 16M
innodb_buffer_pool_size = 51200M
innodb_buffer_pool_instances = 16
innodb_additional_mem_pool_size = 128M
#innodb_file_io_threads = 4
innodb_read_io_threads = 8
innodb_write_io_threads = 16
join_buffer_size = 2MB
thread_cache_size = 250 # The default
innodb_lock_wait_timeout = 50
innodb_flush_log_at_trx_commit = 2
innodb_status_file = 1
innodb_thread_concurrency = 8
innodb_support_xa = 0
innodb_file_per_table = 1
innodb_open_files = 6000
innodb_stats_on_metadata = 0
innodb_stats_sample_pages = 32
innodb_stats_method = nulls_ignored
default-storage-engine = innodb
#SessionTbl2 will not be replicated for any of the buildings
replicate-wild-ignore-table=%.SessionTbl2
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
default_character_set=utf8
[myisamchk]
key_buffer=1024M
sort_buffer=1024M
read_buffer=2M
write_buffer=2M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit=16384
core_file_size=unlimited
************************************************************
I had setup the replication where dbms104 is the master and dbms105 and dbms106
are slaves. I tested the replication and it works fine.
I ran mha_manager from dbms104 but I get the error "Error happend on checking
configurations. Failed to get IP address on host dbms105.osl1.fronter.org".
Do you have any ideas why this could be happening. Below is the error message
given. I would greatly appreciate your help in this regards. Thanks.
[root@dbms104 backup]# masterha_manager --conf=/etc/mha/mysql-cluster-02.cnf
Thu Jul 4 14:22:12 2013 - [warning] Global configuration file
/etc/masterha_default.cnf not found. Skipping.
Thu Jul 4 14:22:12 2013 - [info] Reading application default configurations
from /etc/mha/mysql-cluster-02.cnf..
Thu Jul 4 14:22:12 2013 - [info] Reading server configurations from
/etc/mha/mysql-cluster-02.cnf..
Thu Jul 4 14:22:12 2013 -
[error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln386] Error happend
on checking configurations. Failed to get IP address on host
dbms105.osl1.fronter.org!
at /usr/share/perl5/vendor_perl/MHA/Config.pm line 63
Thu Jul 4 14:22:12 2013 -
[error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln482] Error
happened on monitoring servers.
Thu Jul 4 14:22:12 2013 - [info] Got exit code 1 (Not master dead).
Original comment by khanomai...@gmail.com
on 4 Jul 2013 at 10:53
Original issue reported on code.google.com by
khanomai...@gmail.com
on 3 Jul 2013 at 11:43