[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Linux-cluster] MySQL service



Hi folks,

I've a problem with the mysql resource. I cannot start/stop or even monitor a service with mysql. You should find everything regarding my configuration and the error messages below. For Information I manage other resources such as VIP that are working fine.

1.Check mysql status 
----------------------

[root emperor01 ~]# /etc/init.d/mysql.server status
MySQL is not running                                       [FAILED]


2.Enabling the service mysql_service via luci
---------------------------------------------

Sep 20 00:14:27 emperor01 clurgmgrd[5035]: <notice> Starting disabled service service:mysql_service 
Sep 20 00:14:30 emperor01 luci[18284]: Unable to retrieve batch 525737614 status from emperor01.high-availability.eu:11111: module scheduled for execution
Sep 20 00:14:49 emperor01 last message repeated 2 times
Sep 20 00:14:57 emperor01 clurgmgrd: [5035]: <err> Starting Service mysql:mysql > Failed - Timeout Error 
Sep 20 00:14:57 emperor01 clurgmgrd[5035]: <notice> start on mysql "mysql" returned 1 (generic error) 
Sep 20 00:14:57 emperor01 clurgmgrd[5035]: <warning> #68: Failed to start service:mysql_service; return value: 1 
Sep 20 00:14:57 emperor01 clurgmgrd[5035]: <notice> Stopping service service:mysql_service 
Sep 20 00:14:57 emperor01 clurgmgrd: [5035]: <err> Checking Existence Of File /u00/app/mysql/admin/mysqld1/socket/mysqld1.pid [mysql:mysql] > Failed - File D
ist 
Sep 20 00:14:57 emperor01 clurgmgrd: [5035]: <err> Stopping Service mysql:mysql > Failed 
Sep 20 00:14:57 emperor01 clurgmgrd[5035]: <notice> stop on mysql "mysql" returned 1 (generic error) 
Sep 20 00:14:58 emperor01 clurgmgrd[5035]: <crit> #12: RG service:mysql_service failed to stop; intervention required 
Sep 20 00:14:58 emperor01 clurgmgrd[5035]: <notice> Service service:mysql_service is failed 
Sep 20 00:14:58 emperor01 clurgmgrd[5035]: <crit> #13: Service service:mysql_service failed to stop cleanly 
Sep 20 00:14:59 emperor01 luci[18284]: Unable to retrieve batch 525737614 status from emperor01.high-availability.eu:11111: clusvcadm start failed to start m
ice: 

3.Check mysql status 
-----------------------
[root emperor01 ~]# /etc/init.d/mysql.server status
MySQL is not running                                       [FAILED]

4.Try to start the service manually
------------------------------------
[root emperor01 ~]# /etc/init.d/mysql.server start
Starting MySQL.                                            [  OK  ]
[root emperor01 ~]# /etc/init.d/mysql.server status
MySQL running (11467)                                      [  OK  ]


5. /etc/my.cnf
-------------------

[mysqld1]

server-id        = 1
port             = 33001

log-bin          = mysqld1-bin

datadir          = /u01/mysqldata/mysqld1
basedir          = /u00/app/mysql/product/5.1.26

mysqld           = /u00/app/mysql/product/5.1.26/bin/mysqld
mysqladmin       = /u00/app/mysql/product/5.1.26/bin/mysqladmin

# Log/Socket files
socket           = /u00/app/mysql/admin/mysqld1/socket/mysqld1.sock
pid-file         = /u00/app/mysql/admin/mysqld1/socket/mysqld1.pid
log-error        = /u00/app/mysql/admin/mysqld1/log/mysqld1.err
log              = /u00/app/mysql/admin/mysqld1/log/mysqld1.log
log-slow-queries = /u00/app/mysql/admin/mysqld1/log/mysqld1_slow_queries.log

language         = /u00/app/mysql/product/5.1.26/share/english

6. cluster.conf
--------------------

<?xml version="1.0"?>
<cluster alias="MySQLFailover" config_version="71" name="new_cluster">
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="emperor01.high-availability.eu" nodeid="1" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="AP7920" port="1"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="emperor02.high-availability.eu" nodeid="2" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="AP7920" port="4"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_apc" ipaddr="192.168.1.10" login="apc" name="AP7920" passwd="apc"/>
        </fencedevices>
        <rm>
                <failoverdomains>
                        <failoverdomain name="new_cluster_failover" nofailback="1" ordered="0" restricted="1">
                                <failoverdomainnode name="emperor01.high-availability.eu" priority="1"/>
                                <failoverdomainnode name="emperor02.high-availability.eu" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="192.168.1.120" monitor_link="1"/>
                        <mysql config_file="/etc/my.cnf" listen_address="192.168.1.120" name="mysql" shutdown_wait="0"/>
                </resources>
                <service autostart="1" exclusive="0" name="mysql" recovery="relocate">
                        <ip ref="192.168.1.120"/>
                </service>
                <service autostart="1" name="mysql_service">
                        <mysql ref="mysql"/>
                </service>
        </rm>
        <quorumd interval="3" label="quorum_disk" min_score="1" tko="10" votes="1">
                <heuristic interval="2" program="ping -c3 -t2 192.168.1.1" score="1"/>
        </quorumd>
        <totem consensus="4800" join="60" token="10000" token_retransmits_before_loss_const="20"/>
</cluster>

7. /usr/share/cluster/mysql.sh
--------------------------------

...export LC_ALL=C
export LANG=C
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

. $(dirname $0)/ocf-shellfuncs
. $(dirname $0)/utils/config-utils.sh
. $(dirname $0)/utils/messages.sh
. $(dirname $0)/utils/ra-skelet.sh

declare MYSQL_MYSQLD=/u00/app/mysql/product/5.1.26/bin/mysqld_safe
declare MYSQL_ipAddress
declare MYSQL_pid_file=/u00/app/mysql/admin/mysqld1/socket/mysqld1.pid
declare MYSQL_timeout=30
...

8. /etc/init.d/mysql.server
-----------------------------

...
basedir=/u00/app/mysql/product/5.1.26
datadir=/u01/mysqldata/mysqld1
...
pid_file=/u00/app/mysql/admin/mysqld1/socket/mysqld1.pid
server_pid_file=/u00/app/mysql/admin/mysqld1/socket/mysqld1.pid
use_mysqld_safe=1
user=mysql
....


Any help of any kind is welcome ;-)

Greg


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]