Dashboard: HasPendingInterruptions

Octopus Deploy 2.4.8.107

In preparation to upgrade to the latest Octopus Deploy I am restoring a production backup to our QA server to test the upgrade process. However the dashboard is only showing this error ‘Could not read value for property: HasPendingInterruptions’. The other pages (Environments, Library, Configuration) appear fine.

I have done a Repair database operation which was successful. I have also removed the Octopus Deploy server instance (via Octopus Manager) and recreated it, restored, and repaired the database.

I see this exception in the OctopusServer log file:

Raven.Imports.Newtonsoft.Json.JsonSerializationException: Could not read value for property: HasPendingInterruptions ---> Raven.Imports.Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Boolean'. Path 'HasPendingInterruptions'. ---> System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 646
   --- End of inner exception stack trace ---
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 657
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 268
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 692
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1593
   --- End of inner exception stack trace ---
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1602
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 368
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 238
   at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 164
   at Raven.Imports.Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in c:\Builds\RavenDB-Stable\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonSerializer.cs:line 565
   at Raven.Client.Document.SessionOperations.QueryOperation.DeserializedResult[T](RavenJObject result) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\SessionOperations\QueryOperation.cs:line 219
   at Raven.Client.Document.SessionOperations.QueryOperation.Deserialize[T](RavenJObject result) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\SessionOperations\QueryOperation.cs:line 193
   at Raven.Client.Document.DocumentSession.<YieldQuery>d__c`1.MoveNext() in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentSession.cs:line 611
   at Octopus.Platform.Documents.Persistence.SessionExtensions.StreamAll[TDocument,TResult](ISyncAdvancedSessionOperation advancedSession, IRavenQueryable`1 query, Func`2 reader) in y:\work\refs\heads\master\source\Octopus.Platform.Documents\Persistence\SessionExtensions.cs:line 146
   at Octopus.Server.Web.Api.Components.DashboardBuilder.LoadFreshDashboard() in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 101
   at Octopus.Server.Web.Api.Components.DashboardBuilder.GetCachedDashboard() in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 79
   at Octopus.Server.Web.Api.Components.DashboardBuilder.BuildDashboard(DashboardConfiguration configuration, IOctopusPrincipal principal) in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 53
   at Octopus.Server.Web.Api.Actions.DashboardViewAction.Execute() in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Actions\DashboardViewAction.cs:line 28
   at Octopus.Platform.Web.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in y:\work\refs\heads\master\source\Octopus.Platform.Web\Api\Responder.cs:line 162
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass5.<.ctor>b__2(Object o) in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 47
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

Are there any recommendations on resolving this issue? I’m trying to make sure the actual upgrade from 2.4 to 2.6 will work so I’m making sure the starting point is the same as in production.

After digging into the error log and looking around in the RavenDB studio I see the ServerTasks has that HasPendingInterruptions. I created a few queries to find any with a null value for that property. Also ran across the same thing Paul found in regards to missing property having a problem on transforms so I looked for docs missing that property. I’m probably creating a wrong index or query (not the most familiar with Raven) though because everything looked fine.

I’m just going to try upgrading the QA to 2.6 to see if that fixes it. I’ve noticed that 008 migration (FixServerTaskHasPendingInterruptions). Hopefully when that runs (since that’s in 2.6) it’ll fix the problem.

Okay. Just upgrading QA to 2.6 seems to have solved the HasPendingInterruptions problem.

However, no I’m missing some data. There are a few step templates missing and one team is now gone. I’ve tried repairing the database again with the same result. Perhaps I need to let RavenDb sit for a bit and work through the index?

Should this missing data issue be a separate problem in this forum? I have no problem closing this one

Just found a related ‘missing data’ problem in the forum.

http://help.octopusdeploy.com/discussions/problems/24638-missing-users-and-teams-after-backup-and-restore

So I’m going to try what they did via manual RavenDB export/import. I’m on the same version that Paul mentions in that so hopefully that will resolve the missing data.

Hi David,

Thanks for reaching out. I’m sorry you are going through this trouble. Please keep us updated on your status.

Thanks

Dalmiro.

The manual import/export via RavenDB studio seems to have resolved all the missing data. No worries Dalmiro, I actually enjoyed the adventure digging around to figure this one out.