# Errors after starting new slave server replication using Percona XtraBackup's backup

**URL:** <https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064>\
**Category:** Other MySQL® Questions\
**Created:** [February 20, 2015, 1:15am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064 "2015-02-20T01:15:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dissident](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dissident](https://forums.percona.com/u/Dissident)\
**Post date:** [February 20, 2015, 1:15am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/1 "2015-02-20T01:15:10Z")

</div>

Hey!

We have one master MySQL server and one slave MySQL server, everything works fine. Now we need to start second slave server. So I made backup with Percona XtraBackup from slave server using Percona’s manual. I use this command:  
sudo innobackupex --defaults-file=/etc/my.cnf --parallel=4 --password=‘mypass’ --slave-info --safe-slave-backup --compress --compress-threads=4 --rsync --throttle=30 /backups/test/  
Then I do decompress and applylog, copying files to new slave, change directory rights, start MySQL, it works fine. Then I do RESET SLAVE ALL; on new slave server, copy my.cnf from first slave server, add there server-id = 3 and skip-slave-start option. Then I do

CHANGE MASTER TO  
MASTER\_HOST=‘master\_ip’,  
MASTER\_USER=‘replicationuser’,  
MASTER\_PASSWORD=‘replicationpass’,  
MASTER\_LOG\_FILE=‘(from above)’,  
MASTER\_LOG\_POS= (from above);

With correct and fresh settings from master server using SHOW SLAVE STATUS\G command on it. Then, in 2 hours from backup creation, I start new slave, first 30 second everything in SHOW SLAVE STATUS\G works fine, LOG\_POS is changing, but then I see this error:  
[URL=“[http://s15.postimg.org/twk7u6ybv/image.jpg](http://s15.postimg.org/twk7u6ybv/image.jpg)”][http://s15.postimg.org/twk7u6ybv/image.jpg[/URL]](http://s15.postimg.org/twk7u6ybv/image.jpg%5B/URL%5D)  
I try to ignore 1062 error using my.cnf, but in this case I see:  
[URL=“[http://s4.postimg.org/mvlugcg6l/image.jpg](http://s4.postimg.org/mvlugcg6l/image.jpg)”][http://s4.postimg.org/mvlugcg6l/image.jpg[/URL]](http://s4.postimg.org/mvlugcg6l/image.jpg%5B/URL%5D)

So I think that something wrong with this replication or new slave server. Other slave server is working perfectly. Do you have any ideas what should I check or do?

---

<div class="post-metadata">

**Author:** ![wydlakson](https://avatars.discourse-cdn.com/v4/letter/w/57b2e6/32.png) [@wydlakson](https://forums.percona.com/u/wydlakson)\
**Post date:** [February 20, 2015, 5:04am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/2 "2015-02-20T05:04:31Z")

</div>

Hi,

is the slave virtual? In my experience it look like some limits virtualization (for example “num file locks”). Or try find in binlog the “duplicate entry”.

---

<div class="post-metadata">

**Author:** ![Dissident](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dissident](https://forums.percona.com/u/Dissident)\
**Post date:** [February 20, 2015, 5:42am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/3 "2015-02-20T05:42:38Z")

</div>

Yes, virtual. Will try to find information about this, thanks.

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [February 20, 2015, 9:43am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/4 "2015-02-20T09:43:45Z")

</div>

Hi Dissident;

A few things to check:

1. Make sure that you are getting your replication coordinates from xtrabackup\_slave\_info (points to the master of the slave you backed up) and not xtrabackup\_binlog\_info (points to the slave itself that you backed up).

2. Make sure that you have the correct master IP / port to go along with the above replication coordinates.

3. Make sure the zabbix is not somehow writing to any of the slaves (unlikely, but you never know).

Chances are it’s one of the first two though if I had to bet.

-Scott

---

<div class="post-metadata">

**Author:** ![Dissident](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dissident](https://forums.percona.com/u/Dissident)\
**Post date:** [February 24, 2015, 5:36am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/5 "2015-02-24T05:36:13Z")

</div>

Thanks, Scott!

Problem was that I took coordinates from working slave server, not from xtrabackup\_slave\_info. Now everything is fine.  
Thanks again.

Viktor

---

<div class="post-metadata">

**Author:** ![Dissident](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dissident](https://forums.percona.com/u/Dissident)\
**Post date:** [February 24, 2015, 8:35am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/6 "2015-02-24T08:35:06Z")

</div>

And one more question, if possible.  
Now there are 2 working slave servers, on the first I see:  
Exec\_Master\_Log\_Pos: 980539623  
Relay\_Log\_Space: 980539968

But on the second:  
Exec\_Master\_Log\_Pos: 980571400  
Relay\_Log\_Space: 120415791

Both slave servers have  
Slave\_IO\_Running: Yes  
Slave\_SQL\_Running: Yes

What do you think, is that ok that Relay\_Log\_Space on two slave servers are different? On the first it’s like Exec\_Master\_Log\_Pos, but on the second it’s much much smaller…

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [February 24, 2015, 12:15pm UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/7 "2015-02-24T12:15:04Z")

</div>

Hi Dissident;

What does your Seconds\_behind\_master value say? As long as the slave is replicating and catching up, it should not be an issue. The “Relay\_Log\_Space” value is just the size in bytes of all the relay log related files on disk, which gets cleaned up as the logs are processed.

-Scott

---

<div class="post-metadata">

**Author:** ![Dissident](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dissident](https://forums.percona.com/u/Dissident)\
**Post date:** [February 25, 2015, 12:32am UTC](https://forums.percona.com/t/errors-after-starting-new-slave-server-replication-using-percona-xtrabackups-backup/4064/8 "2015-02-25T00:32:30Z")

</div>

Thanks, Scott!
