Clearcase error - Unable to collect changes

Hi,

I'm trying to setup CI for a snapshot view on clearcase. There are few files (security) that developers cannot load, so generally while creating/updating view, clearcase will alwasy give an error but we ignore them. But TeamCity builds are failng with error message "Unable to collect changes". Since these files are kind of discributed it's difficult to control it through load rules.

Here is the sample error log:

java.util.concurrent.ExecutionException:  jetbrains.buildServer.vcs.VcsException: Problem collecting changes for  'CC Test :: OneTarget' : Error collecting changes for VCS root  'Clearcase'

jetbrains.buildServer.vcs.VcsException: cleartool: Error: Unable to load "licnese.exe":
Permission denied.
cleartool: Error: Additional information may be available in the view log on host "PIT8X64SCHINNAR".

cleartool: Error: Unable to load "encrypt.exe".
cleartool: Error: Unable to load "secure".
cleartool: Error: Unable to load "license.h": Permission denied.

.....

Are there any work arounds to overcome this problem?

Thanks
Saran

0
23 comments
Avatar
Permanently deleted user

Hi,

Do I understand correctly that you want to ignore such errors and load all the other files?

0
Avatar
Permanently deleted user

Yes Maxin, and also TeamCity should not report errors while looking for changes in the source code.

Thanks
Saran

0
Avatar
Permanently deleted user

Hello,

Sorry for the delay in replying.

Unfortunately, TeamCity has no possibility to ignore checkout errors. In most other cases such error means that checked out sources can be corrupted so TeamCity cannot ignore the error and start the build.

The possible workaround is trying to use the agent checkout instead of the server one for your ClearCase VCS roots. Agent checkout is similar to ClearCase "update" so maybe it will help. But agent checkout for ClearCase is not available in TeamCity 5.x, so you should install TeamCity 6.0 EAP in this case.

It is possible to create an option for switching on/off ignoring the checkout errors, but we did not plan this feature for the nearest future because it is not needed in the most cases. Will you use TeamCity without this option?

You can also create a feature request in our tracker for creating such option and vote for it.

0
Avatar
Permanently deleted user

Hi Maxim,


Thanks for the reply.

After installing the new version of TeamCity you recommended, I'm unable to use the agent that's installed on the server.

I noticed that the following has been added to agent requirement:

Build runners requirements (1)

Build runners impose additional agent requirements:

Parameter Name Condition
DotNetFramework3.5_x86

exists




Though in agent parameter I can see that this version of DotNetFrameWork is available, the agent is showing up as "Incompatible".


DotNetFramework3.5_x86  3.5.30729.01 DotNetFramework3.5_x86_Path  c:\WINDOWS\Microsoft.NET\Framework\v3.5

Can you please suggest a way to fix this?

Thanks
Saran
0

Please check agent contains DotNetFramework* configuration parameters.

Please, attach agent configuration parameters, build agent log files and project.xml file of the project that contained the build configuration.

0
Avatar
Permanently deleted user

Attached all the files, please let me know if you need any other details.

-Saran



Attachment(s):
project-config.xml
AgentParameter.bmp
teamcity_agent_logs_2010-10-20.zip
0
Avatar
Permanently deleted user

Hi,

Here is the agent requirements details, hope this helps too.

Agent Requirements          

This page lists all requirements that build agents should meet to run your builds.

Parameter Name Condition
system.os.name contains       Windows edit delete
Add new requirement (Frequently used requirements)

Build runners requirements (1)

Build runners impose additional agent requirements:

Parameter Name Condition
DotNetFramework3.5_x86 exists       


Agents compatibility

In this section you can see which agents are compatible with requirements and which are not.

There are 2 agents registered.

List of compatible agents Compatible agents (0) List of incompatible agents Incompatible agents (2)
None pit0vw76schinna
Missing VCS plugins on agent:
  • ClearCase
PIT8X64SCHINNAR (not allowed to run this configuration)
Missing VCS plugins on agent:
  • ClearCase
0
Avatar
Permanently deleted user

Can you please run the command "cleartool hostinfo" on your agent and provide me its output? Does this command fail?

0
Avatar
Permanently deleted user

Hi,

Here is the output:

C:\Documents and Settings\saran>cleartool hostinfo
PIT8X64SCHINNAR: ClearCase 7.1.1.0 (Windows NT 5.2 (build 3790) Service Pack 2 Pentium)



This support request was made on October 14 but so far we haven't made much progress. Can you please look in to this asap?

Thanks
Saran
0
Avatar
Permanently deleted user

Hello,

The feature you requested is not supported by TeamCity. We have no plans for supporting it because it is a very specific case. In most other cases TeamCity cannot ignore such errors.

I see the several ways for you to solve this problem:

