It's all about the answers!

Ask a question

Submitting build definition of Jenkins Jobs


Ismael Serrano Hidalgo (342812) | asked May 10 '13, 8:17 a.m.
 Hi,

In RTC 4.0.2 and Jenkins 1.5.0.4 as Build engine, when requesting a build, the job is actually launched in Jenkins (we can check it in Jenkins console), but I get an error in RTC in less than a second. The error displayed is as follows:

Error starting Hudson/Jenkins build for job "IBM aaw20_gtspee_RTC":
java.io.IOException: Error submitting build to Hudson/Jenkins. Expected code 200 OK but received code 403 with message: Forbidden
at com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopRunnable.startHudsonBuild(HudsonBuildLoopRunnable.java:283)
at com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopRunnable.processRequest(HudsonBuildLoopRunnable.java:141)
at com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopRunnable.run(HudsonBuildLoopRunnable.java:107)
at com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopScheduledTask.runTask(HudsonBuildLoopScheduledTask.java:43)
at com.ibm.team.repository.service.async.AbstractAutoScheduledTask.executeTask(AbstractAutoScheduledTask.java:88)
at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 $Proxy2156.executeTask(Unknown Source)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.runTask(AsynchronousTaskRunner.java:153)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.run(AsynchronousTaskRunner.java:116)
at java.lang.Thread.run(Thread.java:662)

The build engine authentication is the same user as the repository workspace owner (same ID). The RTC user has full build permissions.

Just to add that none RTC operation is performed (scm accept, load...)

Thanks very much in advance

Accepted answer


permanent link
Nick Edgar (6.5k711) | answered May 14 '13, 12:15 p.m.
JAZZ DEVELOPER
edited May 14 '13, 12:16 p.m.
I think the original problem is due to Attempt to start Hudson build fails when unauthenticated users do not have permission to view jobs (242485), which was also fixed for 4.0.3 RC1, but you'd also likely hit the queue timeout issue that Spencer mentioned if there's a quiet period configured for the job.  For the first issue, one workaround is to grant read access of the job (not necessarily the builds) to all users.  This may be prohibitive for security reasons though.  The problem was due to it following the redirect to the job page after submitting the request, but without the credentials being carried along.  The fix was to not follow redirects.

Regarding:
 The build definition functionality "Components to exclude" and "Accept options" is not working.
how are you currently running the SCM phase of the build?  Are you using the older plugin for RTC (which based on the SCM CLI), or using the Ant tasks and/or calling out to JBE from the Jenkins job?  I recommend moving to the new plugin if possible:
https://github.com/jenkinsci/teamconcert-plugin
which does support the advanced load options.

Ismael Serrano Hidalgo selected this answer as the correct answer

Comments
Ismael Serrano Hidalgo commented May 14 '13, 3:01 p.m.

So definitely it would be a good idea to move to 4.0.3 in three weeks time...

Right now I'm using the Jenkins-RTC plugin for the lscm accept and compare commands, so is that approach correct?

8 other answers



permanent link
Spencer Murata (2.3k115971) | answered May 13 '13, 10:31 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
 The new time out problem could be caused by:
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/227294

The current logic (pre-4.0.3) does not allow for quiet time or queued builds in Hudson.  We attempt to link the build immediately after submission and if we cannot confirm a build we throw that error.  So if you have a quiet time or any sort of queuing structure in Hudson you will see that error.  Defect 227294 is resolved as of 4.0.3.

~Spencer

permanent link
Spencer Murata (2.3k115971) | answered May 10 '13, 8:46 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
 The build engine authentication should be the Hudson user/password not the RTC one.  The 403 means that the permission is denied for the given user.  So either the user/password is wrong or doesn't have sufficient permissions.  It might be a firewall issue too, if the something else is returning the 403 before it reaches the Hudson server.

I would start by verifying that the user/password on the engine is a good Hudson user with the right permissions.

~Spencer

permanent link
Ismael Serrano Hidalgo (342812) | answered May 10 '13, 9:41 a.m.
 Sorry for the misunderstanding, the build engine user/password is a Hudson/Jenkins user. Indeed the Test connection is OK. Maybe there is a firewall issue, or Hudson permissions. I will take your advise.

Don't you think that the Forbidden issue is in the Hudson side, and not RTC side?

Thanks!

permanent link
Ismael Serrano Hidalgo (342812) | answered May 13 '13, 10:11 a.m.
The Jenkins SystemOut.log gives the following message:

13/05/13 14:13:00:068 MEST] 00000030 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Se ha creado una excepci\363n no dete
ctada en uno de los m\351todos de servicio del servlet Stapler en la aplicaci\363n EJenkins. Excepci\363n creada: hudson.security.AccessDeniedException2: anonymous no tiene el permiso Read
        at hudson.security.ACL.checkPermission(ACL.java:54)
        at hudson.model.Node.checkPermission(Node.java:394)

Basically, says that the user anonymous does not have Read permissions. I remind you that the build engine has authorization required, actually with "Test connection SUCCESSFUL!".The build is submitted in Jenkins as the build user.

Somewhere in the connection between RTC and Jenkins the credentials are missing...

Just if I add anonymous to the project security, and remove "Authorization required" from the build engine, the error dissapears. At this point, after 10 seconds I get the following error:

Error starting Hudson/Jenkins build for job "IBM vacio":

java.io.IOException: Hudson/Jenkins build request timed out


Is there any time out properties in RTC regarding Builds?

Thanks in advance


permanent link
Ismael Serrano Hidalgo (342812) | answered May 13 '13, 11:16 a.m.
Yes, unfortunately the client has in its Jenkins configuration not only a quiet period of 20 seconds but also does not execute concurrent builds if necessary in their jobs.
So this environment is supported in 4.0.3 version? When is it going to be released, next June?

permanent link
Spencer Murata (2.3k115971) | answered May 13 '13, 11:20 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
4.0.3 is wrapping up and should be done on June 7th.  You can try out the changes in RC1.  This environment will be supported in that version.

~Spencer

permanent link
Ismael Serrano Hidalgo (342812) | answered May 14 '13, 2:45 a.m.
 Although it works in RC1, since january RTC is in production in customer site, so I don't feel any chance to install this RC1. Thus I would have to wait three weeks to install the new 4.0.3.

What about the other issue (the lose of credentials)? I was thinking about opening a PMR...

permanent link
Ismael Serrano Hidalgo (342812) | answered May 14 '13, 6:46 a.m.
Other issue about configuration. The build definition functionality "Components to exclude" and "Accept options" is not working. Do I have to configure somewhere in RTC or Jenkins the build properties "team.scm.loadComponents" and "team.scm.acceptBeforeFetch"? I didn't start build engine through "jbe.sh ...", do I have to do it?

The components to exclude is easy to cover through the repository workspace flow target configuration, by just flowing only to some components. On the other hand, the lscm accept and load could be done through the Jenkins-RTC plugin, but I miss the snapshot done during the "accept last changes" option.

Comments
Ismael Serrano Hidalgo commented May 16 '13, 10:22 a.m.

One more time, sorry for the misunderstanding, I was using old "Jenkins RTC Plugin 0.3" instead of the new one "Team Concert Plugin 1.0.5", where all the functionality desired is found, such as Accept options, Components to exclude...

Just if someone is interested in, see https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Plugin for further details

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.