starting a build forge job from rational team concert
I have successfully created a Rational Build Forge build engine which can communicate with the Rational Build Forge server itself (the test connection succeeds). I have also successfully created a Build Forge Project build definition which can retrieve the relevant build forge projects to use (and one has been selected and the build definition saved).
Here's what works.... I can start the build forge project used in the build definition (see above paragraph) from within Build Forge (via the Build Forge web console). The project runs successfully and even reports status in Rational Team Concert (in other words when I "show build results" in Rational Team Concert, I can see the progress reported from Build Forge--and the logs show up too).
But what does not work.... When I try to start the same Build Forge project from the Build Forge Project build definition in Rational Team Concert. It fails immediately with the following error in the logs:
com.ibm.team.build.common.TeamBuildException: Error sending request "Create build for project 3528572b0c671000afe2476f0c830c83" to Build Forge server at "10.128.225.171:3966" for build engine id "jtcxlbfgap01.bfserver": CRRBF0102I: API: Permission denied: RunBuild.
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection.createTeamBuildException(BuildForgeConnection.java:132)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection.runAsRetryable(BuildForgeConnection.java:99)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection.createBuild(BuildForgeConnection.java:430)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeBuildLoopRunnable.startBuildForgeProject(BuildForgeBuildLoopRunnable.java:245)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeBuildLoopRunnable.run(BuildForgeBuildLoopRunnable.java:193)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeBuildLoopScheduledTask.runTask(BuildForgeBuildLoopScheduledTask.java:71)
at com.ibm.team.repository.service.async.AbstractAutoScheduledTask.executeTask(AbstractAutoScheduledTask.java:88)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy437.executeTask(Unknown Source)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.runTask(AsynchronousTaskRunner.java:158)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.run(AsynchronousTaskRunner.java:119)
at java.lang.Thread.run(Thread.java:738) Caused by: com.buildforge.services.common.api.APIException: Message[uuid=null, timestamp=1392926497, userUuid=, processId=0, severity=ERROR, type=, componentUuid=null, messageKey=APIAccessDeniedPerm, indirectionMask=0, args={RunBuild}]
at com.buildforge.services.client.api.APIClientConnection.call(APIClientConnection.java:607)
at com.buildforge.services.client.dbo.Build.create(Build.java:569)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection$4.run(BuildForgeConnection.java:437)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection$4.run(BuildForgeConnection.java:1)
at com.ibm.rational.buildforge.team.internal.service.BuildForgeConnection.runAsRetryable(BuildForgeConnection.java:95)
... 15 more
From what I can tell the user that is setup in the Rational Build Forge build engine has the correct setup in Build Forge to be able to execute builds. That user is a service account specifically created just for the purpose of performing these builds. The user seems to be a part of all the necessary groups needed to perform builds in Build Forge.
Based on what I have described and the error log outlined, does anyone have advice or an explanation that would help me resolve this issue...?
Cheers
3 answers
The service user is missing the "Execute Build" permission. Add that to one of your groups that the service user belongs to.
~Spencer
~Spencer
This is what we have discovered in our protracted investigation into this issue. There cannot be multiple accounts for "the" user (credentials) that is authorized to connect to Build Forge (from RTC).
I'm not really sure how to explain it other than as follows: We have multiple projects (that operate independent of one another). Naturally we setup "service" accounts for each project area that would be localized for use in each respective project area. That unique service account per project was intended to be the means to start projects/jobs from RTC that are in Build Forge. That ended up being the issue. We could only have one service account that is now used across all project areas. So now we have one generic "service" account that can be used by all project areas to initiate or run a project in Build Forge (from RTC).
It seems like such a strange issue, and without reasonable explanation really.