views:

104

answers:

2

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.

A: 

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
Peter Schuetze
This does not seem to be the problem, as inspecting the env command inside and outside of Hudson show the same environment (sans Hudson specific stuff running from a terminal).
nimbus57
My setup is Windows master with AIX clients which are started through SSH. If I use putty and login with the Hudson user I can run DB2 commands without any problems. Since I run the initialization for DB2 with my profile script. I have a job that is tied to the AIX slave that runs a shell script connecting to the database. I can not run any database command until I execute the profile script manually.
Peter Schuetze
A: 

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.

nimbus57