1. Configure ClearCase load rules/TeamCity checkout rules to not to load such files.

2. Choose "Do not checkout files automatically" option on the build configuration VCS settings page and do it manually in your build script.

3. Check out our ClearCase plugin sources, modify it and build your own ClearCase plugin for your build server.

0
Avatar
Permanently deleted user

Hello,

Seems, it is a bug in our ClearCase agent-side checkout. I created an issue in our tracker, you can vote for it.

0
Avatar
Permanently deleted user

Hi Saran,

Could you please check an account your TeamCity agent's running? Looks like the account cannot access to cleartool.exe due to security or other issue.

Thanks in advance,
Konstantin

0
Avatar
Permanently deleted user

I checked the account and it does run a valid user which have access to cleartool.exe.

-Saran

0
Avatar
Permanently deleted user

Hi Saran,

I've prepared clearcase plugin that provides more debug information on agent startup. Here is in attachment. Just unpack into <Your TeamCity Installation Root>\webapps\ROOT\WEB-INF\plugins\. Could you please turn on debug mode according to http://confluence.jetbrains.net/display/TCD6/Reporting+Issues#ReportingIssues-LoggingEvents and provide us with new agents logs? It help us to detect an issue source.

Thanks in advance,
Konstantin



Attachment(s):
clearcase-1509-more-agent-logging.zip
0
Avatar
Permanently deleted user

Hi Konstantin,

Agent log did not get updated ( I checked the file in C:\TeamCity\buildAgent\logs).

Here is the log from the server:

[2010-10-27 13:19:12,887]   INFO -   jetbrains.buildServer.SERVER - Agent PIT8X64SCHINNAR {id=1, host=127.0.0.1}@cf1ed6 has been unregistered. Reason: Agent has unregistered
[2010-10-27 13:19:39,799]   INFO - mpl.agent.AgentPluginPublisher - Agent plugin 'c:\TeamCity\webapps\ROOT\update\plugins\clearcase-agent.zip' was updated from 'C:\TeamCity\webapps\ROOT\WEB-INF\plugins\clearcase\agent\clearcase-agent.zip'
[2010-10-27 13:19:44,565]   INFO - e.impl.agent.PluginsLookupTask - Build agent distribution has changed on disk. Initiate upgrade.
[2010-10-27 13:19:59,537]   INFO - e.impl.agent.PluginsLookupTask - Build agent plugins signature is set to e6cd329c
[2010-10-27 13:19:59,756]   INFO - t.AgentDistributionMonitorImpl - Build agent distribution version is set to 15509
[2010-10-27 13:20:27,247]   INFO -   jetbrains.buildServer.SERVER - Upgrade of agent PIT8X64SCHINNAR has been started
[2010-10-27 13:21:52,625]   WARN -   jetbrains.buildServer.SERVER - Debug mode enabled
[2010-10-27 13:22:03,471]  DEBUG -    jetbrains.buildServer.AGENT - Agent registration request from: 127.0.0.1, AgentDetails{Name='PIT8X64SCHINNAR', AgentId=null, BuildId=null, AgentAddress='null', AlternativeAddresses=[127.0.0.1, 10.39.2.88, 192.168.66.1, 192.168.87.1], Port=9080, Version='15509', PluginsVersion='e6cd329c', AvailableRunners=[Ant, dotnet-dupfinder, Duplicator, FxCop, gradle-runner, Inspection, Ipr, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, VS.Solution], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='e31c4a437292a9074f5a222e0611e41a'}, address will be added to the list of alternative agent addresses
[2010-10-27 13:22:03,533]  DEBUG -    jetbrains.buildServer.AGENT - Trying to match agent PIT8X64SCHINNAR {host=127.0.0.1} by authorization token (e31c4a437292a9074f5a222e0611e41a) or name (PIT8X64SCHINNAR)...
[2010-10-27 13:22:03,533]  DEBUG -    jetbrains.buildServer.AGENT - Agent PIT8X64SCHINNAR {host=127.0.0.1} was matched by authorization token e31c4a437292a9074f5a222e0611e41a
[2010-10-27 13:22:03,596]   INFO -   jetbrains.buildServer.SERVER - Agent PIT8X64SCHINNAR has been registered with id 1, not running a build
[2010-10-27 13:22:05,518]  DEBUG -   jetbrains.buildServer.SERVER - SELECT action_history.OBJECT_ID, action_history.ACTION, comments.ID, comments.AUTHOR_ID, action_history.ADDITIONAL_DATA FROM action_history INNER JOIN comments ON action_history.COMMENT_ID = comments.ID  WHERE (action_history.OBJECT_ID=?) ORDER BY action_history.COMMENT_ID DESC
[2010-10-27 13:22:12,098]  DEBUG -   jetbrains.buildServer.SERVER - SELECT action_history.OBJECT_ID, action_history.ACTION, comments.ID, comments.AUTHOR_ID, action_history.ADDITIONAL_DATA FROM action_history INNER JOIN comments ON action_history.COMMENT_ID = comments.ID  WHERE (action_history.OBJECT_ID=?) ORDER BY action_history.COMMENT_ID DESC
[2010-10-27 13:22:27,523]  DEBUG -   jetbrains.buildServer.SERVER - New build promotion created: BuildPromotion{myId=16, myBuildTypeId='bt2', myModificationId=null, myRevisions=null, myAssociatedBuildId=-1}
[2010-10-27 13:22:36,869]   INFO -   jetbrains.buildServer.SERVER - Agent PIT8X64SCHINNAR {id=1, host=127.0.0.1}@10e02d6 has been unregistered. Reason: Agent has unregistered
[2010-10-27 13:23:06,938]  DEBUG -    jetbrains.buildServer.AGENT - Agent registration request from: 127.0.0.1, AgentDetails{Name='PIT8X64SCHINNAR', AgentId=null, BuildId=null, AgentAddress='null', AlternativeAddresses=[127.0.0.1, 10.39.2.88, 192.168.66.1, 192.168.87.1], Port=9080, Version='15509', PluginsVersion='e6cd329c', AvailableRunners=[Ant, dotnet-dupfinder, Duplicator, FxCop, gradle-runner, Inspection, Ipr, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, VS.Solution], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='e31c4a437292a9074f5a222e0611e41a'}, address will be added to the list of alternative agent addresses
[2010-10-27 13:23:06,953]  DEBUG -    jetbrains.buildServer.AGENT - Trying to match agent PIT8X64SCHINNAR {host=127.0.0.1} by authorization token (e31c4a437292a9074f5a222e0611e41a) or name (PIT8X64SCHINNAR)...
[2010-10-27 13:23:06,953]  DEBUG -    jetbrains.buildServer.AGENT - Agent PIT8X64SCHINNAR {host=127.0.0.1} was matched by authorization token e31c4a437292a9074f5a222e0611e41a
[2010-10-27 13:23:07,000]   INFO -   jetbrains.buildServer.SERVER - Agent PIT8X64SCHINNAR has been registered with id 1, not running a build

