SUSE Support

Here When You Need Us

rsync - protocol version mismatch -- is your shell clean

This document (000021212) is provided subject to the disclaimer at the end of this document.

Environment

  • SUSE Linux Enterprise Server 15 SP4
  • SUSE Linux Enterprise Server 15 SP4 for SAP

Situation

User is trying to copy a file or directory from source server to target server through the rsync utility, encountered with the error:

 protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(600) [sender=3.2.3]


Rsync package versions are different in source & target server, however protocol versions are same. 

Resolution

  To diagnose the problem, run the below command.                                                                                                         
 ssh user@remoteip /bin/true > out.dat

Then look at out.dat file.If everything is working correctly then out.dat should be a zero length file. If you are getting the above error from rsync then you will probably, find that out.dat contains some text or data. 

          
 # cat out.dat
    <sometext> 

Check for all the hidden files in the user /home dir                                                                                                          
# find /home -type f -name ".*" -print
Alternative to above, use the below command.            
 # find /home -type f | xargs grep "sometext"
or
# grep -Ril "sometext" /home


  CD(change directory) to the user home directory & use the below command                                                                         
  # cat /home/<user>/.bashrc file.  

 If you see any "ECHO" statement written in the file .bashrc, comment(#) the line.

Cause

This is due to startup scripts .bashc or .bash_profile on remote shell facility producing unwanted garbage, which confuses rsync.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021212
  • Creation Date: 25-Sep-2023
  • Modified Date:25-Sep-2023
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.