AccuRev doesn't seem to run at all

721 views
Skip to first unread message

Lee Meador

unread,
Feb 25, 2011, 6:51:20 PM2/25/11
to jenkins...@googlegroups.com
The short story ...

I can't get AccuRev to actually run correctly in a Jenkins build. The error line in the console output is
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
The 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.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

So ... I figured the PATH wasn't right and did a test.

I set up another build--this time, a general build and only gave it a script to run. The script looked like this:

date > work
set >> work
accurev >>work
df -h >>work
du -csh /opt/hudson/home/jobs/* >>work
echo Current maximum files allowed: `ulimit -n` >>work
echo Current number of files open in Hudson: `/usr/sbin/lsof | grep "tomcat" | wc -l` >>work
cat work


Sure enough, the "set" command's list didn't show tomcat's ~/bin folder in the path.

Then I went into the Jenkins master config and set an environment variable PATH with a value including all the usual places and the tomcat user ~/bin.

The generic script build worked this time and the "accurev" line showed this:
AccuRev 4.7.1 (11/21/2008) Enterprise Edition
Copyright (c) 1995-2008 AccuRev Inc. All rights reserved
type 'accurev help' for help.
That means AccuRev can run in the script.

But then I try the 1st build again and when it goes to load the files from AccuRev in the maven build, it still has the same error as shown above--"cannot run program ..."

I have old Hudson/Jenkins user list emails I have saved for a couple of years. I searched for "accurev" and read all of them. There was a guy who got the same error but no resolution showed up in the list emails.

I did notice in those emails that sometimes the console output doesn't show "accurev -H ..." as the command issued but shows a full path like "c:\accurev\home\bin\accurev.exe -H ..." for Windows. No such examples existed for Linux. I don't know why it would show that path as there is no place to enter the location of the AccuRev executables.

Any help you can give me would be appreciated.

Thanks

-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Michael Kent

unread,
Feb 25, 2011, 7:50:07 PM2/25/11
to jenkins...@googlegroups.com
Is accurev in a directory literally named "/opt/hudson/home/jobs/<streamname>/workspace", because that appears to be where it's being looked for.

Lee Meador

unread,
Feb 25, 2011, 7:55:18 PM2/25/11
to jenkins...@googlegroups.com
So ... I found some part of my solution and I found another problem.

I went back in and got the tomcat user's ~/bin folder on the path inside the process running tomcat (and jenkins) and accurev seems to run in the maven build. Evidently there is something different about the way the path is handled between the maven build and the general type build. In the maven build, you have to have the path to AccuRev set beforehand and can't do it in the jenkins master config as an environment variable. I don't know if that's a bug or not.

It runs. But it fails to authenticate. Here is the output:
Authenticating with Accurev server...
[workspace] $ accurev login -H 10.62.120.28:5050 myuser ""
FATAL: Authentication failed: Failed authentication. Please re-try the 'login' command.
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.)

I'm wondering if there is a problem when the password is blank. Or do we say there is no password. Whatever.

Has anyone used AccuRev plugin with a blank password?

-- Lee

On Fri, Feb 25, 2011 at 5:51 PM, Lee Meador <l...@leemeador.com> wrote:
The short story ...

I can't get AccuRev to actually run correctly in a Jenkins build. The error line in the console output is
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
The 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> ""



--

Lee Meador

unread,
Feb 25, 2011, 7:58:21 PM2/25/11
to jenkins...@googlegroups.com
No. It is not. That is the Jenkins workspace for this job. (Well ... I didn't want to tell the whole world the name of my stream.)

Posted simultaneously with your posting, I explain that the path has to be set before tomcat runs with jenkins inside it. That gets accurev to run but there is another problem I explain there.

Thanks for replying

-- Lee

Scott Tatum

unread,
Feb 25, 2011, 10:27:43 PM2/25/11
to jenkins...@googlegroups.com
Unfortunately I run jenkins stand-alone, with freestyle project type
for maven builds, and with an accurev account that has a password. :)

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

Scott Tatum

unread,
Feb 26, 2011, 12:15:40 AM2/26/11
to jenkins...@googlegroups.com
I confirmed on a linux box that if I try to use an accurev account
that has no password, I get the same error you get. If I switch to an
account with a password, it works. Maybe it is related to the whole
shell expansion / number of arguments thing. I'm not sure what the
solution is yet, but I'll open a ticket in the Jenkins Jira and work
towards one.

In the interim, I don't know of a good solution other than to use an


account that has a password.

-Scott

Lee Meador

unread,
Feb 28, 2011, 3:00:08 PM2/28/11
to jenkins...@googlegroups.com
Scott,

Thanks for figuring that out and, well, working on the plugin at all. I changed to a new AccuRev account with a password and it is working.

-- Lee
--
Reply all
Reply to author
Forward
0 new messages