PDA

View Full Version : Problem with ZRM for mysql v1.1.4



tkr
February 20th, 2007, 09:55 AM
Forwarding with permission

Kristjan Dodigovic wrote:
> Hi
>
> I install ZRM for mysql v1.1.4 od debian linux.
> When i try to make incremental backup with "mysql-zrm-scheduler --now
> --backup-set test --backup-level 1"
> i get this erorr
> /bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
> /bin/tar: At beginning of tape, quitting now
> /bin/tar: Error is not recoverable: exiting now
>
> gzip: stdin: unexpected end of file
> /bin/tar: Child returned status 2
> /bin/tar: Error exit delayed from previous errors
> Do you know why ZRM is try to conect to tape drive on /dev/nst0 or
> can you help me to avoid this beacuse i want to make backup on my local
> harddrive?
>
>
> Details from log:
> Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
> INFO: ZRM for MySQL Community Edition - version 1.1.4
> INFO: Input Parameters Used {
> INFO: verbose=1
> INFO: retention-policy=3M
> INFO: tmpdir=/tmp
> INFO: destination=/var/lib/mysql-zrm
> INFO: backup-mode=raw
> INFO: password=******
> INFO: user=******
> INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
> INFO: quiet=0
> INFO: backup-level=1
> INFO: databases=testdatabases
> INFO: html-reports=backup-method-info,
> backup-status-info,backup-retention-info, backup-performance-info,
> backup-app-performance-info
> INFO: remote-mysql-binpath=/var/log/mysql
> INFO: host=test.server
> INFO: database=testdatabases
> INFO: html-report-directory=/var/www/mysql-zrm/reports/
> INFO: mysql-binlog-path=/var/log/mysqll
> INFO: }
> INFO: ZRM Temporary configuration file = /etc/mysql-zrm/test/tmpKGTJP.conf
> INFO: Getting mysql variables
> INFO: mysqladmin --user="*****" --password="*****" --host="test.server"
> variables
> INFO: datadir is /var/lib/mysql/
> INFO: mysql_version is 5.0.24a-Debian_2.dotdeb.0-log
> INFO: log_bin=ON
> INFO: InnoDB data file are /var/lib/mysql/ibdata1
> INFO: InnoDB log dir is /var/lib/mysql/.
> INFO: backup set being used is test
> INFO: backup-set=test
> INFO: backup-date=20070220164338
> INFO: host=test.server
> INFO: backup-date-epoch=1171986218
> INFO: retention-policy=3M
> INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.1.4
> INFO: mysql-version=5.0.24a-Debian_2.dotdeb.0-log
> INFO: backup-directory=/var/lib/mysql-zrm/test/20070220164338
> INFO: Flushing the logs
> INFO: flush-logs
> INFO: Getting master logname using command mysql --user="*****""
> --password="*****" --host="test.server" -e "show master status"
> INFO: backup-level=1
> INFO: Getting list of binary logs using command mysql --user="*****""
> --password="*****" --host="test.server" -e "show master logs"
> /bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
> /bin/tar: At beginning of tape, quitting now
> /bin/tar: Error is not recoverable: exiting now
>
> gzip: stdin: unexpected end of file
> /bin/tar: Child returned status 2
> /bin/tar: Error exit delayed from previous errors
> close of pipe failed
> ERROR: Could not copy file /var/log/mysq/mysql-bin.000408
> ERROR: copy-plugin exited with error 512
> ERROR: Could not copy bin log file mysql-bin.000408
> INFO: incremental=mysql-bin.[0-9]*
> INFO: next-binlog=mysql-bin.000409
> INFO: last-backup=/var/lib/mysql-zrm/test2/20070220121047
> INFO: backup-size=0.00 MB
> INFO: Executing post-backup-plugin
> INFO: read-locks-time=00:00:00
> INFO: flush-logs-time=00:00:01
> INFO: backup-time=00:00:14
> INFO: backup-status=Backup done but with errors
> INFO: Backup done but with errors
> ERROR: /usr/bin/mysql-zrm did not finish successfully
>
> Best regrads
> Kristjan Dodigovic

