locked
Build Scheduling fails because of nonexistent build definition RRS feed

  • Question

  • I am getting an error in the TFS Job Monitoring web page each night from the Build Scheduling. The error message is 'Build job b84913a2-fcbc-487f-b37e-2b248ca0a414 contains invalid data' and looking at the details it is related to build definition 124. Only problem is that I no longer have a build definition with id 124 - I guess that it was deleted a couple of years back. Looking directly in the [tbl_BuildDefinition] table in the collection database supports this. In the [tbl_JobSchedule] table I see five rows with that JobId. So how do I get rid of this rouge build schedule? I could delete the job directly from the schedule table, but I worry for the consequences!

    I am running TFS 2015.

    [JOB HISTORY DETAILS]
    [1879312] [TEAM FOUNDATION]FittingSoftware:Build Scheduling

     Result: Failed
     Priority: 15
     Queued Reasons: Scheduled
     Host: [TEAM FOUNDATION]FittingSoftware
     Job Name: Build Scheduling
     Agent: [KBNDVTFS31] TfsJobAgent.exe
     Queue Time: 6. oktober 2015 03:00
     Queue Duration: 0:00:00,89
     Start Time: 6. oktober 2015 03:00
     Run Duration: 0:00:00,187
     End Time: 6. oktober 2015 03:00
     Result Message: Build job b84913a2-fcbc-487f-b37e-2b248ca0a414 contains invalid data.
     Host Id: b158e24a-8281-4ddf-b382-95639c25f1a9
     Job Id: b84913a2-fcbc-487f-b37e-2b248ca0a414
     Agent Id: 81757967-cc18-40e1-b9af-e8226bdbe250


    [JOB DEFINITION DETAILS]
    FittingSoftware:Build Scheduling

     Job Name: Build Scheduling
     Priority Class: High
     Extension: Microsoft.TeamFoundation.Build.JobService.Extensions.ScheduleJob
     Enabled State: Enabled
     Job Id: b84913a2-fcbc-487f-b37e-2b248ca0a414
     Job Data: <Uri>vstfs:///Build/Definition/124</Uri><ContinuousIntegrationType>Schedule</ContinuousIntegrationType>


    Tore Østergaard
    Oticon A/S, Denmark

    Tuesday, October 6, 2015 2:16 PM

Answers

  • Solution was a success!

    I ended up deleting records from the following tables with jobID 'b84913a2-fcbc-487f-b37e-2b248ca0a414'.

    tbl_JobDefinition (1 record)
    tbl_JobSchedule (5 records)

    In the following days the Build Scheduling job has succeeded and I see no new errors in either Job Monitor or the Event Log.


    Tore Østergaard
    Oticon A/S, Denmark

    Wednesday, October 14, 2015 7:40 AM

All replies

  • Hi,

    I think the build definition is not deleted correctly or it is still exist in a team project.

    You may try to check it in which team project in the tbl_BuildDefinitionMapping table.

    On the other hand, you may try to change the TriggerType to 1 for that build definition in tbl_BuildDefinition and check the result.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 7, 2015 8:59 AM
    Moderator
  • Hi Starain

    I am also convinced that is a half-way deleted build definition.

    As I wrote before, the build definition does not exist in the tbl_BuildDefinition so I cannot change the TriggerType. The definition is also not present in tbl_BuildDefinitionWorkspace (which relates to  tbl_BuildDefinitionMapping and tbl_BuildDefinition).

    I am unsure if it is relative safe to delete the entries in the tbl_JobSchedule so get past this problem.

    Funny thing is that this must have been a problem for a couple of years, but the job didn't fail until I installed TFS 2015.


    Tore Østergaard
    Oticon A/S, Denmark

    Thursday, October 8, 2015 11:45 AM
  • Hi,

    Base on my test to change a build trigger status from Schedule to Manual, it deletes the record in tbl_JobDefinition table.

    I suggest that you could copy that record data to other files, then delete that record, for this way you could restore the record if some issue related to it.

    On the other hand, the tbl_Schedule table has the schedule data, you may try to change the data to false (e.g. weekday 1: False, weekday 2: False, weekday 3: False, weekday 4: False, weekday5: False, weekday 6: False, weekday 7: False)

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 9, 2015 2:22 AM
    Moderator
  • The definition is not mentioned in the tbl_Schedule table either so I guess that I will have to get destructive in the tbl_JobDefinition table.

    Tore Østergaard
    Oticon A/S, Denmark

    Friday, October 9, 2015 6:18 AM
  • Hi,

    It is strange. Before you change tbl_JobDefinition table, please back up that record.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 9, 2015 8:13 AM
    Moderator
  • Will do ;-)

    Tore Østergaard
    Oticon A/S, Denmark

    Friday, October 9, 2015 8:49 AM
  • I think that I have figured out why this suddenly became a problem after installing TFS 2015.

    Below is the data column for two entries in the JobDefinition. The first is a valid build definition whereas the second is the one I am having problems with.

    <BuildDefinition><Uri>vstfs:///Build/Definition/1247</Uri><TriggerType>Schedule</TriggerType><ProjectId>a4e57d72-3286-4e50-90cb-cff77c188980</ProjectId></BuildDefinition>
    <BuildDefinition><Uri>vstfs:///Build/Definition/124</Uri><ContinuousIntegrationType>Schedule</ContinuousIntegrationType></BuildDefinition>

    There is a difference in the content/schema. I guess that TFS 2013 understood the job definition but ignored the schedule because the build definition does not exist. During the TFS 2015 upgrade only job definitions pointing to an existing build definition was migrated to the new schema.


    Tore Østergaard
    Oticon A/S, Denmark

    Friday, October 9, 2015 11:54 AM
  • Hi,

    Has the issue been solved after you delete that record?

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 12, 2015 1:37 AM
    Moderator
  • Hi Starain

    I am in the process of testing it on a test server, before committing in production. So far I have seen that there are no relation between tbl_JobDefinition and tbl_JobSchedule so I will have to delete from both, in order to get totally rid of the rogue job.


    Tore Østergaard
    Oticon A/S, Denmark

    Monday, October 12, 2015 7:51 AM
  • Solution was a success!

    I ended up deleting records from the following tables with jobID 'b84913a2-fcbc-487f-b37e-2b248ca0a414'.

    tbl_JobDefinition (1 record)
    tbl_JobSchedule (5 records)

    In the following days the Build Scheduling job has succeeded and I see no new errors in either Job Monitor or the Event Log.


    Tore Østergaard
    Oticon A/S, Denmark

    Wednesday, October 14, 2015 7:40 AM