Thanks
Saran

0
Avatar
Permanently deleted user

Hi Saran,

I wonder why agent's logs are not updated. I can see "[2010-10-27 13:19:39,799]   INFO - mpl.agent.AgentPluginPublisher -  Agent plugin  'c:\TeamCity\webapps\ROOT\update\plugins\clearcase-agent.zip' was  updated from  'C:\TeamCity\webapps\ROOT\WEB-INF\plugins\clearcase\agent\clearcase-agent.zip" entry in the server's log and the agent must restart at least in this case that firing new log entries appearing...Do you mean there is no new lof files in agent log directory? It's true and new debug info's writing into old ones.

TIA,
Konstantin

0
Avatar
Permanently deleted user

Hi Maxim,

As I had mentioned earlier, I cannot try option 1. I tried option 2 but it still failed with the same error.

It fails while collecting changes:

Error collecting changes for VCS root 'clearcase: C:\views\saran_view2\ansoft'
jetbrains.buildServer.vcs.VcsException: cleartool: Warning: Unable to  resolve symlink "CodeDV.cd959ca968f411df9f45001aa0ae66cc". The symlink  target will not be loaded.
cleartool: Error: Unable to resolve VOB symlink "nextgen\lost+found


-Saran

0
Avatar
Permanently deleted user

Hi Saran,

We have prepared another fix perhaps solves your problem. But it will be nice to check the ClearCase repository for error because broken link really reports you for some corruption. Let us know if something wrong.

Thanks in advance,
Konstantin



Attachment(s):
clearcase-permissions-fix-6.0.15655.zip
0
Avatar
Permanently deleted user

Hi Konstantin,

Though I haven't tested our build scripts yet, test project/scripts seems to be running fine. I will give you more feedback within a day or two.

Thanks
Saran

0
Avatar
Permanently deleted user

Hi Saran,

Could you please check your arent on ClearCase compatibility also? Is it listed as "compatible" now?

Thanks in advance,
Konstantin

0
Avatar
Permanently deleted user

Hi Konstantin,

Yes, now TeamCity shows agent as compatible. I'm able to run 32 bit builds using TeamCity, currently I'm working on setting up 64 bit builds.

Thanks
Saran

0
Avatar
Permanently deleted user

Hi,

The patch does work fine in all test cases.

Thanks very much
Saran

0
Avatar
Permanently deleted user

Hi Saran,

Thanks for your notification

Best regards,
Konstantin

0

Please sign in to leave a comment.