3.1 fails to launch after upgrade from 3.1.0-beta.1

I just installed the 3.1.0 release onto my laptop which had 3.1.0-beta.1+Branch.release/3.1.a.Sha.3e94c540b66901a00f696d89350505c5b933ad6c, and the service starts but fails to stay running:

Exception 1:

2015-09-18 10:52:35.2480      7 FATAL  Error converting value "OctopusServerNodeView" to type 'Octopus.Client.Model.Permission'. Path 'GrantedPermissions[72]', line 1, position 1348.
Newtonsoft.Json.JsonSerializationException: Error converting value "OctopusServerNodeView" to type 'Octopus.Client.Model.Permission'. Path 'GrantedPermissions[72]', line 1, position 1348. ---> System.ArgumentException: Requested value 'OctopusServerNodeView' was not found.
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at Newtonsoft.Json.Utilities.EnumUtils.ParseEnumName(String enumText, Boolean isNullable, Type t)
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Octopus.Core.RelationalStorage.RelationalTransaction.<Stream>d__23`1.MoveNext() in Y:\work\refs\heads\master\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 251
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureRoleExists(IRelationalTransaction transaction, BuiltInRole builtInRole) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 121
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureBuiltInRolesExist(IRelationalTransaction transaction) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 113
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.Initialize(IRelationalStore store) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 27
   at Octopus.Core.Initialization.StoreInitializer.Initialize() in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\StoreInitializer.cs:line 22
   at Octopus.Server.OctopusServerEngine.Start() in Y:\work\refs\heads\master\source\Octopus.Server\OctopusServerEngine.cs:line 49
   at Octopus.Server.Commands.RunCommand.Start() in Y:\work\refs\heads\master\source\Octopus.Server\Commands\RunCommand.cs:line 37
   at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
   at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.<Run>b__0() in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceHost.cs:line 19
   at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 44

Exception 2:

2015-09-18 10:52:35.5500      7 FATAL  Unhandled AppDomain exception occurred: Error converting value "OctopusServerNodeView" to type 'Octopus.Client.Model.Permission'. Path 'GrantedPermissions[72]', line 1, position 1348.
Newtonsoft.Json.JsonSerializationException: Error converting value "OctopusServerNodeView" to type 'Octopus.Client.Model.Permission'. Path 'GrantedPermissions[72]', line 1, position 1348. ---> System.ArgumentException: Requested value 'OctopusServerNodeView' was not found.
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at Newtonsoft.Json.Utilities.EnumUtils.ParseEnumName(String enumText, Boolean isNullable, Type t)
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Octopus.Core.RelationalStorage.RelationalTransaction.<Stream>d__23`1.MoveNext() in Y:\work\refs\heads\master\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 251
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureRoleExists(IRelationalTransaction transaction, BuiltInRole builtInRole) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 121
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.EnsureBuiltInRolesExist(IRelationalTransaction transaction) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 113
   at Octopus.Core.Initialization.BuiltIn.BuiltInTeamInitializer.Initialize(IRelationalStore store) in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\BuiltIn\BuiltInTeamInitializer.cs:line 27
   at Octopus.Core.Initialization.StoreInitializer.Initialize() in Y:\work\refs\heads\master\source\Octopus.Core\Initialization\StoreInitializer.cs:line 22
   at Octopus.Server.OctopusServerEngine.Start() in Y:\work\refs\heads\master\source\Octopus.Server\OctopusServerEngine.cs:line 49
   at Octopus.Server.Commands.RunCommand.Start() in Y:\work\refs\heads\master\source\Octopus.Server\Commands\RunCommand.cs:line 37
   at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
   at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.<Run>b__0() in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceHost.cs:line 19
   at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in Y:\work\refs\heads\master\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 59
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Exception 3:

Application: Octopus.Server.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Newtonsoft.Json.JsonSerializationException
Stack:
   at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

I’m not sure if this is a supported upgrade path or not?

Hi Matt

Thanks for getting in touch. I just got another report of this one, sorry you got hit with it.

The problem is a permission that was in the pre-release that we don’t have yet in 3.1 on master.

As a fix (usual caveats about editing the DB here… backup, cross fingers, don’t tell anyone etc)… Look at the System Administrator role in the UserRoles table and remove the OctopusServerNodeView and OctopusServerNodeEdit permissions. That should get you back up and running.

Let me know if that works.

Regards

Damian

Hi Damian

Thanks for that. I made the edit, and its all loaded up happily.

Thanks for the quick response.

Cheers,
Matt