Jenkins build stays on "pending"
Simon Eickel (1.1k●7●54●57)
| asked Jul 16 '13, 4:46 a.m.
edited Nov 04 '13, 5:23 p.m. by Stephanie Taylor (241●1●5)
Hi there,
we are facing the problem that our jenkins jobs stay only in state "pending". We can start the jobs from jenkins and see the correct status in RTC when using the jenkins plugin. But when we start the build job from RTC than it seems that no request left the RTC server - or arrives the build server... In the logfiles nothing is written. I have put the log for log4j.category.com.ibm.rational.connector.hudson to TRACE but the only info I see in the logs are connection infos for when running "test connection". It seems for me that the requested build comes not to the build engine as there is nothing within the build activity of the build engine. Any idea? Greetings, Simon |
7 answers
Ralph Schoon (63.5k●3●36●46)
| answered Jul 16 '13, 7:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Which RTC version? How have you set up the Jenkins connection, the first solution we had, the old Jenkins plugin or the newest Jenkins Plugin?
Comments Hi Ralph,
|
I saw the same behaviour in RTC 4.0.3 using the latest plugin on Windows 2008 Server.
It happened immediately after I setup the new Build Definition. However, when I restarted Jenkins and requested a new build, the operation was successful. Within Jenkins UI, I did Jenkins->Manage Jenkins->"Reload Configuration from Disk" The original 'pending' build did not succeed, but the builds requested after the Jenkins refresh worked fine. Comments
Simon Eickel
commented Jul 16 '13, 8:57 a.m.
hi John,
John Carolan
commented Jul 16 '13, 9:12 a.m.
Hi Simon,
As of 4.0.3 it is required for the Jenkins jobs to have parameters. We now use the Jenkins parameters to track which Jenkins job is linked to which RTC build result.
~Spencer
John Carolan
commented Jul 16 '13, 9:18 a.m.
It may also help to click on the refresh icon to the right of the Builds tab in RTC Eclipse Client - that will update the 'Progress' and 'Estimated Completion' columns with the latest status from Jenkins.
John Carolan
commented Jul 16 '13, 9:28 a.m.
I was thinking of additional custom parameters as configured in Jenkins. For example, if I require a new string parameter 'test' but don't supply that parameter within the Build Definition Properties tab, or within the 'Build Properties' section of the Request Build dialog, then the build remains 'pending' until I supply the value and refresh.
Simon Eickel
commented Jul 17 '13, 1:55 a.m.
Hi John, Hi Spencer,
John Carolan
commented Jul 17 '13, 7:19 a.m.
Hi Simon,
Hi John,
Simon Eickel
commented Jul 18 '13, 8:36 a.m.
when creating a request using the predefined properties (e.g. take the build engine supported with) he tells me the following:
John Carolan
commented Jul 18 '13, 11:24 a.m.
Hi Simon,
Simon Eickel
commented Jul 22 '13, 3:15 a.m.
Hi John,
showing 5 of 11
show 6 more comments
|
The "The Hudson/Jenkins job <jobname> was not parameterized with the RTC build parameter "buildResultUUID". Added the parameter to the given job." warning is informational, not actually a warning. It's letting you know that it successfully added the buildResultUUID parameter to the Jenkins job (you could double-check to ensure this is the case). It should really be changed to INFO instead of WARNING. I've filed an issue for this.
Here are a few more questions / things to try:
Comments
Simon Eickel
commented Jul 18 '13, 8:49 a.m.
Hi Nick
|
Hi there,
thanks for all your ideas. Since today the Jenkins builds are running fine again. What did I do? - Nothing Every week on Monday morning (1 AM) our productive server gets restarted. Both the database server and the application server. I did a restart of the application server last week but this didn't resolve this issue. The restart of both - database and application server seemed to get it working again. Any idea what the issue could be? Maybe a inconsistent entry in the db which got slapped by rebooting? Greetings, Simon |
unfortunately this error occured again.
Since monday all our Builds stays on pending when starting them from the RTC client. When starting using the Jenkins dashboard everything is fine. When throwing an eye on the "active services" of ccm I noticed that the task "com.ibm.rational.hudson.team.internal.service.HudsonSyncLoopScheduledTask.executeTask" is open twice. A restart of both servers (DB and Application) did not help this time. Any more ideas would be great :) Comments The two tasks shown are actually different. The BuildLoop one checks for new builds in RTC and sends them to Hudson/Jenkins. The SyncLoop one monitors the status for existing builds, updating them with the latest info from Hudson/Jenkins.
They both show as having been running for almost a day and a half, so must be hung up on something. Can click Show Details on both, and include the stack traces here?
Can you also check the RTC server log? Probably called ccm.log or jazz.log under tomcat/server/logs (if using Tomcat).
Simon Eickel
commented Oct 17 '13, 1:22 a.m.
Hi Nick,
Simon Eickel
commented Oct 17 '13, 1:23 a.m.
Here is the stack for the HudsonBuildLoopScheduledTask:
Simon Eickel
commented Oct 17 '13, 1:34 a.m.
I restarted the server again tonight to have a clean overview of the logs and as expected there are not many entries inside.
If the tasks show as being running for any length of time greater than a few minutes, then they're definitely stuck. They normally run once every 15 seconds, as a separate invocation each time. Can you please check whether there are any Hudson/Jenkins type build engines defined whose URL may refer to an unresponsive server? Test Connection should indicate this, but you could also try the URL in a browser.
If you're not sure whether there are others on that RTC server, please have an admin user access: https://HOST:PORT/ccm/resource/virtual/build/engines?_prettyPrint=true
which lists the engines in JSON format. Search for any with a "hudson" config element. The "id" attribute gives the engine ID.
Simon Eickel
commented Oct 18 '13, 2:43 a.m.
Hi Nick,
Erik anderson
commented Oct 30 '13, 5:39 p.m.
We are having the same problem and it was working fine up until about the time the "com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopScheduledTask.executeTask" service started (it's been running for over 3 hours). Now our builds can not be started from RTC (they stay in pending state). Starting the job from the jenkins side works fine and results are visible in RTC.
Simon Eickel
commented Oct 31 '13, 4:00 a.m.
Hi Erik,
Erik anderson
commented Oct 31 '13, 3:19 p.m.
We tried that (removed all engines and definitions) but the BuildLoop ("com.ibm.rational.hudson.team.internal.service.HudsonBuildLoopScheduledTask.executeTask" )service remains wedged and we are not able to start jobs from RTC.
Erik anderson
commented Nov 01 '13, 8:46 a.m.
Restarting the server fixed our problem (starting jobs in RTC kicks off the jenkins job)
Simon Eickel
commented Nov 04 '13, 1:17 a.m.
Hi Erik,
showing 5 of 12
show 7 more comments
|
Hi Simon,
I noticed this defect in the recent Jenkins distributions: https://issues.jenkins-ci.org/browse/JENKINS-12994 If you're using 'Quiet period' in the Advanced Project Options of the build configuration in Jenkins, it might be worthwhile unchecking that toggle in case it is causing a problem. I hope that helps, John Comments
Simon Eickel
commented Oct 17 '13, 1:13 a.m.
Hi John,
|
We're having the same issue with RTC 4.0.5. Adding the trailing slash fix it. That's weird because it was supposed to be fixed in 4.0.4:
|
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.
Comments
Can you try putting the log4j to ALL? You should see more than the test connection information. If the logging is done correctly you should see a continuous stream of logging as the loops look for updates and builds to run.
Hi Spencer,
logging is now "log4j.category.com.ibm.rational.connector.hudson=ALL, hudson" but at the moment nothing new in the logfile ... will investigate if there are some more entries after some time...
one entry is noticeable I think:
2013-07-17 12:03:32,400 [WebContainer : 8 @@ 12:03 <username> /ccm/service/com.ibm.rational.connector.hudson.internal.common.IHudsonService] WARN com.ibm.rational.connector.hudson - The Hudson/Jenkins job <jobname> was not parameterized with the RTC build parameter "buildResultUUID". Added the parameter to the given job.
But I think as this is only a warning it's no problem.