cvsimport in cron
Hi All,
Apologies if this is a standard mistake, I'm not very experienced with cron. I'm trying to run cvsimport commands from within a cron job but it always returns:
cvs: Connection refused
Use of uninitialized value in scalar chomp at /usr/bin/git-cvsimport line 349.
Use of uninitialized value in substitution (s///) at /usr/bin/git-cvsimport line 350.
Expected Valid-requests from server, but got: <unknown>
I use ssh keys and have tested that they work by using scp within the script. The script goes as follows:
keychain /var/spool/gitosis/.ssh/id_rsa
. /var/spool/gitosis/.keychain/uname -n-sh
git-cvsimport -d :ext:barrym@cvs:/cvsroot -vio master CVSMODULE
It would also be nice if someone could tell me also how to log the output.
Thanks in advance,
Barry.
Signature · 2 lines
View this message in context: http://www.nabble.com/cvsimport-in-cron-tp17476529p17476529.html Sent from the git mailing list archive at Nabble.com.
Quoted 3 lines · barrymac
Apologies if this is a standard mistake, I'm not very experienced with cron. I'm trying to run cvsimport commands from within a cron job but it always returns:
I've done this plenty, so it's known to work. Not sure why it's failing in your case.
Quoted 2 lines
I use ssh keys and have tested that they work by using scp within the script. The script goes as follows:
That's a good start. Have you tried a cvs-over-ssh cvs operation from cron?
Quoted 1 line
It would also be nice if someone could tell me also how to log the output.
Just wrap the commandline in
( $cmd 2>&1) > /tmp/cvsimport.log
HTH, and tell us what the problem was - so the next one to bump into it find the answer in the list ;-)
cheers,
m
Signature · 5 lines
[email protected] [email protected] -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff
Thanks Martin,
Nice to know how to log the progress! Good tip to try normal cvs over ssh, which works fine.
I wish it was possible to get more verbose output from the git cvsimport command. The connection refused error seems to me to be misleading. I would expect at least some output from cvsps but it doesn't even get to the first step.
So if everything works at the command line, what significant things can be different in a cron job?
I also downgraded to the stable version according to gentoo, so I'm on using 1.5.3.7 now, same result. Unfortunately I might have to give up soon and ask developers to update their own repositories, as it's burning up time.
Will post of course if I find the solution.
Thanks,
Barry.
Quoted 34 lines · Martin Langhoff
Quoted 3 lines · barrymac
Apologies if this is a standard mistake, I'm not very experienced with cron. I'm trying to run cvsimport commands from within a cron job but it always returns:
I've done this plenty, so it's known to work. Not sure why it's failing in your case.
Quoted 2 lines
I use ssh keys and have tested that they work by using scp within the script. The script goes as follows:
That's a good start. Have you tried a cvs-over-ssh cvs operation from cron?
Quoted 1 line
It would also be nice if someone could tell me also how to log the output.
Just wrap the commandline in
( $cmd 2>&1) >
/tmp/cvsimport.logHTH, and tell us what the problem was - so the next one to bump into it find the answer in the list ;-)
cheers,
m
--
[email protected]
[email protected] -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
Signature · 2 lines
I must Create a System, or be enslaved by another Man's Wm. Blake 1757 - 1827
I've also tried the command like this:
git-cvsimport p --no-cvs-direct -vio master CVSMODULE
Apparently cvsps has it's own client implementation, so I thought I'd disable that in order to be more sure that it was working in the same way as the normal cvs over ssh update that works fine in cron.
Barry.
Quoted 67 lines · Barra Mac Mathúna
Thanks Martin,
Nice to know how to log the progress! Good tip to try normal cvs over ssh, which works fine.
I wish it was possible to get more verbose output from the git cvsimport command. The connection refused error seems to me to be misleading. I would expect at least some output from cvsps but it doesn't even get to the first step.
So if everything works at the command line, what significant things can be different in a cron job?
I also downgraded to the stable version according to gentoo, so I'm on using 1.5.3.7 now, same result. Unfortunately I might have to give up soon and ask developers to update their own repositories, as it's burning up time.
Will post of course if I find the solution.
Thanks,
Barry.Quoted 26 lines · Martin Langhoff
Quoted 3 lines · barrymac
Apologies if this is a standard mistake, I'm not very experienced with cron. I'm trying to run cvsimport commands from within a cron job but it always returns:
I've done this plenty, so it's known to work. Not sure why it's failing in your case.
Quoted 2 lines
I use ssh keys and have tested that they work by using scp within the script. The script goes as follows:
That's a good start. Have you tried a cvs-over-ssh cvs operation from cron?
Quoted 1 line
It would also be nice if someone could tell me also how to log the output.
Just wrap the commandline in
( $cmd 2>&1) >
/tmp/cvsimport.logHTH, and tell us what the problem was - so the next one to bump into it find the answer in the list ;-)
cheers,
Quoted 8 lines
m
--
[email protected]
[email protected] -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff--
I must Create a System, or be enslaved by another Man's Wm. Blake 1757 - 1827
Signature · 2 lines
I must Create a System, or be enslaved by another Man's Wm. Blake 1757 - 1827
Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:
Quoted 5 lines
Thanks Martin,
Nice to know how to log the progress! Good tip to try normal cvs over ssh, which works fine.
Quoted 7 lines
I wish it was possible to get more verbose output from the git cvsimport command. The connection refused error seems to me to be misleading. I would expect at least some output from cvsps but it doesn't even get to the first step.
So if everything works at the command line, what significant things can be different in a cron job?
The environment! Put "env" in your cron job and compare the output to "env" on the command line. cvs or cvsps may be in $PATH on the command line but not in cron, or $PERL5LIB might be different.
Cheers,
Michael
Quoted 14 lines · Michael J Gruber
Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:
Quoted 5 lines
Thanks Martin,
Nice to know how to log the progress! Good tip to try normal cvs over ssh, which works fine.
Quoted 7 lines
I wish it was possible to get more verbose output from the git cvsimport command. The connection refused error seems to me to be misleading. I would expect at least some output from cvsps but it doesn't even get to the first step.
So if everything works at the command line, what significant things can be different in a cron job?
Quoted 7 lines
The environment! Put "env" in your cron job and compare the output to "env" on the command line. cvs or cvsps may be in $PATH on the command line but not in cron, or $PERL5LIB might be different.
Cheers,
Michael
Great suggestion!
I am also having this problem. To debug, I inserted env as you suggested. (Doh, why didn't this occur to me weeks ago?). I compared the output of cron and login-shell runs.
So what is the critical env diff between cron run and login run?
The answer is: CVS_RSH=ssh
Be sure to export.
Thanks.
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Wow thanks so much!!
It's great to get such a quality response from the mailing list!
On to the next problem :-)
Quoted 42 lines · John J. Franey
Quoted 14 lines · Michael J Gruber
Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:
Quoted 5 lines
Thanks Martin,
Nice to know how to log the progress! Good tip to try normal cvs over ssh, which works fine.
Quoted 7 lines
I wish it was possible to get more verbose output from the git cvsimport command. The connection refused error seems to me to be misleading. I would expect at least some output from cvsps but it doesn't even get to the first step.
So if everything works at the command line, what significant things can be different in a cron job?
Quoted 7 lines
The environment! Put "env" in your cron job and compare the output to "env" on the command line. cvs or cvsps may be in $PATH on the command line but not in cron, or $PERL5LIB might be different.
Cheers,
MichaelGreat suggestion!
I am also having this problem. To debug, I inserted env as you suggested. (Doh, why didn't this occur to me weeks ago?). I compared the output of cron and login-shell runs.
So what is the critical env diff between cron run and login run?
The answer is: CVS_RSH=ssh
Be sure to export.
Thanks.
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
I must Create a System, or be enslaved by another Man's Wm. Blake 1757 - 1827
Quoted 3 lines · Michael J Gruber
The environment! Put "env" in your cron job and compare the output to "env" on the command line. cvs or cvsps may be in $PATH on the command line but not in cron, or $PERL5LIB might be different.
and perhaps $CVSROOT...
m
Signature · 5 lines
[email protected] [email protected] -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff