It's all about the answers!

Ask a question

Error when executing Jenkins build with anttask


marco Kaiser (2311313) | asked Sep 05 '13, 11:01 a.m.
edited Sep 06 '13, 4:12 a.m.
Hello,

we are getting the following breakup error during our build with Jenkins

Environment:
jazz server:  4.0.1
Jenkins: 1.509.2
We're using Ant-tasks 4.0.1 (already updated from 3.0.1)

Step to reproduce:

  • Set up a normal Team Area with Java project with RTC
  • Create a workspace and a stream for this project
  • Set up a build definition in your Team Area, settings:
    • Overview: enable "Ignore all warnings when computing overall status"; Supporting build engines: your build engine
    • Set up a build engine, settings:
      • Overview: enable "Build engine process polls fro request", enable "Monitor the last contact time", Threshold (in minutes): "3", Supported Build Definitions: your build definition
      • Hudson/Jenkins: Hudson/Jenkins URL: your Jenkins URL, user information: your user information
    • Jazz Source Control: Build workspace: your workspace, Load directory: "./source", enable "Delete directory before loading", enable "Accept latest changes before loading (...)"
    • Post build deliver: Deliver target: your stream, enable "Deliver all components in build workspace", Snapshot owner: "Leave the build workspace as the owner"
  • Set up you Jenkins with the following settings:
    • repositoryAddress=http://your.jazz.adress/
    • buildDefinitionId=your build definition
    • buildEngineId=your build engine
    • acceptChanges=true
    • Set up you ant with the following settings:
<startTeamBuild buildDefinitionId="${buildDefinitionId}"
engineId="${buildEngineId}"
label="${buildDefinitionId} ${hudsonBuildLabel}"
autoComplete="false"
resultUUIDProperty="buildResultUUID"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}" />
With this settings, we get the following Jenkins error:
14:52:25 /home/builder/Build-System/jazz/Build-System/buildPrepare.xml:187: com.ibm.team.repository.common.transport.TeamServiceException: CRJAZ0098E The com.ibm.team.filesystem.common.IFilesystemService{/jazz/service/com.ibm.team.filesystem.common.IFilesystemService} service failed. The server returned the HTTP error 500 with this error text: Internal Server Error.
14:52:25 at com.ibm.team.repository.transport.client.ClientHttpUtil.throwHttpClientError(ClientHttpUtil.java:1334)
14:52:25 at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:504)
14:52:25 at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:315)
14:52:25 at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:219)
14:52:25 at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:227)
14:52:25 at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:553)
14:52:25 at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:540)
14:52:25 at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:481)
14:52:25 at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:194)
14:52:25 at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43)
14:52:25 at $Proxy25.getFileTreeByVersionable4(Unknown Source)
14:52:25 at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
14:52:25 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
14:52:25 at java.lang.reflect.Method.invoke(Method.java:611)
14:52:25 at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:164)
14:52:25 at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:88)
14:52:25 at $Proxy25.getFileTreeByVersionable4(Unknown Source)
14:52:25 at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
14:52:25 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
14:52:25 at java.lang.reflect.Method.invoke(Method.java:611)
14:52:25 at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy$2.run(ScmServiceInterfaceProxy.java:168)
14:52:25 at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1288)
14:52:25 at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
14:52:25 at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1281)
14:52:25 at com.ibm.team.scm.client.internal.ScmClientLibraryContext.callCancelableService(ScmClientLibraryContext.java:71)
14:52:25 at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invokeCancelableService(ScmServiceInterfaceProxy.java:164)
14:52:25 at com.ibm.team.scm.client.internal.ScmServiceInterfaceProxy.invoke(ScmServiceInterfaceProxy.java:92)
14:52:25 at $Proxy25.getFileTreeByVersionable4(Unknown Source)
14:52:25 at com.ibm.team.filesystem.client.internal.FileSystemServiceProxy.getFileTreeByVersionable(FileSystemServiceProxy.java:287)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.LoadOperation.load(LoadOperation.java:1004)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.LoadOperation$1.run(LoadOperation.java:664)
14:52:25 at com.ibm.team.filesystem.client.internal.SharingManager.runWithinFileSystemLock(SharingManager.java:935)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:164)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:144)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(LoadOperation.java:695)
14:52:25 at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:89)
14:52:25 at com.ibm.team.build.internal.scm.SourceControlUtility.updateFileCopyArea(SourceControlUtility.java:678)
14:52:25 at com.ibm.team.build.internal.scm.SourceControlUtility.updateFileCopyArea(SourceControlUtility.java:387)
14:52:25 at com.ibm.team.build.ant.task.TeamFetchTask.doExecute(TeamFetchTask.java:265)
14:52:25 at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:661)
14:52:25 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
14:52:25 at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
14:52:25 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
14:52:25 at java.lang.reflect.Method.invoke(Method.java:611)
14:52:25 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
14:52:25 at org.apache.tools.ant.Task.perform(Task.java:348)
14:52:25 at org.apache.tools.ant.Target.execute(Target.java:435)
14:52:25 at org.apache.tools.ant.Target.performTasks(Target.java:456)
14:52:25 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
14:52:25 at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
14:52:25 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
14:52:25 at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
14:52:25 at org.apache.tools.ant.Main.runBuild(Main.java:851)
14:52:25 at org.apache.tools.ant.Main.startAnt(Main.java:235)
14:52:25 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
14:52:25 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)  

Do you have an idea what the problem could be?

Kind regards
Marco

One answer



permanent link
Nick Edgar (6.5k711) | answered Sep 05 '13, 2:13 p.m.
JAZZ DEVELOPER
Hi Marco, the setup looks OK to me.  Can you check whether all the properties are getting passed through properly to the Ant script, e.g. try adding <echo message="userId is: ${userId}"/>, and likewise for other properties used in the startTeamBuild task invocation.

Can you also check on the server to see if the ccm.log (or jazz.log, depending on your RTC context root) has a corresponding entry?

Comments
Nick Edgar commented Sep 05 '13, 2:14 p.m. | edited Sep 05 '13, 2:15 p.m.
JAZZ DEVELOPER

Also, rather than using the Ant tasks to create the build result, run the SCM phase, etc., I suggest trying our new plugin: 


See tutorial and video links at the bottom of that page.


Martin Wassermann commented Sep 05 '13, 5:06 p.m. | edited Sep 05 '13, 5:10 p.m.

Hi Nick,

I am a colleague of Marco. We have already tried to use the new Jenkins plugin but the problem is the same. And if I search in the ccm logs I didn't find a corresponding entry. We started a build and watched the log file but there was no entry. Also in the http logs (we use an IHS as proxy) I didn't recognize anything.

I think we will try to use the scm command line to see, if the problem is in the ask task or if the server has a problem. I will also change the log level of the server. Maybe I will find something corresponding with another log level.

Do you have any further ideas what we can try? I have looked at the build results and there was hundred of unfinished builds (with status "50%" or "50% (fetching code)"). The oldest unfinish build was from December 2011. I had abandoned this unfinished builds but this didn't change anything.


Nick Edgar commented Sep 05 '13, 5:39 p.m.
JAZZ DEVELOPER

If you're seeing the RTC build result, then it sounds like the startTeamBuild succeeded. Either that or you're requesting the build from RTC, so there's already a build result in play (its UUID needs to be passed to Jenkins, e.g. by making the job parameterized with a buildResultUUID parameter).


So it's failing in the fetch, whether you use the teamFetch task or the Jenkins plugin to run the SCM phase?  Is there any nested stack trace showing the request on the server-side (i.e. the implementation in FileSystemServiceInternal. getFileTreeByVersionable4)?

Are you able to set up a similar build using JBE?  If so, does it have the same problem, or any better error reporting?


Martin Wassermann commented Sep 05 '13, 6:47 p.m. | edited Sep 05 '13, 6:47 p.m.

I don't find any entries with FileSystemServiceInternal. getFileTreeByVersionable4. I will change the loglevel tomorrow. Maybe the corresponding log entries only appears with another log level (Do you thing that log level INFO is enough?)

A similar build with the JBE will be difficult. This build is a nested build job with a lot of steps. We have also a simple hudson job that only load the sources in a sandbox and it works. But the same call didn't work in our production build job. So maybe it has something to do with a timeout or something like that (the total build last 57 minutes at the moment). So I'am afraid if I create a simple build in the JBE it will work.


marco Kaiser commented Sep 06 '13, 4:06 a.m. | edited Sep 06 '13, 8:52 a.m.

Hello guys,

some background information. How martin said, the first error was from December 2011, we got sporadic errors in our nightly builds. Since 2nd September the errors appear on every second build - we've to start new builds (we didn't chge anything on the software).

This is the teamFetch for the ant:

<teamFetch repositoryAddress="${repositoryAddress}"
 userId="${userId}"
 passwordFile="${passwordFile}"
 workspaceUUID="${env.workspaceId}"
 destination="${sourceDir}"
 verbose="true" />
 


Nick Edgar commented Sep 06 '13, 8:54 a.m.
JAZZ DEVELOPER

Do you thing that log level INFO is enough?

If it's responding with a 500, the server thinks it's an internal error, so should already be logging it at ERROR level.  The default level is WARNING.

I suggest filing a work item against Source Control and/or with IBM Support.

showing 5 of 6 show 1 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.