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.3k●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 hi John,
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
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.
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.
Hi John, Hi Spencer,
Hi Simon,
Hi John,
when creating a request using the predefined properties (e.g. take the build engine supported with) he tells me the following:
Hi Simon,
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 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). Hi Nick,
Here is the stack for the HudsonBuildLoopScheduledTask:
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.
Hi Nick,
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.
Hi Erik,
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.
Restarting the server fixed our problem (starting jobs in RTC kicks off the jenkins job)
Hi Erik,
showing 5 of 12
show 7 more comments
|
![]()
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.