So recently we updated 2 production servers and 1 development server for our websites. All are running Ubuntu 20.04. We also updated our build server that contains an installation of Jenkins. This one runs Ubuntu 18.04. The build server is only used internally and is not accessible from outside our own network.
In our build process we use RSYNC to copy over all the files to the correct place on the production/development server.
To clarify, I am no Linux expert so the things I state below and the troubleshooting I have done are all from google searches and a limited knowledge of how Linux works.
This is the rsync command we use:
rsync -rltDv --chmod=ug=rwX,o=rX -e ssh --exclude-from='exclude-list.txt' --delete --filter='protect wordpress/.htaccess' --filter='merge protect-list.txt' ./ jenkins@${WEB_SRV_ADDRESS}:/var/www/test
And this is the error we are getting:
ERROR: rejecting excluded file-list name: wp-content/plugins/[plugin name]
/[subfolder]/[subfolder]/[subfolder]/.gitkeep
rsync error: protocol incompatibility (code 2) at flist.c(912) [receiver=3.1.3]
The versions of rsync in use:
- prod & dev server (Ubuntu 20.04) > 3.1.3 protocol version 31 (latest)
- build server (Ubuntu 18.04) > 3.1.2 protocol version 31 (latest)
What I have tried so far and its results
(after every test I returned everything to its original state)
- Downgraded the build server version of rsync to 3.1.1
- Downgraded the prod & dev version of rsync to 3.1.2
- Returned Build server to backup before update
- Returned dev server to backup before update
- Solved error. But weirdly enough the versions of rsync were the same before and after the update. Which made me think and I verified that in the updated packages, rsync was not one of the things being updated
- Changed the .gitkeep file mentioned in the error message to a php file
- Tried removing the .gitkeep file mention in the error message
- Moves the error to the next folder that contains a .gitkeep file
The protocol error, as far as I have found online, is giving because rsync echoed an error message to the terminal and thus the terminal is not "clean".
I'm completely out of ideas after 2 days of searching.
Hope someone here recognizes the issue or has ideas for me.
[**EDIT - contents of exclude-list.txt ** ]
cache/*
/.git
/.gitkeep
/.gitignore
/.gitmodules
/node_modules
/composer.json
/composer.lock
/Jenkinsfile
/gulpfile.js
/package.json
/package-lock.json
/protect-list.txt
/vendor
/get-composer.sh
/exclude-list.txt
wordpress@tmp
api-v2@tmp
/vite.config.js
[**Update- Debug info added ** ]
[receiver] hiding directory folder1/folder2/folder3/folder4/folder5/folder6 because of pattern folder1/folder2/folder3/folder4/folder5/folder6/
[receiver] send_msg(3, 107)
[generator] send_msg(3, 107)
ERROR: rejecting excluded file-list name: folder1/folder2/folder3/folder4/folder5/folder6