SysV Init script problem for Percona XtraDB Cluster ?

179 views
Skip to first unread message

Laurent MINOST

unread,
Nov 16, 2012, 5:09:36 AM11/16/12
to percona-d...@googlegroups.com
Hi,

Everytime I start PXDB 5.5.27 or 5.5.28 AND when an SST is needed I got :
     
      Starting MySQL (Percona XtraDB Cluster) database server: mysqld . . . . . . . . . . . . . . . . . . . . failed! 

which is false because mysqld has really started in background and is preparing for the SST from another node but returns done to the SysV init script seems to be false.
Am I the only one having this behavior or anyone else is having it please ? Is it a bug ?

Thanks,
Regards.

Laurent

Olivier Doucet

unread,
Nov 16, 2012, 6:11:46 AM11/16/12
to percona-d...@googlegroups.com
2012/11/16 Laurent MINOST <lol...@gmail.com>:
> Starting MySQL (Percona XtraDB Cluster) database server: mysqld . . .
> . . . . . . . . . . . . . . . . . failed!
>
Hello,

Try prefixing script with 'sh -x 'to show what is really executed by
the init script. You'll then be able to debug it easily and provide
the mailing list additional informations :)

Olivier

Laurent MINOST

unread,
Nov 16, 2012, 7:13:48 AM11/16/12
to percona-d...@googlegroups.com
Hi Olivier,

Thanks for your answer, the problem seems to be related to the check done on mysqld on a loop to see if it's properly started or not :

+ ping_alive=0
+ ps_alive=0
+ mysqld_get_param pid-file
+ /usr/sbin/mysqld --print-defaults
+ tr   \n
+ grep -- --pid-file
+ tail+  -n 1cut
 -d= -f2
+ pidfile=
+ [ -f  ]
+ [ check_alive = check_alive -a 0 = 1 ]
+ [ check_alive = check_dead -a 0 = 0 -a 0 = 0 ]
+ [ nowarn = warn ]
+ return 1
+ log_progress_msg .
+ [ -z . ]
+ /bin/echo -n  .
 .+ sleep 1
+ mysqld_status check_alive nowarn
+ /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping
+ ping_output=/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

This check works properly when the server is started without having to do an SST but in the case of an SST, then mysqld is not yet available since the joining node has not received yet all datas from a Donor node so I understand that we cannot wait undefinitely for the SST to finish and then display : OK started successfully but I think that the script should be fixed to handle this case more properly by displaying a message like : "MySQL Server started but SST is in progress (local node will be unavailable for connections during a few seconds/minutes) ...", simply failing like this is done at the moment is not proper IMO because if you do not already know how the internals are working behind then you can think that the server has really failed to start, which is really not the case.

Regards,

Laurent

Laurent MINOST

unread,
Dec 12, 2012, 9:05:21 AM12/12/12
to percona-d...@googlegroups.com
Hi Michal,

No I did not fix the init script due to lack of time, by the way I did not open a bug entry which I think should be done since the script is having a bad behavior.

For your second problem, I did not had such behaviour, you should check the error log for the other nodes that are freezing maybe some useful informations could be located there and will help you to understand the root cause ?
As I remember, ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction are related with innodb_lock_wait_timeout which is reached but don't understand why you have this message returned when you kill one of the node ...

Regards,

Laurent

Le mardi 11 décembre 2012 18:38:22 UTC+1, Michal Moravcik a écrit :
Hi Laurent,

have you fixed the init script already? I have same problem with starting Percona XtraDB server.

I also have a problem when I turn off one of the nodes (kill mysqld or turn off the machine) the other node freezes with following message trying to run any of mysql query: 
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction

Did you have a problem with that? When I turn off any of nodes by command everything seems to work.

Regards,
Michal


Dňa piatok, 16. novembra 2012 13:13:48 UTC+1 Laurent MINOST napísal(-a):
Reply all
Reply to author
Forward
0 new messages