Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: rejecting excluded file-list name: /. #375

Closed
rdebay-scality opened this issue Sep 13, 2022 · 16 comments
Closed

ERROR: rejecting excluded file-list name: /. #375

rdebay-scality opened this issue Sep 13, 2022 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@rdebay-scality
Copy link

Hello,

I am running rsync on a CentOS 7 with latests version and the upgrade from rsync-3.1.2-10.el7.x86_64 to rsync-3.1.2-11.el7_9.x86_64. and I have a regression wit the error:

ERROR: rejecting excluded file-list name: /

Here are the details. I have a /mnt/test file with the content:

# cat /mnt/test 
etc/hosts

Before the upgrade:

# rpm -qa | grep rsync
rsync-3.1.2-10.el7.x86_64
# rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list

sent 41 bytes  received 12 bytes  106.00 bytes/sec
total size is 0  speedup is 0.00

After the upgrade to rsync-3.1.2-11.el7_9.x86_64:

# yum install -y -q rsync
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
# rpm -qa | grep rsync
rsync-3.1.2-11.el7_9.x86_64
# rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
ERROR: rejecting excluded file-list name: /.
rsync error: protocol incompatibility (code 2) at flist.c(907) [Receiver=3.1.2]

I also have the same error with version 3.2.6:

# /usr/local/bin/rsync --version
rsync  version 3.2.6  protocol version 31
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, symlinks, symtimes, hardlinks, hardlink-specials,
    hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
    xattrs, optional secluded-args, iconv, prealloc, stop-at, no crtimes
Optimizations:
    no SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
    xxh128 xxh3 xxh64 (xxhash) md5 md4 none
Compress list:
    zstd lz4 zlibx zlib none

# /usr/local/bin/rsync --relative -a -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
ERROR: rejecting excluded file-list name: /.
rsync error: protocol incompatibility (code 2) at flist.c(994) [Receiver=3.2.6]

Thank you for your help.

@WayneD
Copy link
Member

WayneD commented Sep 14, 2022

See commit 9507303.

@rdebay-scality
Copy link
Author

rdebay-scality commented Sep 14, 2022

Thank you @WayneD .

I reinstalled with this commit and it still fails:

# /usr/local/bin/rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
ERROR: rejecting excluded file-list name: /.
rsync error: protocol incompatibility (code 2) at flist.c(996) [Receiver=3.2.6-15-g95073031]

Same with the latest commit fromthe development branch:

# /usr/local/bin/rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
ERROR: rejecting excluded file-list name: /.
rsync error: requested action not supported (code 4) at flist.c(996) [Receiver=3.2.6-22-g8b1b81e0]

@WayneD
Copy link
Member

WayneD commented Sep 14, 2022

I missed that the exclude was a filesystem-root dot dir. This is now fixed in 71c2b5d. Thanks for testing!

@WayneD WayneD self-assigned this Sep 14, 2022
@WayneD WayneD added the bug Something isn't working label Sep 14, 2022
@rdebay-scality
Copy link
Author

Thank you @WayneD, I confirm It is fixed.

Tested on the latest commit of the branch (and so with your commit):

#  /usr/local/bin/rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
created directory /tmp/test
/./

sent 59 bytes  received 51 bytes  220.00 bytes/sec
total size is 0  speedup is 0.00
[root@99cce39bb03c rsync]# /usr/local/bin/rsync --version
rsync  version 3.2.6-26-g7a2dbf71  protocol version 31

Well done

@YaelMagrafta
Copy link

Hi,
I have the same issue.
How do I get this fix?
Do I have build rsync locally?

@WayneD
Copy link
Member

WayneD commented Sep 21, 2022

As mentioned in other bugs, the rsync website's download page has a whole topic on binaries. A few of the most popular targets are constantly created in the github actions CI tasks, and the binary tar files that are also mentioned have several others. You shouldn't have any issues with the current git-master builds. You can also grab the source and compile it, if you prefer (click on the INSTALL link for full details). And, as before, the --trust-sender option is there if you want to copy things w/o the extra checking (unless the package maintainer did something weird, in which case you should be able to use --old-args as well).

@samueloph
Copy link
Contributor

