Subscribe
Accepted Solution

SnapCreator 3.5 mysql plugin. not able to quiesce

[ Edited ]

Hi

I am having problem to make it work :-/

I am not able to quiesce  MySql database even from the host.

########## Application quiesce ##########
[Mon Jan 23 14:30:46 2012] DEBUG: Timeout of authentication at /</NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Mon Jan 23 14:30:46 2012] INFO: Quiescing databases
[Mon Jan 23 14:30:46 2012] ERROR: [mys-00001] Database connection does not exist
[Mon Jan 23 14:30:46 2012] ERROR: [scf-00053] Application quiesce for plugin mysql failed with exit code 1, Exiting!

at the beginnig I thought my problem could be relative to my network , so I ran the commande line directly from my Mysql server.

./snapcreator --action quiesce --profile macas --verbose --debug

everytime I have 

root@alain macas]# cat macas.debug.20120123143046.log
[Mon Jan 23 14:30:46 2012] DEBUG: GMT - Mon Jan 23 14:30:46 2012
[Mon Jan 23 14:30:46 2012] DEBUG: Version: NetApp Snap Creator Framework 3.5.0
[Mon Jan 23 14:30:46 2012] DEBUG: Profile: macas
[Mon Jan 23 14:30:46 2012] DEBUG: Config Type: STANDARD
[Mon Jan 23 14:30:46 2012] DEBUG: Action: quiesce
[Mon Jan 23 14:30:46 2012] DEBUG: Application Plugin: mysql
[Mon Jan 23 14:30:46 2012] DEBUG: File System Plugin: null
[Mon Jan 23 14:30:46 2012] DEBUG: Policy: null
[Mon Jan 23 14:30:46 2012] DEBUG: Snapshot Name: null
[Mon Jan 23 14:30:46 2012] INFO: Logfile timestamp: 20120123143046
[Mon Jan 23 14:30:46 2012] DEBUG: Timeout of authentication at /</NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112


########## Parsing Environment Parameters ##########
[Mon Jan 23 14:30:46 2012] DEBUG: Parsing VOLUMES - controller: mercury volume: cdump
[Mon Jan 23 14:30:46 2012] DEBUG: Parsing NTAP_USERS - controller: mercury user: root
[Mon Jan 23 14:30:46 2012] DEBUG: Parsing NTAP_SNAPSHOT_RETENTIONS - policy: daily retention: 3

########## Application quiesce ##########
[Mon Jan 23 14:30:46 2012] DEBUG: Timeout of authentication at /</NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Mon Jan 23 14:30:46 2012] INFO: Quiescing databases
[Mon Jan 23 14:30:46 2012] ERROR: [mys-00001] Database connection does not exist
[Mon Jan 23 14:30:46 2012] ERROR: [scf-00053] Application quiesce for plugin mysql failed with exit code 1, Exiting!

########## Application unquiesce ##########
[Mon Jan 23 14:30:46 2012] DEBUG: Timeout of authentication at /</NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Mon Jan 23 14:30:46 2012] INFO: Unquiescing databases
[Mon Jan 23 14:30:46 2012] ERROR: [mys-00004] Database connection does not exist
[Mon Jan 23 14:30:46 2012] ERROR: [scf-00054] Application unquiesce for plugin mysql failed with exit code 1, Exiting!

########## PRE EXIT COMMANDS ##########
[Mon Jan 23 14:30:46 2012] INFO: No commands defined

########## PRE EXIT COMMANDS FINISHED SUCCESSFULLY ##########
[Mon Jan 23 14:30:46 2012] DEBUG: Exiting with error code - 2

looks like the authentification to my Mysql databse does not work

I created a new REDHAT VM and install MySql on. I use root to connect to the database for the test but unfortunatly I still have the same issue.

could be the problem be it in a VM? what setting(s) should I check ?

I am not using SSL

I attached configuration file(named mysql.conf)

Many thanks in advanced

Alain

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

It looks like SC cant get a database connection. Below are your settings:

MYSQL_DATABASES=mysql:root/53616c7465645f5f9b57ab314e02617d65cf27adbba602ed266987370e53704f

HOST=172.20.20.192

PORTS=mysql:3306

MASTER_SLAVE=N

I would change HOST=localhost

I would verify is DB really running on 3306? Do a
"telnet localhost 3306"

I would check the database connection: mysql -uUsername -pPassword

Do you get a connection using same user running SC with password SC is using for mysql?

I would not use --action quiesce, the --action snap is better, it will run quiesce as well.

Finally what version of SC do you have? The latest version on NOW is 3.5, if you have 3.3 or something old, I would get 3.5.

Let me know if this helps?

Regards,

Keith

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi Keith

Many thanks for you quick answer :-)

My current config at work

redhat 5.7

mysql 5.0.77

I know it it's not in the matrix:-(

and I am using Snapcreator 3.5.0 scServer.

telnet localhost 3306 works fine.

login and password are different for Snapcreator and mysql

login for mysql is root

I follow your advice and  modify the host=localhost , there is an improvement now I can quiesce  but got "bad handshake" with

"./snapcreator --action quiesce --profile macas --verbose --debug" and "./snapcreator --action snap --policy daily --profile macas --verbose --debug"

[root@alain scServer3.5.0]# ./snapcreator --action snap --policy daily --profile macas --verbose --debug
[Wed Jan 25 10:38:55 2012] DEBUG: Loaded Config File /NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/configs/macas/macas.conf Successfully
[Wed Jan 25 10:38:55 2012] DEBUG: GMT - Wed Jan 25 10:38:55 2012
[Wed Jan 25 10:38:55 2012] DEBUG: Version: NetApp Snap Creator Framework 3.5.0
[Wed Jan 25 10:38:55 2012] DEBUG: Profile: macas
[Wed Jan 25 10:38:55 2012] DEBUG: Config Type: STANDARD
[Wed Jan 25 10:38:55 2012] DEBUG: Action: snap
[Wed Jan 25 10:38:55 2012] DEBUG: Application Plugin: mysql
[Wed Jan 25 10:38:55 2012] DEBUG: File System Plugin: null
[Wed Jan 25 10:38:55 2012] DEBUG: Policy: daily
[Wed Jan 25 10:38:55 2012] DEBUG: Snapshot Name: macas-daily_20120125103855
[Wed Jan 25 10:38:55 2012] INFO: Logfile timestamp: 20120125103855

########## Parsing Environment Parameters ##########
[Wed Jan 25 10:38:55 2012] DEBUG: Parsing VOLUMES - controller: mercury volume: cdump
[Wed Jan 25 10:38:55 2012] DEBUG: Parsing NTAP_USERS - controller: mercury user: root
[Wed Jan 25 10:38:55 2012] DEBUG: Parsing NTAP_SNAPSHOT_RETENTIONS - policy: daily retention: 3

########## PRE APPLICATION QUIESCE COMMANDS ##########
[Wed Jan 25 10:38:55 2012] INFO: No commands defined

########## PRE APPLICATION QUIESCE COMMANDS FINISHED SUCCESSFULLY ##########

########## Application quiesce ##########
[Wed Jan 25 10:38:55 2012] INFO: Quiescing databases
[Wed Jan 25 10:38:55 2012] INFO: Quiescing database mysql
[Wed Jan 25 10:38:55 2012] DEBUG: Connection to mysql successfully established
[Wed Jan 25 10:38:55 2012] DEBUG: Executing sql command 'flush tables with read lock' for database mysql
[Wed Jan 25 10:38:55 2012] ERROR: #08S01Bad handshake
[Wed Jan 25 10:38:55 2012] ERROR: [scf-00053] Application quiesce for plugin mysql failed with exit code 1, Exiting!

########## Application unquiesce ##########
[Wed Jan 25 10:38:55 2012] INFO: Unquiescing databases
[Wed Jan 25 10:38:55 2012] INFO: Unquiescing database mysql
[Wed Jan 25 10:38:55 2012] DEBUG: Connection to mysql established successfully
[Wed Jan 25 10:38:55 2012] DEBUG: Executing sql command 'unlock tables' for database mysql
[Wed Jan 25 10:38:55 2012] ERROR: #08S01Bad handshake
[Wed Jan 25 10:38:55 2012] ERROR: [scf-00054] Application unquiesce for plugin mysql failed with exit code 1, Exiting!

########## PRE EXIT COMMANDS ##########
[Wed Jan 25 10:38:55 2012] INFO: No commands defined

########## PRE EXIT COMMANDS FINISHED SUCCESSFULLY ##########
[Wed Jan 25 10:38:55 2012] DEBUG: Exiting with error code - 2

Kind regards

Alain

Message was edited by: Robert Gray I found one of your advices on the community about a workaround for "#08S01Bad handshake" commenting out APP_NAME=mysql #APP_NAME=mysql in config): and add in config file APP_QUIESCE_CMD01=mysql <arguments> <sql query=flush tables with read lock> APP_QUIESCE_CMD02=mysql <arguments> <sql query=flush logs> APP_UNQUIESCE_CMD01=mysql <arguments> <sql query=unlock tables> PRE_EXIT_CMD01=mysql <arguments> <sql query=unlock tables> unfortunatly I was not confortable how to modify the file but I did. I thought it did work but when I check the debug file :-( I had what's bellow. Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_QUIESCE_CMD01, please check configuration file [Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_QUIESCE_CMD02, please check configuration file [Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_UNQUIESCE_CMD01, please check configuration file [Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter PRE_EXIT_CMD01, please check configuration file [Wed Jan 25 15:31:46 2012] DEBUG: Loaded Config File /NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/configs/macas/macas.conf Successfully I 've attached  teh debug file and config file. Many thanks in advance

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi,

I have the same problem. I'm trying to snapshot a mysql DB. Quiescing doesn't work.

I use snapcreator 3.5.

Here are the agent logs:

[Wed Jan 25 14:17:29 2012] DEBUG: 1.2.3.4 is allowed to send requests

[Wed Jan 25 14:17:29 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:17:29 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:17:29 2012] INFO: Starting watchdog with [7677], forced unquiesce timeout [65] second(s)

[Wed Jan 25 14:17:29 2012] DEBUG: Couldn't connect to localhost:3306/tcp: IO::Socket::INET: connect: Connection refused at /</usr/local/scAgent3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Wed Jan 25 14:17:29 2012] INFO: Quiescing databases

[Wed Jan 25 14:17:29 2012] ERROR: [mys-00001] Database connection does not exist

[Wed Jan 25 14:17:29 2012] DEBUG: Reloading configuration from /usr/local/scAgent3.5.0/config/agent.conf

[Wed Jan 25 14:17:29 2012] DEBUG: Reloading configuration finished with

exit code: [0]

stdout: []

stderr: []

[Wed Jan 25 14:17:29 2012] DEBUG: 1.2.3.4 is allowed to send requests

[Wed Jan 25 14:17:29 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:17:29 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:17:29 2012] DEBUG: Couldn't connect to localhost:3306/tcp: IO::Socket::INET: connect: Connection refused at /</usr/local/scAgent3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Wed Jan 25 14:17:29 2012] INFO: Unquiescing databases

[Wed Jan 25 14:17:29 2012] ERROR: [mys-00004] Database connection does not exist

[Wed Jan 25 14:24:22 2012] DEBUG: Reloading configuration from /usr/local/scAgent3.5.0/config/agent.conf

[Wed Jan 25 14:24:22 2012] DEBUG: Reloading configuration finished with

exit code: [0]

stdout: []

stderr: []

[Wed Jan 25 14:24:22 2012] DEBUG: 1.2.3.4 is allowed to send requests

[Wed Jan 25 14:24:22 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:24:22 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:24:22 2012] INFO: Starting watchdog with [7679], forced unquiesce timeout [65] second(s)

[Wed Jan 25 14:24:23 2012] DEBUG: Couldn't connect to localhost:3306/tcp: IO::Socket::INET: connect: Connection refused at /</usr/local/scAgent3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

[Wed Jan 25 14:24:23 2012] INFO: Quiescing databases

[Wed Jan 25 14:24:23 2012] ERROR: [mys-00001] Database connection does not exist

[Wed Jan 25 14:24:23 2012] DEBUG: Reloading configuration from /usr/local/scAgent3.5.0/config/agent.conf

[Wed Jan 25 14:24:23 2012] DEBUG: Reloading configuration finished with

exit code: [0]

stdout: []

stderr: []

[Wed Jan 25 14:24:23 2012] DEBUG: 1.2.3.4 is allowed to send requests

[Wed Jan 25 14:24:23 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:24:23 2012] INFO: Authorized request from [scServer@*]

