AKStream icon indicating copy to clipboard operation
AKStream copied to clipboard

deploy启动AKStreamKeeper日志提示 [JsonHelper]->Json返序列化异常

Open SCUT-chenjia opened this issue 1 year ago • 1 comments

deploy启动AKStreamWeb正常,可以接受GB28181设备注册,但是启动AKStreamKeeper后日志一直提示:

2024-09-09 16:30:47,791 [16] ERROR AKStream - [JsonHelper]->Json返序列化异常->Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[System.UInt16]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'Code', line 1, position 8.
   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.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at LibCommon.JsonHelper.FromJson[T](String json, MissingMemberHandling p) in /root/src/LibCommon/JsonHelper.cs:line 179
json内容:{"Code":"Sys_HttpClientTimeout","Message":"http客户端请求超时或服务不可达"}
2024-09-09 16:30:47,791 [16] DEBUG AKStream - [AKStreamKeeper]->获取在用Rtp端口列表->null

这段反复打印,配置如下:

{
  "IpV4Address": "192.168.5.35",
  "IpV6Address": "fe80::8:807:2143:28a1%5",
  "Candidate":"192.168.5.35",
  "WebApiPort": 6880,
  "MediaServerPath": "/opt/media/MediaServer",
  "AkStreamWebRegisterUrl": "http://192.168.5.35:5800/MediaServer/WebHook/MediaServerKeepAlive",
  "CutMergeFilePath": "/opt/media/www/Downloads/CutMergeFile",
  "CustomRecordPathList": [
    "/opt/media/www/Downloads"
  ],
  "UseSsl": false,
  "MinRtpPort": 10001,
  "MaxRtpPort": 20000,
  "MinSendRtpPort": 20002,
  "MaxSendRtpPort": 20200,
  "RandomPort": false,
  "FFmpegPath": "/usr/bin/ffmpeg",
  "AccessKey": "047I4WS1-U51UBO6W-1J4BT21P-MF17IT99-92J8WIHU-944Q4KIW",
  "RtpPortCdTime": 3600,
  "HttpClientTimeoutSec": 5,
  "DisableShell": false,
  "CheckLinuxDiskMount": false,
  "ZLMediakitSSLFilePath": "./sslfiles/",
  "ListenIp": "0.0.0.0",
  "EnableRtspAuth": true
}

流媒体服务可以运行,可以通过postman接口访问接口了,问题就是AKStreamWeb跟AKStreamKeeper通信出了问题,但是不知道问题在哪里。

SCUT-chenjia avatar Sep 09 '24 09:09 SCUT-chenjia

应该是zlmediakit配置之类的有变化了,解决方法就是1.看看是什么变化了,给他补全,2.使用老一点的zlmediakit版本试试

chatop2020 avatar Sep 11 '24 10:09 chatop2020