Garbd - errors in init script stop/start functions
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The /etc/init.d/garb fails to stop the daemon and often reports start as failed when actually started just fine.
Checked on both Percona-
[root@percona33 ~]# cat /etc/sysconfig/garb
# Copyright (C) 2012 Coedership Oy
# This config file is to be sourced by garb service script.
# A space-separated list of node addresses (address[:port]) in the cluster
GALERA_
# Galera cluster name, should be the same as on the rest of the nodes.
GALERA_
# Optional Galera internal options string (e.g. SSL settings)
# see http://
GALERA_
# Log file for garbd. Optional, by default logs to syslog
LOG_FILE=
[root@percona33 ~]# /etc/init.d/garb status
garbd is stopped
[root@percona33 ~]# /etc/init.d/garb start
Starting /usr/bin/garbd: [FAILED]
[root@percona33 ~]# echo $?
0
[root@percona33 ~]# /etc/init.d/garb status
garbd (pid 11154) is running...
[root@percona33 ~]# ps -ef |grep garb
nobody 11154 1 0 22:09 ? 00:00:00 /usr/bin/garbd -d -a gcomm:/
[root@percona33 ~]# /etc/init.d/garb stop
[root@percona33 ~]# in/garbd: [ OK ]
[root@percona33 ~]# /etc/init.d/garb status
garbd (pid 11154) is running...
[root@percona33 ~]# bash -x /etc/init.d/garb stop
+ '[' -f /etc/redhat-release ']'
+ . /etc/init.
++ TEXTDOMAIN=
++ umask 022
++ PATH=/sbin:
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'
++ . /etc/profile.
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_
+++ SETCOLOR_
+++ SETCOLOR_
+++ SETCOLOR_
+++ PROMPT=yes
+++ AUTOSWAP=no
+++ ACTIVE_
+++ SINGLE=
++ '[' pty = serial ']'
++ __sed_discard_
+ . /etc/sysconfig/
++ NETWORKING=yes
++ HOSTNAME=percona33
+ config=
+ PIDFILE=
++ which garbd
+ prog=/usr/bin/garbd
+ case "$1" in
+ stop
+ '[' 0 '!=' 0 ']'
+ '[' -r /var/run/garbd ']'
+ return 3
+ exit 3
[root@percona33 ~]# lsof -p 11154|grep garb
garbd 11154 nobody cwd DIR 8,1 4096 2 /
garbd 11154 nobody rtd DIR 8,1 4096 2 /
garbd 11154 nobody txt REG 8,1 1413080 3067 /usr/bin/garbd
garbd 11154 nobody mem REG 8,1 122040 3593 /lib64/
garbd 11154 nobody mem REG 8,1 110960 3084 /lib64/
garbd 11154 nobody mem REG 8,1 10192 5175 /lib64/
garbd 11154 nobody mem REG 8,1 43728 5184 /lib64/
garbd 11154 nobody mem REG 8,1 88600 3484 /lib64/
garbd 11154 nobody mem REG 8,1 19536 3064 /lib64/
garbd 11154 nobody mem REG 8,1 174840 5180 /lib64/
garbd 11154 nobody mem REG 8,1 14664 3565 /lib64/
garbd 11154 nobody mem REG 8,1 941920 5182 /lib64/
garbd 11154 nobody mem REG 8,1 277704 5176 /lib64/
garbd 11154 nobody mem REG 8,1 1921096 3058 /lib64/libc-2.12.so
garbd 11154 nobody mem REG 8,1 90880 22 /lib64/
garbd 11154 nobody mem REG 8,1 596264 3066 /lib64/libm-2.12.so
garbd 11154 nobody mem REG 8,1 987096 3759 /usr/lib64/
garbd 11154 nobody mem REG 8,1 1950976 5215 /usr/lib64/
garbd 11154 nobody mem REG 8,1 441112 11293 /usr/lib64/
garbd 11154 nobody mem REG 8,1 43832 3086 /lib64/
garbd 11154 nobody mem REG 8,1 142640 3082 /lib64/
garbd 11154 nobody mem REG 8,1 154520 3050 /lib64/ld-2.12.so
garbd 11154 nobody 0r CHR 1,3 0t0 3782 /dev/null
garbd 11154 nobody 1r CHR 1,3 0t0 3782 /dev/null
garbd 11154 nobody 2r CHR 1,3 0t0 3782 /dev/null
garbd 11154 nobody 3w REG 8,1 4021 130819 /var/log/garbd.log
garbd 11154 nobody 4u REG 0,9 0 3780 [eventpoll]
garbd 11154 nobody 5u REG 0,9 0 3780 [timerfd]
garbd 11154 nobody 6u REG 0,9 0 3780 [eventfd]
garbd 11154 nobody 7u IPv4 109491 0t0 TCP percona33:4777 (LISTEN)
garbd 11154 nobody 8u IPv4 109494 0t0 TCP percona33:
garbd 11154 nobody 9u IPv4 109495 0t0 TCP percona33:
garbd 11154 nobody 10u IPv4 109499 0t0 TCP percona33:
[root@percona33 ~]# kill 11154
[root@percona33 ~]# /etc/init.d/garb status
garbd is stopped
Seems like the script is checking pid file which does not exist.
Able to reproduce the same with Percona- XtraDB- Cluster- garbd-3. x86_64 0:3.7-1.3254.rhel6. Script is not working properly.
[root@percona- pxc55-1 mysql]# pxc55-1 mysql]# /etc/init.d/garb start pxc55-1 mysql]# /etc/init.d/garb status pxc55-1 mysql]# pxc55-1 mysql]# ps -ef | grep -i garbd /192.168. 43.60:4567 -g my_centos_cluster -o gmcast. listen_ addr=tcp: //192.168. 43.60:4777 -l /var/lib/ mysql/garbd. log pxc55-1 mysql]# pxc55-1 mysql]# /etc/init.d/garb stop pxc55-1 mysql]# [ OK ] pxc55-1 mysql]# /etc/init.d/garb status pxc55-1 mysql]#
[root@percona-
Starting /usr/bin/garbd: [FAILED]
[root@percona-
garbd (pid 1971) is running...
[root@percona-
[root@percona-
nobody 1971 1 0 22:40 ? 00:00:00 /usr/bin/garbd -d -a gcomm:/
root 1981 1586 0 22:40 pts/2 00:00:00 grep -i garbd
[root@percona-
[root@percona-
[root@percona-
[root@percona-
garbd (pid 1971) is running...
[root@percona-