1

Rsync gives me this strange error when I am trying to sync. I think the error started after upgrading to Ubuntu 14.04.

root@****:~# rsync -avvv --exclude-from '/root/rsync/exclude_nas' -e "ssh -i /root/rsync/rsync-key -p 369" /srv/nas/home/ martin@*******:/backup/martin/nas/
opening connection using: ssh -i /root/rsync/rsync-key -p 369 -l martin ****** rsync --server -******* . /backup/martin/nas/  (13 args)
/usr/local/bin/rsync: Undefined symbol "locale_charset"
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]
[sender] _exit_cleanup(code=12, file=io.c, line=226): about to call exit(12)
3
  • 1
    What is if you remove the verbose parameter? Normally the verbose parameter slow down the sync speed. Apr 21, 2014 at 18:56
  • I added it just to show debug output.
    – Sun_Blood
    Apr 21, 2014 at 19:25
  • looks like this is a home-brewed version of rsync, could you please add the output of rsync --version to your question?
    – dawud
    Apr 21, 2014 at 20:33

4 Answers 4

2

Solved the problem. Apparently the receiving server that was a FreeBSD server had a faulty rsync 3.0.9 version installed. After upgrading rsync to 3.1.0 it worked.

Just as mention in previous post it was probably a fault iconv compilation.

0

You are missing this capability, probably because you compiled without iconv support:

$ rsync --version
rsync  version 3.1.0  protocol version 31
Copyright (C) 1996-2013 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

You can test the presence of such capability by using the --iconv flag:

$ touch leão

$ rsync -av --iconv=UTF-8,ISO-8859-1 leão .
sending incremental file list
leão

sent 112 bytes  received 35 bytes  294.00 bytes/sec
total size is 0  speedup is 0.00

$ ls
leão  le?o
0

In our case we were using a locally compiled rsync and the library path wasn't correctly set:

$ /usr/local/bin/rsync -av source dest
ld.so.1: rsync: fatal: relocation error: file /usr/local/bin/rsync: symbol locale_charset: referenced symbol not found

The temporary workaround was to set $LD_LIBRARY_PATH:

$ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/rsync -av source dest
sending incremental file list
...

The correct fix would be to add /usr/local/lib to the system path using ldconfig, but this was a Solaris box. I think the equivalent on Solaris is something like crle but not being sure we just stuck with $LD_LIBRARY_PATH.

0

I also experienced this undefined symbol. My solution was to upgrade to libiconv 1.17 from 1.16. Even though libiconv.so.2.6.1 was at the same revision level, the sizes and available functions are different (on FreeBSD 12.3). Calling iconv from rsync provided the clue.Thx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .