Forum Moderators: bakedjake
Now again im getting a new error:
" Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far)
[receiver] rsync error: error in rsync protocol data stream (code 12)
at io.c(359)"
can anyone help me out here? whats wrong?
y can u i transfer the file manually using rsync and ssh but not with cron?
any help is always appreciated
Your best bet would be to post the contents of your script to see what's going on with it. Additionally, to narrow the problem down, I'd suggest scheduling through cron a simple ssh test, to see if it's SSH that has a problem, or rsync, or otherwise.
schedule a script that runs this command:
ssh -i /home/thisuser/cron/thishost-rsync-key user@remotehost.com touch /tmp/ssh_test.txt
export PATH=$PATH:/usr/local/bin
if [! -f /tmp/syncingcms ]
then
touch /tmp/syncingcms
/usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*' thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
rm /tmp/syncingcms
fi
And this is the crontab file
MAILTO="thecoolone19@hotmail.com"
SHELL=/bin/bash
* * * * * /var/cmsfile
On executing my script for the first time i get this:
bash -x /var/cmsfile
+ export PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
+ PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
+ '[' '!' -f /tmp/syncingcms ']'
+ touch /tmp/syncingcms
+ /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*' thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
thecoolone@vtu.org password: "I type in the pwd"
receiving file list ... done
rsync: recv_generator: mkdir "/var/www/testing/CVS" failed: Permission denied (1 3)
rsync: stat "/var/www/testing/CVS" failed: No such file or directory (2)
rsync: recv_generator: mkdir "/var/www/testing/maths" failed: Permission denied (13)
rsync: stat "/var/www/testing/maths" failed: No such file or directory (2)
rsync: recv_generator: mkdir "/var/www/testing/maths/images" failed: No such fi le or directory (2)
And this goes on for all the files. And after its done i checked the testing directory and nothing is backed up
And another bizzare thing is when i execute $bash -x /var/cmsfile for the 2nd time again i get this msg:
+ export PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
+ PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
+ '[' '!' -f /tmp/syncingcms ']'
Only when i remove the /tmp/syncingcms file am i able to execute the script again.
can someone tell me whats happening in here?
thanx in advance
BUT when i try to execute the same script using cron i still get the same error
"Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(359)
"