开发者

rsync failing in Hudson

开发者 https://www.devze.com 2023-01-11 07:53 出处:网络
I am running this from a Hudson job: rsync -auz --include=\"*/\" --include=\"/builds/\" --exclude=\'*\'/var/lib/hudson/jobs/ backup@backup:/var/data/backup/build/`hostname`

I am running this from a Hudson job:

rsync -auz --include="*/" --include="/builds/" --exclude='*'  /var/lib/hudson/jobs/ backup@backup:/var/data/backup/build/`hostname`

and getting this error:

rsync: Failed to 开发者_开发知识库exec ssh: Permission denied (13)

rsync error: error in IPC code (code 14) at pipe.c(83) [sender=2.6.8]

rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32)

rsync error: error in IPC code (code 14) at io.c(1119) [sender=2.6.8]

I can run the same rsync command from a terminal as my Hudson user, and it also works when run through the Hudson user's crontab. It seems like everything is set up correctly, but I'm missing something in the translation to Hudson land.


Yes, Run the profile script manually before you run rsync. My first few lines of every skripts that depends on environment variables are usually.

#!/usr/bin/ksh 

. ${HOME}/.profile


I solved my problem by creating a new slave node on the same machine as the master. I create the slave through ssh, and the slave is run as the same user I am connecting to on my other machines.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号