Trying to rsync files into linode suddenly stopped working
We use Rsync to copy files in our ci to the linode machine. A few days ago the command stopped working
this is the command we are trying to run through github actions:
Run burnett01/rsync-deployments@4.1
with:
switches: -avrzP --exclude="/.git /src /node_modules /migrations /db_schema /scripts"
path: /
remote_path: /var/www/***-api
remote_host: ***
remote_port: ***
remote_user: ***
remote_key: ***
Identity added: (stdin) ((stdin))
Warning: Permanently added '***' (ECDSA) to the list of known hosts.
sending incremental file list
./
.env
679 100% 0.00kB/s 0:00:00
679 100% 0.00kB/s 0:00:00 (xfr#1, ir-chk=1031/1033)
.env.example
210 100% 205.08kB/s 0:00:00
210 100% 205.08kB/s 0:00:00 (xfr#2, ir-chk=1030/1033)
.eslintrc.js
700 70% 683.59kB/s 0:00:00
991 100% 967.77kB/s 0:00:00 (xfr#3, ir-chk=1029/1033)
.gitignore
446 100% 435.55kB/s 0:00:00
446 100% 435.55kB/s 0:00:00 (xfr#4, ir-chk=1028/1033)
.prettierignore
6 100% 5.86kB/s 0:00:00
6 100% 5.86kB/s 0:00:00 (xfr#5, ir-chk=1027/1033)
.prettierrc.js
164 100% 160.16kB/s 0:00:00
164 100% 160.16kB/s 0:00:00 (xfr#6, ir-chk=1026/1033)
README.md
700 43% 683.59kB/s 0:00:00
1,608 100% 1.53MB/s 0:00:00 (xfr#7, ir-chk=1025/1033)
codegen.yml
208 100% 203.12kB/s 0:00:00
208 100% 203.12kB/s 0:00:00 (xfr#8, ir-chk=1024/1033)
ecosystem.config.js
354 100% 345.70kB/s 0:00:00
354 100% 345.70kB/s 0:00:00 (xfr#9, ir-chk=1023/1033)
package.json
700 ***% 683.59kB/s 0:00:00
3,1*** 100% 2.98MB/s 0:00:00 (xfr#10, ir-chk=10***/1033)
tsconfig.json
309 100% 301.76kB/s 0:00:00
309 100% 301.76kB/s 0:00:00 (xfr#11, ir-chk=1021/1033)
yarn.lock
700 0% 683.59kB/s 0:00:00
344,770 100% 46.97MB/s 0:00:00 (xfr#12, ir-chk=1020/1033)
client_loop: send disconnect: Broken pipe
rsync: connection unexpectedly closed (3301 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(***6) [sender=3.1.3]
##[debug]Docker Action run completed with exit code 255
##[debug]Finishing: Deploy to Linode
The command fails after roughly 17min and with code 255. I have checked /var/log/auth.log but could not find any log explaining why this would fail.
I see this: Warning: Permanently added '***' (ECDSA) to the list of known hosts.
.
So I assume the ssh connection is successful? How can I debug this?
EDIT
After more logs I see the process exit on code 12
[generator] make_file(node_modules/readable-stream/node_modules/isarray,*,2)
[generator] pushing local filters for /var/www/***-api/node_modules/readable-stream/node_modules/isarray/
[generator] make_file(node_modules/readable-stream/node_modules/isarray/index.js,*,2)
[generator] make_file(node_modules/readable-stream/node_modules/isarray/README.md,*,2)
[generator] make_file(node_modules/readable-stream/node_modules/isarray/package.json,*,2)
[generator] make_file(node_modules/readable-stream/node_modules/isarray/build,*,2)
[generator] make_file(node_modules/readable-stream/node_modules/isarray/component.json,*,2)
[sender] _exit_cleanup(code=12, file=io.c, line=***6): about to call exit(255)
client_loop: send disconnect: Broken pipe
rsync: connection unexpectedly closed (2097143 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(***6) [sender=3.1.3]
2 Replies
I did a Google search for "rsync error 255" and found this post: ssh - Rsync creates error message unexplained error (code 255) at io.c(837) - Ask Ubuntu. In it, it mentions the 255 likely isn't an rsync error, but more an SSH related error. This, coupled with the interval that you keep seeing the connection drops, leads me to think this can be solved by changing the connection settings in your SSH configurations. There's another Community Questions post that outlines these steps:
How do I prevent my SSH connection from dropping? | Linode Questions
@watrick Thanks for the response.
I tried but does not work. The error puzzled me. It works locally on my machine but hangs on the CI.
Rsync is able to delete files but hangs after sending incremental file list
without copying the files