Results 1 to 4 of 4

Thread: "copy-plugin exited with error 512" when doing remote incremental backup.

  1. #1
    Join Date
    Feb 2017
    Posts
    4

    Default "copy-plugin exited with error 512" when doing remote incremental backup.

    While the servers were Ubuntu 12.04, no such problem happened.
    After I upgraded both machines to Ubuntu 14.04 recently, incremental backups fail.
    I've google'd and cannot find out why.
    Logs are as follows:
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: START OF BACKUP
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE START: Initialization
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Mail address: u634410 is ok
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/recruitmentExam/tmp3jNmu.conf
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: {
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: retention-policy=7W
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: password=******
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysql-binlog-path=/var/log/mysql
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-mode=raw
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-level=1
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mailto=u634410
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: user=remoteZrm
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-type=regular
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mail-policy=only-on-error
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: destination=/home/u634410
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: post-backup-plugin=/etc/mysql-zrm/recruitmentExam/post-backup.pl
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: quiet=0
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: host=10.21.1.8
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: logical-parallel=0
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: databases=recruitmentExam camp2016
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: verbose=1
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: }
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Getting mysql variables
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysqladmin --user="remoteZrm" --password="*****" --host="10.21.1.8" variables
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: datadir is /var/lib/mysql/
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysql_version is 5.5.53-0ubuntu0.14.04.1-log
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: InnoDB log dir is /var/lib/mysql/.
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup set being used is recruitmentExam
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-set=recruitmentExam
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-date=20170202114501
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysql-server-os=Linux/Unix
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-type=regular
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: host=10.21.1.8
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-date-epoch=1486007101
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: retention-policy=7W
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 3.0
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysql-version=5.5.53-0ubuntu0.14.04.1-log
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-directory=/home/u634410/recruitmentExam/20170202114501
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: backup-level=1
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE END: Initialization
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE START: Running pre backup plugin
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Executing pre-backup-plugin
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE END: Running pre backup plugin
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE START: Flushing logs
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Flushing the logs
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: mysqladmin --user="remoteZrm" --password="*****" --host="10.21.1.8" flush-logs
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Getting master logname using command mysql --user="remoteZrm" --password="*****" --host="10.21.1.8" -e "show master status"
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE END: Flushing logs
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: PHASE START: Creating incremental backup
    Thu Feb 02 11:45:01 2017: recruitmentExam:backup:INFO: Getting list of binary logs using command mysql --user="remoteZrm" --password="*****" --host="10.21.1.8" -e "show master logs"
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:ERROR: Could not copy file "/var/log/mysql/mysql-bin.000104"
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:ERROR: copy-plugin exited with error 512
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:ERROR: Could not copy bin log file /home/u634410/recruitmentExam/20170202114501/mysql-bin.000104
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: incremental=mysql-bin.[0-9]*
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE END: Creating incremental backup
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE START: Calculating backup size & checksums
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: next-binlog=mysql-bin.000105
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: last-backup=/home/u634410/recruitmentExam/20170202063002
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: backup-size=0.00 MB
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE END: Calculating backup size & checksums
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: read-locks-time=00:00:00
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: flush-logs-time=00:00:00
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: backup-time=00:00:02
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: backup-status=Backup done but with errors
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: Backup done but with errors
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE START: Running post backup plugin
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: Executing post-backup-plugin
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: Command being executed is /etc/mysql-zrm/recruitmentExam/post-backup.pl --databases recruitmentExam camp2016 --backup-directory /home/u634410/recruitmentExam/20170202114501 --checksum-pending
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE END: Running post backup plugin
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE START: Mailing backup report
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: mailing file /tmp/52DiIenWBe
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: mail command is cat "/tmp/52DiIenWBe"|mail -s "[ZRM for MySQL Report] backup-set recruitmentExam" u634410
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE END: Mailing backup report
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE START: Cleanup
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: mailing file /tmp/bEryPDeP3h
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: mail command is cat "/tmp/bEryPDeP3h"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set recruitmentExam" u634410
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: PHASE END: Cleanup
    Thu Feb 02 11:45:03 2017: recruitmentExam:backup:INFO: END OF BACKUP

    Contents of /var/log/mysql-zrm/socket-server.log of MySQL server machine:
    Client started
    TMP directory being used is /tmp
    Client clean exit

    Contents of mysql-zrm.conf:
    destination=/home/u634410
    retention-policy=7W
    databases=recruitmentExam camp2016
    user="remoteZrm"
    password="XXXX"
    host="10.21.1.8"
    mysql-binlog-path="/var/log/mysql"
    verbose=1
    mailto="u634410"
    mail-policy=only-on-error
    copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
    post-backup-plugin="/etc/mysql-zrm/recruitmentExam/post-backup.pl"

    Contents of /etc/xinetd.d/mysql-zrm-socket-server of MySQL server machine:
    service mysql-zrm-socket-server
    {
    type = UNLISTED
    disable = no
    socket_type = stream
    protocol = tcp
    wait = no
    user = mysql
    group = mysql
    instances = 1
    server = /usr/share/mysql-zrm/plugins/socket-server.pl
    port = 25300
    only_from = 10.16.7.205
    }

    And the lines containing "mysql" in /etc/passwd:
    mysql:x:102:106:MySQL Server,,,:/nonexistent:/bin/false --> of MySQL server machine
    mysql:x:106:114:MySQL Server,,,:/nonexistent:/bin/false --> of mysql-zrm machine

    Helps would be really appreciated.

  2. #2

    Default

    > /home/u634410/recruitmentExam/20170202114501/mysql-bin.000104

    Check if this file is readable by mysql user. I'm assuming you are running socket-copy plugin as mysql user.

  3. #3
    Join Date
    Feb 2017
    Posts
    4

    Default

    Thank you for your reply.

    /home/u634410/recruitmentExam/20170202114501/mysql-bin.000104 doesn't exist.
    The directory contains "index" and "zrm_checksum" files, and ls -ld gives:
    drwx------ 2 u634410 root 4096 Feb 2 11:45 /home/u634410/recruitmentExam/20170202114501
    I tried adding "mysql" user to "u634410" and "root" groups respectively, same results.
    The only differences are that the binlog files on MySQL server are now 000106, 000107... and so forth,
    and new directories such as 20170203110001 produced on mysql-zrm machine, with the same owner, permission and containing files as above.

    And I forgot to mention in my previous post that backups are done through root's crontab:
    $ sudo crontab -l
    0 4 * * * /usr/bin/mysql-zrm --action purge #>/dev/null 2>&1
    #*/15 0-5,7-23 * * * /usr/bin/mysql-zrm-scheduler --now --backup-set recruitmentExam --backup-level 1 >/dev/null 2>&1 #Currently disabled, of course.
    30 6 * * * /usr/bin/mysql-zrm-scheduler --now --backup-set recruitmentExam >/dev/null 2>&1

    If you mean on MySQL server side,
    $ ls -ld /var/log/mysql
    drwxr-s--- 2 mysql adm 4096 Feb 3 06:33 /var/log/mysql
    $ ls -l /var/log/mysql
    -rw-rw---- 1 mysql adm 2367 Feb 2 11:45 mysql-bin.000104
    Beyond this, I don't know how to "physically" test it, since the "mysql" user was created by Ubuntu's MySQL installation package. Password unknown to me.
    As previously posted, the lines containing "mysql" in /etc/passwd are:
    mysql:x:102:106:MySQL Server,,,:/nonexistent:/bin/false --> of MySQL server machine
    mysql:x:106:114:MySQL Server,,,:/nonexistent:/bin/false --> of mysql-zrm machine

    So, can socket-copy plugin be run as other ordinary user?
    If so, how can I configure for that? What settings and permissions, on MySQL server side and mysql-zrm side?

    By the way, searching "512" in http://docs.zmanda.com/Project:Zmanda_Recovery_Manager_for_MySQL_3.2/ZMC_Users_Manual/Error_Messages leads me to http://kb.zmanda.com/article.php?id=213, which seems to be a down site.

    Quote Originally Posted by paddy View Post
    > /home/u634410/recruitmentExam/20170202114501/mysql-bin.000104

    Check if this file is readable by mysql user. I'm assuming you are running socket-copy plugin as mysql user.

  4. #4
    Join Date
    Feb 2017
    Posts
    4

    Default

    Any thoughts?

    It would be really a pity if I can't get it working, since mysql-zrm has been so easy to use and it really saved my life once.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •