0

我正在尝试为我的本地计算机上的 Service Fabric 群集启用资源监视器服务插件,如下所述:

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"
    ]
4

1 回答 1

0

因此,正如 Mikkel 评论的那样,该功能是在比我安装的版本更高的版本中添加的。为了解决这个问题,我刚刚升级到最新版本的服务结构。它没有立即工作,我必须重新启动我的本地机器才能工作。希望这对其他人有帮助。

于 2018-09-04T14:15:33.347 回答