rsync Exit Codes 5 and 30: Daemon and Timeout
rsync exit code 5 is an error starting the client/server protocol (often a daemon or auth issue); code 30 is a timeout waiting for data.
Codes 5 and 30 show up less often than 23 and 12, but knowing them saves time when a daemon-based or slow CI transfer fails.
What it does
Exit 5 ("error starting client-server protocol") means rsync could not establish the session, common with rsync daemon (rsync://) targets when the module is missing, the auth fails, or the daemon refuses the connection. Exit 30 ("timeout in data send/receive") means rsync waited longer than --timeout for data and gave up.
Exit code reference
| Code | Meaning |
|---|---|
| 5 | Error starting client-server protocol |
| 10 | Error in socket I/O |
| 23 | Partial transfer due to error |
| 30 | Timeout in data send/receive |
| 35 | Timeout waiting for daemon connection |
Common usage
# Daemon target (rsync://) that can throw code 5
rsync -av dist/ rsync://user@host/module/path/
# Set a generous timeout to avoid code 30 on slow links
rsync -av --timeout=300 dist/ user@host:/srv/In CI
For code 5 against a daemon, double-check the module name in rsyncd.conf and the auth secret; "@ERROR: auth failed on module X" or "@ERROR: Unknown module" pinpoints it. For code 30, raise --timeout and add SSH keepalives (ServerAliveInterval) so a momentarily idle link does not abort the job.
Common errors in CI
Code 5 often prints "@ERROR: auth failed on module ..." or "rsync error: error starting client-server protocol (code 5)". Code 30 prints "io timeout after N seconds -- exiting" then "rsync error: timeout in data send/receive (code 30)". Match the message to the cause rather than guessing.