For Debian users: I've uploaded a few important fixes (including this one)[0] to Debian unstable as version 3.2.6-4, and it will reach testing in a few days.

[0] Commits ported were:
9507303
71c2b5d
464555e

@ramereth
Copy link

@WayneD any update for when you're shipping 3.2.7 with this fix?

@rdebay-scality
Copy link
Author

@WayneD any update on the release date ?

@MW-algo
Copy link

MW-algo commented Nov 17, 2022

Thank you @WayneD, I confirm It is fixed.

Tested on the latest commit of the branch (and so with your commit):

#  /usr/local/bin/rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
created directory /tmp/test
/./

sent 59 bytes  received 51 bytes  220.00 bytes/sec
total size is 0  speedup is 0.00
[root@99cce39bb03c rsync]# /usr/local/bin/rsync --version
rsync  version 3.2.6-26-g7a2dbf71  protocol version 31

Well done

@rdebay-scality ,
I am also working on Centos.
I took the src for 3.1.2_11 and tried to apply the commits 9507303
71c2b5d
to the code.
This doesn't work, the code in the Centos version in not the same.
Can you share how you applied the commits?
Thanks!

@pdostal
Copy link

pdostal commented Nov 21, 2022

I hit the same error on FreeBSD 13.1 running salsa.debian.org/mirror-team/archvsync with rsync-3.2.5.pkg but luckily I still had /var/cache/pkg/rsync-3.2.3_1.pkg which is not affected.

# tail -f mirrorsync/log/rsync-ftpsync.error.1
ERROR: rejecting excluded file-list name: project
rsync error: protocol incompatibility (code 2) at flist.c(1021) [Receiver=3.2.5]
rsync error: protocol incompatibility (code 2) at io.c(1642) [sender=3.1.3]

@WayneD WayneD closed this as completed Nov 23, 2022
@SomePersonSomeWhereInTheWorld

On Fedora 36

rsync-3.2.7-1.fc36.x86_64
rsnapshot-1.4.4-1.fc36.noarch

We're seeing these errors on excluding .mozilla/firefox:

ERROR: rejecting excluded file-list name: /path/to/.mozilla/firefox
rsync error: requested action not supported (code 4) at flist.c(996) [receiver=3.2.7]

ERROR: /usr/local/bin/rsync-no-vanished returned 4 while processing
root@server:/path/to/.mozilla/firefox/bf7lh8zw.default-1485365540935-1605456172499/places.sqlite

Different issue?

@WayneD
Copy link
Member

WayneD commented Dec 2, 2022

Sounds like a different issue. I just made a commit that disables the extra checking for a local transfer, so try out the latest version (if you can). If you're still having an issue, provide more details on how to reproduce it.

@feedanal
Copy link

feedanal commented Mar 7, 2023

Out of the blue one of our deploy pipelines began to fail with ERROR: rejecting excluded file-list name: followed by rsync error: protocol incompatibility (code 2) at flist.c(912) [Receiver=3.1.3] . As this is pretty high on google, I'll just leave here how to update rsync to fix this error:

sudo apt-add-repository ppa:savoury1/utilities
sudo apt-get update
sudo apt-get install rsync

Very bizarre error and error message.

@euoia
Copy link

euoia commented Mar 7, 2023

Also seeing this today on an Ubuntu 18.04 server running rsync version 3.1.2 protocol 31.

This seems related to the --filter "protect my-directory-to-preserve-on-remote" option.

unattended-upgrade ran this morning:

Start-Date: 2023-03-07  06:31:26
Commandline: /usr/bin/unattended-upgrade
Upgrade: rsync:amd64 (3.1.2-2.1ubuntu1.5, 3.1.2-2.1ubuntu1.6)
End-Date: 2023-03-07  06:31:28

I don't know how to fix this issue, but I was able to replace my --filter rule with an --exclude argument.

@WayneD
Copy link
Member

WayneD commented Mar 8, 2023

Try the latest version. You can build it from git or snag a binary for several popular systems in the Actions | build | Artifacts tar files. You can also use the --trust-sender option to work around any remaining issue, though you should open a bug report with the exact command args you're using in that case (if it's a report on the latest version). Reports on older versions should go to your OS provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants