java.io.IOException: Cannot run program "accurev" (in directory "/opt/hudson/home/jobs/<streamname>/workspace"): java.io.IOException: error=2, No such file or directoryThe whole story ...
Started by user adminSo ... I figured the PATH wasn't right and did a test.
Purging workspace...
Workspace purged.
Authenticating with Accurev server...
[workspace] $ accurev login -H 10.62.120.248:5050 <user> ""
java.io.IOException: Cannot run program "accurev" (in directory "/opt/hudson/home/jobs/<streamname>/workspace"): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(Unknown Source)
...
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 15 more
Finished: FAILURE
AccuRev 4.7.1 (11/21/2008) Enterprise EditionThat means AccuRev can run in the script.
Copyright (c) 1995-2008 AccuRev Inc. All rights reserved
type 'accurev help' for help.
Authenticating with Accurev server...But if I copy that line, SSH into the box and run the same exact command, with my user and "" for the password, it authenticates me just fine. (If I use some other password, like "x", it fails to authenticate and gives that same message. If I don't put the two quotes on the end, it asks me for my password and succeeds when I hit return.)
[workspace] $ accurev login -H 10.62.120.28:5050 myuser ""
FATAL: Authentication failed: Failed authentication. Please re-try the 'login' command.
The short story ...
I can't get AccuRev to actually run correctly in a Jenkins build. The error line in the console output isjava.io.IOException: Cannot run program "accurev" (in directory "/opt/hudson/home/jobs/<streamname>/workspace"): java.io.IOException: error=2, No such file or directoryThe whole story ...
I set up a new Jenkins instance running inside tomcat and installed the AccuRev plugin. Jenkins 1.397. Plugin 0.6.11. Its on a new RedHat 5.4 64-bit VM under ESX. Access is via SSH to the machine. I configured AccuRev in the Jenkins Master config as described in the plugin notes. There are no other plugins that I installed. A few came with the Jenkins .war file.
Tomcat runs under the 'tomcat' user and starts from a script in /etc/init.d at boot time.
I installed AccuRev 4.7.1 (which matches the server) by downloading the Linuxx86 version from accurev.com and installing the client only from the console. The tomcat user's home folder has a 'bin' folder with links to the accurev executables.
As the 1st job to be put on this new machine, I created a new maven build and set it to do "clean" using the pom.xml in the base folder of the workspace. I set it to use AccuRev and filled in the depot and stream. I didn't
When I run the build I get:
Started by user admin
Purging workspace...
Workspace purged.
Authenticating with Accurev server...
[workspace] $ accurev login -H 10.62.120.28:5050 <user> ""
It's possible that the quotes could be getting passed into the CLI
during the build, as opposed to being expanded by the shell when
testing directly. That doesn't seem right though.
I'm trying to replicate and test your scenario now. Will follow up.
-Scott
In the interim, I don't know of a good solution other than to use an
account that has a password.
-Scott