Clearcase agent side support on Windows

I'm trying to explore the agent side checkout support that is available in v6.0.  I can't seem to get an agent be recognized as ClearCase compatible.  The documentation on this new feature does not have any details.

In my case, I have the TC server running on Linux.  The agent that I'm trying to run is on Windows 2003. It's a service.

I turned on agent debugging and I see:

[2010-12-24 11:21:03,770]  DEBUG - uildServer.swabra.SwabraLogger - Couldn't read checkout directories states from D:\teamcity\agentdir\system\swabra\, no file present

[2010-12-24 11:21:03,770]  DEBUG - buildServer.vcs.clearcase.Util - Executing command: "C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool hostinfo" in .

[2010-12-24 11:21:03,817]  DEBUG - buildServer.vcs.clearcase.Util - Command stdout:

[2010-12-24 11:21:03,817]  DEBUG - buildServer.vcs.clearcase.Util - Command stderr:

[2010-12-24 11:21:03,817]   INFO - se.agent.ClearCaseAgentSupport - ClearCase agent checkout is disabled: : command: {"C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool hostinfo" in: "D:\teamcity\agent\bin\."}

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - User: dxbld

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - Path: //rdlserv/tools/nt/bin;C:\Program Files\IBM\RationalSDLC\ClearCase\bin\

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - cleartool.path: C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - CLEARTOOL_PATH: null

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - Error message: : command: {"C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool hostinfo" in: "D:\teamcity\agent\bin\."}

[2010-12-24 11:21:03,817]  DEBUG - se.agent.ClearCaseAgentSupport - : command: {"C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool hostinfo" in: "D:\teamcity\agent\bin\."}

If I run "cleartool hostinfo" on the agent machine, I see:

D:\teamcity\agent\lib>cleartool hostinfo
vm-ntdxbld9: ClearCase (Windows NT 5.2 (build 3790) Service Pack 2 Pentium)

The service is running as user progress\dxbld.  Clearcase is installed at c:\program files\ibm\rationalsdlc\clearcase.   In Windows Control panel, I have c:\pro....\clearcase\bin in PATH under System.  I also added it to path in user settings.

I have added system.cleartool.path to file.  I tried setting it in a number of different ways such as:
system.cleartool.path=C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool

also tried replacing forward slash with back slash.  Then escaping the back slash with another back slash.  I tried using " " (quotes).  In call cases, I can't get it to work.

Another observation I noticed about the agent is that it doesn't use the SYSTEM path. Only the User path.  It's my understanding that a SYSTEM path is available to all processes including those running as a service.  A user PATH consists of the SYSTEM path plus the user path entries.  From the logfile, it appears that the TC agent only has the user path, no system path entries.

Comment actions Permalink

Hi Bill,

Seems the issue is not path related. I've added more debug output into the plugin. Could you please replace original plugin with attached one(drop "<Your TeamCity Home>/webapps/ROOT/WEB-INF/plugins/clearcase" folder, copy attached zip into "plugins" folder and restart the server) and send us with log?


Comment actions Permalink

Hi Constantin,

I just upgraded to 6.0.1.  Will your debug version still work?

I will try doing the operation again to see if it's still an issue in 6.0.1. Thanks.

Comment actions Permalink

I still have the same issue with 6.0.1.  The agent doesn't seem to be able to run cleartool hostinfo correctly.  I've tried all sorts of different settings:

#system.cleartool.path=C:/Program Files/IBM/RationalSDLC/ClearCase/bin/cleartool.exe
#system.cleartool.path=C:\\Program Files\\IBM\\RationalSDLC\\ClearCase\\bin\\cleartool
#system.cleartool.path=C:\Program Files\IBM\RationalSDLC\ClearCase\bin\cleartool
#system.cleartool.path=C:\\Program Files\\IBM\\RationalSDLC\\ClearCase\\bin\\cleartool
#system.cleartool.path="C:\Program Files\IBM\RationalSDLC\ClearCase\bin\cleartool"
system.cleartool.path="C:\\Program Files\\IBM\\RationalSDLC\\ClearCase\\bin\\cleartool"

Have you folks tried this with an agent on Windows?  If so, what environment variables/properties have you set?

I was able to get past this error. I had to set PATH in Control Panel for the user dxbld (this is the user that is running the TC agent service) to have:

PATH=C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\common

What I don't understand is why I need to have this set in the user PATH settings when it's already set in PATH for System?  When you logon to a machine, your PATH is set to SYSTEM + USER path.  It seems that the TeamCity agent only uses the USER portion of PATH.

This makes machine agent setup more difficult because I need to manually add these two additional paths to the USER path when the ClearCase installation puts them in SYSTEM path.

So to recap, in the Control Panel | Environment Variables applet, I have

User variables for dxbld:

System variables:
Path=C:\Program Files\IBM\RationalSDLC\Clearquest\cqcli\bin;C:\STAF\bin;D:\TimesTen\tt70_32\bin;C:\PROGRA~1\MKSTOO~1\Bin;C:\PROGRA~1\MKSTOO~1\Bin\X11;C:\PROGRA~1\MKSTOO~1\Mksnt;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\common

In a dos command prompt, my path is set to
D:\teamcity\agent\bin>set path
Path=C:\Program Files\IBM\RationalSDLC\Clearquest\cqcli\bin;C:\STAF\bin;D:\Times
ram Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files\IBM\RationalSDLC\commo

Comment actions Permalink

Hi Bill,

Sorry for delay, we are still on the official holidays.
Unfortunately the debug output expansion is not in time for release so I've attached the latest version of plugin from the our 6.0.x branch.

I guess your issue is not path related as far you still get "ClearCase agent checkout is disabled:..." message. An agent must report another message when clearcase.exe(in windows) is not in the paths. I can suggest you drop any additional teamcity settings for agents' cleartool paths if the agent has already properly configured clearcase client and the "cleartool hostinfo" command can run under agent's account. Next, apply the latest plugin from the attachment and restart the agent in debug mode.


Comment actions Permalink

Hi Konstantin,

Hope you're enjoying the holidays and getting some relaxation.

At this point, I was able to get past the cleartool path issue.  It works when I set the two directories in the user path on Windows.  My question is why is the agent path consisting of only the user path?  Why is it not also using the system path?


Comment actions Permalink

Hi Bill,

Thanks for your wish.
I cannot provide an answer right now and will investigate the issue. Perhaps we must check several types of installation of ClearCase client for Windows under several users(local adminitrators, ordinary user and so on) more carefully. It will be useful to get the debug log if the system path is not set and "The agent is disabled..." appears (I mean the log of attached plugin's).

Thanks in advance,

I've created the issue also for the case


Please sign in to leave a comment.