Proposed TFS 2010 Help: Build Stuck as Infinitely Queued

  • terça-feira, 26 de outubro de 2010 13:37
     
     

    Hello.  One of my team members has queued a build that has been running for the past three days.  I've tried stopping the build but get "TF215104: Failed to stop build: it did not respond to a workflow cancellation request."

     

    To try to correct this, I restarted the build controller agent on the server, but the stuck build still cannot be stopped.  How can I force this build to stop?

    Thanks in advance.

Todas as Respostas

  • terça-feira, 26 de outubro de 2010 18:29
     
     

    If you restart the build service the build will stop. Log on to the build server, open the TFS Admin console and select the Build Configuration node, and then click the Restart link beloe the build service

    Hope that helps
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
  • terça-feira, 26 de outubro de 2010 19:45
     
     
    Yes.  This was the last step I took and I received a message that the build had stopped, but it is still in the queue and I still cannot stop it.
  • terça-feira, 26 de outubro de 2010 20:01
     
     

    Hello,

    try to reset iis from the server.

    if this not wokr, try to rmove the queued build from TFS database.

     


    Regards Ayman Zaza
  • terça-feira, 26 de outubro de 2010 21:03
     
     
    Do I simply delete the build from the build table in the database?  Are there any problems that could arise from performing this delete?
  • quarta-feira, 27 de outubro de 2010 09:24
     
     

    yes, delete from build Database.

    there is no problem from remove the queued build but its not recommended to play with any TFS database, but sometime we have to, this solution is work around if you didn't get the proper solution.


    Regards Ayman Zaza
  • quarta-feira, 27 de outubro de 2010 12:14
     
     
    Thank you.  This has removed the stuck build from the queue, but when I queue a new build, I sill get stuck on "Run On Agent (waiting for build agent)".  I've restarted the Build Controller such that its status is "Ready" and all of the build controllers are all listed as "Available" and "Enabled".  What else could I have to do?
  • quarta-feira, 27 de outubro de 2010 12:55
     
     

    So the build is not started? is this the first time you are doing Builds?

     


    Regards Ayman Zaza
  • quarta-feira, 27 de outubro de 2010 13:10
     
     
    No.  We have many builds.  Last week the IP address of the build machine changed and afterward one of our team members queued a build that hung for days, which blocked other builds from progressing.  Now the build queue does not contain any builds that are in process, but queuing a new build results in the build getting stuck on "Run On Agent (waiting for build agent)".
  • quarta-feira, 27 de outubro de 2010 16:44
     
     

    Did you check the logs if there any error?

    check the build service if its running.

     


    Regards Ayman Zaza
  • quarta-feira, 27 de outubro de 2010 17:43
     
     

    I checked the logs and I have two errors.  Both say "Exception Message: There was an error writing to the pipe: The pipe is being closed. (232, 0xe8). (type CommunicationException)".

    I also checked in TFS Administration Console and it says that the build service is running.  Do I need to restart it?  Are there any problems that could be caused by restarting it?

  • quinta-feira, 28 de outubro de 2010 08:07
     
     

    You Can enable tracing

    (http://msdn.microsoft.com/en-us/library/ms733025.aspx ) in the service to see check which exception caused the problem.

     


    Regards Ayman Zaza
  • quarta-feira, 6 de abril de 2011 11:16
     
     

    Had similar problem. I had successfully created a few builds before then the build agent went down before the next build was "Queued". Could not stop the build. Tried restarting the build agent with no luck. Was about to delete from the database when I noticed I could just "Delete" the queued build. That seemed to do the trick. Things seem to be up and running as usual.

  • terça-feira, 26 de abril de 2011 21:20
     
     
    Had the same problem, but I had to delete the from the tbl_Build* tables (3-4 of them) and update the tbl_BuildAgent table to set that queued build ID to NULL.
    Michael
  • sexta-feira, 29 de abril de 2011 17:23
     
     

    I'm seeing the same issue. The build is stuck and I can't delete it without getting the following errors: I've already tried restarting the server and build agent with no luck.

     

    1. The agent status has been changed by the Team Foundation Server at Date Time. Reason: There was no endpoint listening at http://server:9191/Build/v3.0/Services/Agent/22 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    2. TF215104: Failed to stop build X: it did not respond to a workflow cancellation request.

    When I look in the database, I see the following records.

    1. tbl_Build: BuildId 169 doesn't exist

    2. tbl_BuildAgentReservation: ReservationId 169 exists for ReservedAgentIt: 22

    3. tb_BuildAgent: AgentId 22 has a ReservationId 169.

    So can I just delete the row entry in the tbl_BuildAgentReservation that has the ReservationId of 169. Is there more I need to delete so TFS understands that nothing is running?

    Is this the only way to fix this issue by manually deleting records in the database? If so I'm hopeful that there will be a bug fix for this soon.

    Thanks.

     

  • segunda-feira, 2 de maio de 2011 15:02
     
     Resposta Proposta

    Ok, here is what I did that seems to have fixed it.

    1. tbl_BuildAgentReservation: Deleted the row with the bad ReservationID (169)

    2. tbl_BuildAgent: Ran sql query: update tbl_BuildAgent set ReservationId=NULL where AgentId = 22

    3. Restarted the Build Controller

    4. Restarted the Build Agent machine

    This fixed my issue.

    • Sugerido como Resposta BrianChristman terça-feira, 3 de maio de 2011 14:30
    •  
  • sexta-feira, 27 de maio de 2011 23:17
     
     Resposta Proposta

    I was facing the same issue and did have write access to the tfs warehouse.

    I unredisterd the build service from tfs admin console, registreed it again and deleted any existing agents.

    The build stopped this way and then I created new agents.

    The subsequent builds were smooth.

    Thanks,

    Anuj


  • quarta-feira, 25 de abril de 2012 01:51
     
      Contém Código

    Brian,

    There actually is a fix for something similar in the works. We were able to locate a issue in the SQL stored procedure that could potentially allow build agents to be left reserved for a reservation which no longer exists. In this scenario, however, the following query would uncover the issue:

    SELECT * FROM tbl_BuildAgent ba LEFT JOIN tbl_BuildAgentReservation bar ON bar.ReservationId = ba.ReservationId WHERE ba.ReservationId IS NOT NULL AND bar.ReservationId IS NULL

    If the above query yields any results, you would benefit from the patch in question.

    Patrick

  • quarta-feira, 25 de abril de 2012 18:29
     
     
    I'm glad this has been found and having a fix would be good.  The above query didn't return anything on our servers currently.  Thanks for the heads up about this.