【发布时间】:2019-02-04 18:55:06
【问题描述】:
我正在尝试为我的本地计算机上的 Service Fabric 群集启用资源监视器服务插件,如下所述:
我将值添加到 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 部分 sn-p:
"addOnFeatures": [
"DnsService",
"ResourceMonitorService"
]
【问题讨论】:
-
您使用的是哪个版本的 Service Fabric?我认为这是直到 6.3 才引入的
-
它是在 6.2 中引入的——我刚刚意识到这一点。你在 6.2 上吗?
-
就是这样!谢谢你。我在本地使用 6.0 并升级到 6.3 修复了它。
标签: azure-service-fabric service-fabric-stateless