S00020
错误代码
S00020
报错信息
Failed to read message from the socket with IO error type xxx. RefId: 00020
Failed to read response message from the socket with IO error type xxx. RefId: 00020
Failed to read object flag from the socket with IO error type xxx. RefId: 00020
Failed to parse the incoming object with IO error type xxx. RefId: 00020
Couldn't send login message to the given host/port with IO error type xxx. RefId: 00020
错误原因
当 server 接收到 xdb 的请求时,首先解析消息头部以获取命令类型(如 HTTP,API,STREAM 等),sessionID,属性信息(包括 rootId,优先级,并行度,客户端ID,消息seqNo 等)和消息长度等。
在此过程中,若出现非预期错误,则会触发上述报错,其中不同 XXX 的含义请参考附录。
可能原因包括:
-
解析过程中出现网络错误,如网络中断,对端断开连接等;
-
消息协议错误,消息头部信息必须遵循固定格式,协议不符会导致该报错;
-
解析出的消息类型当前 server 版本不支持。
解决办法
-
检查网络连接是否正常;
-
核对 API 和 server 版本的兼容性,排查协议不兼容问题;
-
确认 API 是否使用了 server 不支持的新协议。
附录
| IO error type | 详情 |
|---|---|
| 1 | Socket is disconnected/closed or file is closed. |
| 2 | In non-blocking socket mode, there is no data ready for retrieval yet. |
| 3 | Out of memory, no disk space, or no buffer for sending data in non-blocking socket mode. |
| 4 | String size exceeds 64K or code size exceeds 1 MB during serialization over network. |
| 5 | In non-blocking socket mode, a program is in pending connection mode. |
| 6 | Invalid message format. |
| 7 | Reach the end of a file or a buffer. |
| 8 | File is readable but not writable. |
| 9 | File is writable but not readable. |
| 10 | A file doesn't exist or the socket destination is not reachable. |
| 11 | The database file is corrupted. |
| 12 | Not the leader node of the RAFT protocol. |
| 13 | Unknown IO error. |