kkg
February 20th, 2007, 01:04 PM
Could you please run with --verbose and post the logs?

--kkg

Kiki
February 20th, 2007, 11:52 PM
test:/etc/mysql-zrm/test# mysql-zrm --backup-set test --backup-level 1 --verbose --action backup
INFO: ZRM for MySQL Community Edition - version 1.1.4
INFO: Reading options from file /etc/mysql-zrm/mysql-zrm.conf
INFO: Reading options from file /etc/mysql-zrm/test/mysql-zrm.conf
INFO: action being performed is backup
INFO: Input Parameters Used {
INFO: verbose=1
INFO: retention-policy=3M
INFO: backup-level=1
INFO: tmpdir=/tmp
INFO: destination=/var/lib/mysql-zrm
INFO: databases=databasestest
INFO: remote-mysql-binpath=/var/log/mysql
INFO: host=test.server
INFO: database=databasestest
INFO: backup-mode=raw
INFO: password=******
INFO: user=******
INFO: mysql-binlog-path=/var/log/mysql
INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
INFO: }
INFO: ZRM Temporary configuration file = /etc/mysql-zrm/test/tmpw2KGh.conf
INFO: Getting mysql variables
INFO: mysqladmin --user="*****" --password="*****" --host="test.server" variables
INFO: datadir is /var/lib/mysql/
INFO: mysql_version is 5.0.24a-Debian_2.dotdeb.0-log
INFO: log_bin=ON
INFO: InnoDB data file are /var/lib/mysql/ibdata1
INFO: InnoDB log dir is /var/lib/mysql/.
INFO: backup set being used is test
INFO: backup-set=test
INFO: backup-date=20070221093912
INFO: host=test.server
INFO: backup-date-epoch=1172047152
INFO: retention-policy=3M
INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.1.4
INFO: mysql-version=5.0.24a-Debian_2.dotdeb.0-log
INFO: backup-directory=/var/lib/mysql-zrm/test/20070221093912
INFO: Executing pre-backup-plugin
INFO: Flushing the logs
INFO: flush-logs
INFO: Getting master logname using command mysql --user="*****" --password="*****" --host="test.server" -e "show master status"
INFO: backup-level=1
INFO: Getting list of binary logs using command mysql --user="*****" --password="*****" --host="test.server" -e "show master logs"
/bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
/bin/tar: At beginning of tape, quitting now
/bin/tar: Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
Pipe broke at /usr/share/mysql-zrm/plugins/socket-copy.pl line 85.
ERROR: Could not copy file /var/log/mysql/mysql-bin.000412
ERROR: copy-plugin exited with error 8192
ERROR: Could not copy bin log file mysql-bin.000412
INFO: incremental=mysql-bin.[0-9]*
INFO: next-binlog=mysql-bin.000413
INFO: last-backup=/var/lib/mysql-zrm/test2/20070221092948
INFO: backup-size=0.00 MB
INFO: Executing post-backup-plugin
INFO: read-locks-time=00:00:00
INFO: flush-logs-time=00:00:00
INFO: backup-time=00:00:01
INFO: backup-status=Backup done but with errors
INFO: Backup done but with errors

kkg
February 21st, 2007, 12:03 AM
Could you also post the /tmp/client.log on the machine running test.server

--kkg

Kiki
February 21st, 2007, 12:20 AM
I dont have client.log on test.server, client.log is only on client server.

Details from /tmp/client.log on client server.
Client started
Client clean exit

kkg
February 21st, 2007, 12:59 AM
That is strange. As per the logs you are trying to backup the host test.server and hence this host should be having a /tmp/client.log.

BTW which is the client server machine? I don't see any reference to that machine in the logs.

Could you see if xinet is running on test.server and if you are able to do a telnet to port 25300 on the test.server machine.

--kkg

Kiki
February 21st, 2007, 01:22 AM
Client is test.server. I can connect from test to test.server on port 25300.
Details from /tmp/client.log on test.server
Client started
Client clean exit

