为Service Fabric本地群集启用ResourceMonitorService插件失败

时间:2018-08-29 22:04:20

标签: azure-service-fabric service-fabric-stateless

我正在尝试为本地计算机上的Service Fabric群集启用Resource Monitor Service插件,如下所述:

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-resource-manager-autoscaling#auto-scaling-based-on-resources

我将值添加到json,但是当我尝试重置群集时,它失败并显示以下错误:

JSON config is invalid. Check syntax/model.:Newtonsoft.Json.JsonSerializationException: Error converting value "ResourceMonitorService" to type 'Microsoft.ServiceFabric.ClusterManagementCommon.AddonFeature'. Path 'properties.addOnFeatures[1]', line 324, position 70. ---> System.ArgumentException: Requested value 'ResourceMonitorService' 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.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.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.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 Microsoft.ServiceFabric.DeploymentManager.Model.StandAloneInstallerJsonModelBase.DeserializeJsonConfig(Type type, String json)
   at Microsoft.ServiceFabric.DeploymentManager.Model.StandAloneInstallerJsonModelBase.GetJsonConfigFromString(String jsonString)

我有点卡住了。我找不到有关枚举或插件的有效值的任何信息。

这是json部分的片段:

"addOnFeatures": [
      "DnsService",
      "ResourceMonitorService"
    ]

1 个答案:

答案 0 :(得分:0)

因此,正如Mikkel所评论的那样,该功能是在比我安装的功能更高的版本中添加的。要修复,我刚刚升级到服务结构的最新版本。它无法立即运行,我必须重新启动本地计算机才能运行。希望这对其他人有帮助。

相关问题