# tar: -: Cannot write: Broken pipe error

**URL:** <https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193>\
**Category:** Percona XtraBackup\
**Created:** [April 28, 2015, 2:47pm UTC](https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193 "2015-04-28T14:47:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhc](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jhc](https://forums.percona.com/u/jhc)\
**Post date:** [April 28, 2015, 2:47pm UTC](https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193/1 "2015-04-28T14:47:41Z")

</div>

My third galera mariadb node (out of 3) will not start and I get this:

150428 15:11:27 innobackupex: Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_file=/etc/my.cnf;mysql\_read\_default\_group=xtrabackup;mysql\_socket=/var/lib/mysql/mysql.sock’ as ‘root’ (using password: YES).  
150428 15:11:27 innobackupex: Connected to MySQL server  
150428 15:11:27 innobackupex: Executing a version check against the server…  
150428 15:11:27 innobackupex: Done.  
150428 15:11:27 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.  
At the end of a successful backup run innobackupex  
prints “completed OK!”.

innobackupex: Using server version 10.0.17-MariaDB-wsrep

innobackupex: Created backup directory /tmp  
tar: -: Cannot write: Broken pipe  
tar: Error is not recoverable: exiting now  
innobackupex: ‘tar chf -’ returned with exit code 2.  
innobackupex: got a fatal error with the following stacktrace: at /usr//bin/innobackupex line 4894.  
main::backup\_file\_via\_stream(‘/tmp’, ‘backup-my.cnf’) called at /usr//bin/innobackupex line 4943  
main::backup\_file(‘/tmp’, ‘backup-my.cnf’, ‘/tmp/backup-my.cnf’) called at /usr//bin/innobackupex line 4967  
main::write\_to\_backup\_file(‘/tmp/backup-my.cnf’, ‘# This MySQL options file was generated by innobackupex.\x{a}\x{a}# T…’) called at /usr//bin/innobackupex line 3774  
main::write\_backup\_config\_file(‘/tmp/backup-my.cnf’) called at /usr//bin/innobackupex line 3701  
main::init() called at /usr//bin/innobackupex line 1566  
innobackupex: Error: Failed to stream ‘/tmp/backup-my.cnf’: 2 at /usr//bin/innobackupex line 4894.

Any ideas? Thanks

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [April 28, 2015, 8:23pm UTC](https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193/2 "2015-04-28T20:23:10Z")

</div>

Try cleaning up mysql’s datadir on the third node and restart mysql. Can you paste my.cnf of the third node?

---

<div class="post-metadata">

**Author:** ![jhc](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jhc](https://forums.percona.com/u/jhc)\
**Post date:** [April 29, 2015, 9:17am UTC](https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193/3 "2015-04-29T09:17:38Z")

</div>

When you say cleanup the datadir, what does that mean? Sorry I am new to this. Here is my server.cnf:

[server]

# this is only for the mysqld standalone daemon

[mysqld]  
log\_error=/var/log/mysql/error.log

# 

# \* Galera-related settings

# 

[galera]

# Mandatory settings

wsrep\_provider=/usr/lib64/galera/libgalera\_smm.so  
wsrep\_cluster\_address=gcomm://10.10.61.146,10.10.61.147,10.10.61.148  
binlog\_format=row  
default\_storage\_engine=InnoDB  
innodb\_autoinc\_lock\_mode=2  
bind-address=0.0.0.0  
user=root

# 

# Optional setting

wsrep\_slave\_threads=1  
innodb\_flush\_log\_at\_trx\_commit=0  
wsrep\_provider\_options=“gcache.size=32G;gcache.page\_size=1G;”  
wsrep\_cluster\_name=‘example\_cluster’  
wsrep\_node\_address=‘10.10.61.148’  
wsrep\_node\_name=‘10.10.61.148’  
wsrep\_sst\_method=xtrabackup  
wsrep\_sst\_auth=root:password  
innodb\_log\_file\_size=100M

# this is only for embedded server

[embedded]

# This group is only read by MariaDB servers, not by MySQL.

# If you use the same .cnf file for MySQL and MariaDB,

# you can put MariaDB-only options here

[mariadb]

# This group is only read by MariaDB-10.0 servers.

# If you use the same .cnf file for MariaDB of different versions,

# use this group for options that older servers don’t understand

[mariadb-10.0]

Thanks

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [April 29, 2015, 10:04pm UTC](https://forums.percona.com/t/tar-cannot-write-broken-pipe-error/4193/4 "2015-04-29T22:04:08Z")

</div>

Move or delete everything inside /var/lib/mysql on node 3 (granting you use default MySQL datadir) then change

wsrep\_sst\_method=xtrabackup  
to  
wsrep\_sst\_method=xtrabackup-v2

Restart node 3.