kkg
February 21st, 2007, 02:43 AM
Oh boy, no easy answers :-(

When you have some time, could you please try the following on the command line and post the output

first edit the file /usr/share/mysql-zrm/plugins/socket-copy.pl and add the following line

print "|$TAR --same-owner -xpszC $destDir\n";

as the first line in the function readTarStream()

Then do the following in the shell

export ZRM_CONF=/etc/mysql-zrm/test/mysql-zrm.conf
/usr/share/mysql-zrm/plugins/socket-copy.pl --source-host test.server --source-file /var/log/mysql/mysql-bin.000412 --destination-host localhost --destination-directory /tmp

Sorry to send you so many instructions and questions but currently I am shooting in the dark and to top it all I don't have a debian system with me at this point.

--kkg

nikola1709
February 21st, 2007, 03:07 AM
does ZRM supports backup on local disc? As it seems that by deafult it is trying to make backup to tape drive.

Kiki
February 21st, 2007, 03:12 AM
test:/usr/share/mysql-zrm/plugins# export ZRM_CONF=/etc/mysql-zrm/test/mysql-zrm.conf
test:/usr/share/mysql-zrm/plugins# /usr/share/mysql-zrm/plugins/socket-copy.pl --source-host test.server --source-file /var/log/mysql/mysql-bin.000412 --destination-host localhost --destination-directory /tmp
|/bin/tar --same-owner -xpszC /tmp
/bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
/bin/tar: At beginning of tape, quitting now
/bin/tar: Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
Pipe broke at /usr/share/mysql-zrm/plugins/socket-copy.pl line 85.

Whay ZRM try to connect on tape drive /dev/nst0 and tar someting on it?

kkg
February 21st, 2007, 04:55 AM
test:/usr/share/mysql-zrm/plugins# export ZRM_CONF=/etc/mysql-zrm/test/mysql-zrm.conf
test:/usr/share/mysql-zrm/plugins# /usr/share/mysql-zrm/plugins/socket-copy.pl --source-host test.server --source-file /var/log/mysql/mysql-bin.000412 --destination-host localhost --destination-directory /tmp
|/bin/tar --same-owner -xpszC /tmp
/bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
/bin/tar: At beginning of tape, quitting now
/bin/tar: Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
Pipe broke at /usr/share/mysql-zrm/plugins/socket-copy.pl line 85.

Whay ZRM try to connect on tape drive /dev/nst0 and tar someting on it?

ZRM is not designed to write directly to tape and hence I am extremely surprised that error says it is attempting to write to tape.

As you can see the debug print message that we put in is also showing that the tar is being done to /tmp.

Could you tell me which version of tar is being used on your ZRM machine and on the test.server machine?
--kkg

kkg
February 21st, 2007, 05:07 AM
While we are debugging this, you may also want to try the other ssh-copy.pl instead of socket-copy.pl

--kkg

Kiki
February 21st, 2007, 05:49 AM
Tar version 1.14 is on test and test.server.

with ssh-copy plugin same error

test:/etc/mysql-zrm/test# mysql-zrm-scheduler --now --backup-set test --backup-level 1
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
INFO: ZRM for MySQL Community Edition - version 1.1.4
INFO: Input Parameters Used {
INFO: quiet=0
INFO: verbose=1
INFO: retention-policy=3M
INFO: backup-level=1
INFO: tmpdir=/tmp
INFO: destination=/var/lib/mysql-zrm
INFO: databases=databasetest
INFO: remote-mysql-binpath=/var/log/mysql
INFO: ssh-user=root
INFO: host=test.server
INFO: database=databasetest
INFO: backup-mode=raw
INFO: password=******
INFO: user=******
INFO: mysql-binlog-path=/var/log/mysql
INFO: copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
INFO: }
INFO: ZRM Temporary configuration file = /etc/mysql-zrm/test/tmpC3Q4O.conf
INFO: Getting mysql variables
INFO: mysqladmin --user="*****" --password="*****" --host="test.server" variables
INFO: datadir is /var/lib/mysql/
INFO: mysql_version is 5.0.24a-Debian_2.dotdeb.0-log
INFO: log_bin=ON
INFO: InnoDB data file are /var/lib/mysql/ibdata1
INFO: InnoDB log dir is /var/lib/mysql/.
INFO: backup set being used is test
INFO: backup-set=test
INFO: backup-date=20070221152403
INFO: host=test.server
INFO: backup-date-epoch=1172067843
INFO: retention-policy=3M
INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.1.4
INFO: mysql-version=5.0.24a-Debian_2.dotdeb.0-log
INFO: backup-directory=/var/lib/mysql-zrm/test/20070221152403
INFO: Executing pre-backup-plugin
INFO: Flushing the logs
INFO: flush-logs
INFO: Getting master logname using command mysql --user="*****" --password="*****" --host="test.server" -e "show master status"
INFO: backup-level=1
INFO: Getting list of binary logs using command mysql --user="*****" --password="*****" --host="test.server" -e "show master logs"
/bin/tar: /dev/nst0: Cannot read: Cannot allocate memory
/bin/tar: At beginning of tape, quitting now
/bin/tar: Error is not recoverable: exiting now

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
Password:
Could not copy data
ERROR: Could not copy file /var/log/mysql/mysql-bin.000413
ERROR: copy-plugin exited with error 512
ERROR: Could not copy bin log file mysql-bin.000413
INFO: incremental=mysql-bin.[0-9]*
INFO: next-binlog=mysql-bin.000414
INFO: last-backup=/var/lib/mysql-zrm/test2/20070221093912
INFO: backup-size=0.00 MB
INFO: Executing post-backup-plugin
INFO: read-locks-time=00:00:00
INFO: flush-logs-time=00:00:00
INFO: backup-time=00:00:17
INFO: backup-status=Backup done but with errors
INFO: Backup done but with errors
ERROR: /usr/bin/mysql-zrm did not finish successfully
/usr/bin/mysql-zrm-reporter finished successfully


backup-level 0 work ok

test:/etc/mysql-zrm/test2# mysql-zrm-scheduler --now --backup-set test --backup-level 0
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
INFO: ZRM for MySQL Community Edition - version 1.1.4
INFO: backup-set=test
INFO: backup-date=20070221152923
INFO: host=test.server
INFO: backup-date-epoch=1172068163
INFO: retention-policy=3M
INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.1.4
INFO: mysql-version=5.0.24a-Debian_2.dotdeb.0-log
INFO: backup-directory=/var/lib/mysql-zrm/test/20070221152923
INFO: backup-level=0
WARNING: The database(s) databasetest will be backed up in logical mode since they contain tables that use a transactional engine.
INFO: logical-databases=databasetest
INFO: next-binlog=mysql-bin.000416
INFO: last-backup=/var/lib/mysql-zrm/test/20070221152708
INFO: /var/lib/mysql-zrm/test/20070221152923/backup.sql=b57848c59d0b8d9667f530fdc70c4c32
INFO: backup-size=20.56 MB
INFO: read-locks-time=00:00:02
INFO: flush-logs-time=00:00:00
INFO: backup-time=00:00:02
INFO: backup-status=Backup succeeded
INFO: Backup succeeded
/usr/bin/mysql-zrm started successfully
/usr/bin/mysql-zrm-reporter finished successfully

I try to make backup with the same configuration files from server without tape and backup works.

kkg
February 21st, 2007, 06:11 AM
Since the same configuration works on another system, the problem is probably with the version of tar you have in /bin on this machine. You might want to try installing a different version of tar.

The reason why level 0 backup works is because no tar is involved in a level 0 logical backup.

--kkg

Kiki
February 21st, 2007, 07:11 AM
I install tar version 1.16.1 and there is the same error appear again.

paddy
February 21st, 2007, 08:24 AM
does ZRM supports backup on local disc? As it seems that by deafult it is trying to make backup to tape drive.

ZRM for MySQL does backup to disks. It does not support backups to tape.

Paddy