[Wed Jan 25 14:24:23 2012] DEBUG: Couldn't connect to localhost:3306/tcp: IO::Socket::INET: connect: Connection refused at /</usr/local/scAgent3.5.0/snapcreator>SnapCreator/MOD/MYSQL.pm line 112

=== I tested the connection using mysql CLI and it works ===

[Wed Jan 25 14:24:23 2012] INFO: Unquiescing databases

[Wed Jan 25 14:24:23 2012] ERROR: [mys-00004] Database connection does not exist

Regards,

Greg.

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

What version of MySQL? What are your config settings for MySQL?

As workaround you can use the above method, mentioned in thread and the mysql command. Also I would like at IMT for Snap Creator, what is supported should work, but we certainly dont test every version, especially really old versions of MySQL.

Various 5.0 versions of MySQL 5.0.77 have had issues with the MySQL client:

http://forums.mysql.com/read.php?51,356486,356927#msg-356927

Again change the HOST setting to HOST=localhost and ensure that the mysql port is open.

1. telnet localhost 3306

2. mysql -u root -h localhost -P 3306 -p

Let us know

Regards,

Keith

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

This looks like issue with MySQL client, I did some research on MySQL forums and there seems to be issues with old versions of MySQL which we dont test.

I am glad you found work around this is definitely a decent workaround and is pretty simple.

I will see if maybe we can look at a using a MySQL client that is less sensitive, there seems to be other options to look into.

Regards,

Keith

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi Keith

I have another problem now , after I modified the file config adding

####################
### Pre Commands ###
####################
#PRE_APP_QUIESCE_CMD01=
#PRE_NTAP_CMD01=
#PRE_NTAP_CLONE_DELETE_CMD01=
#PRE_APP_UNQUIESCE_CMD01=
#PRE_RESTORE_CMD01=
#PRE_CLONE_CREATE_CMD01=


APP_QUIESCE_CMD01=mysql <arguments> <sql query=flush tables with read lock>
APP_QUIESCE_CMD02=mysql <arguments> <sql query=flush logs>

I can see it complaining about "<" character in the debug log. What I am doing wrong?  

do you have a example of config file for quiescing mysql without the plugin?

########## PRE NETAPP COMMANDS FINISHED SUCCESSFULLY ##########

[Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_QUIESCE_CMD01, please check configuration file

[Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_QUIESCE_CMD02, please check configuration file

[Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter APP_UNQUIESCE_CMD01, please check configuration file

[Wed Jan 25 15:31:46 2012] WARN: [scf-00132] Invalid character "<" defined in parameter PRE_EXIT_CMD01, please check configuration file

[Wed Jan 25 15:31:46 2012] DEBUG: Loaded Config File /NetApp_Snap_Creator_Framework3.5.0-Linux64/scServer3.5.0/config

Many thanks for your help

Alain

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi Alain,

Snap Creator will ignore the "<" character if it is present in a CMD, meaning SC will skip the command if it finds the "<" present in command. This character will break our XML encoding which happens between scServer and scAgent.

If you have to use the "<" character then you need to add command to a wrapper script and call the script.

The only acceptions where a "<" is allowed is the SUCCESS_TRAP and SENDTRAP commands.

Regards,

Keith

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi Keith

thanks for your answer. but I don't don't have your knowledge about scripting , mysql etc.. do you have an file sample I can refer too?

I would apreciate and I am sure that will help lot a people too

Many thanks for you help

Alain

Re: SnapCreator 3.5 mysql plugin. not able to quiesce

Hi Alain,

Nothing really to script just basic mysql commands.

Something like:

APP_QUIESCE_CMD01=mysql  –Dmysql –uuser –Ppwd < /path/to/quiesce.script

APP_UNQUIESCE_CMD01=mysql  –Dmysql –uuser –Ppwd < /path/to/unquiesce.script

PRE_EXIT_CMD01=mysql  –Dmysql –uuser –Ppwd < /path/to/unquiesce.script

The -D argument is for your database name, probably mysql

The -u argument is for username

The -P argument is for password

In the quiesce quiesce.script you would have:

flush tables with read lock

flush logs

In unquiesce.script you would have:

unlock tables

I am not a mysql expert either, this was just google

Point is in SC you can simply run commands so figure out how you want or can do the mysql queries in the quiesce.script and unquiesce.script and that is it.

Regards,

Keith