This section describes the key fields in fault logs of the Remote Communication Kit (RCP) module, including the data type and meaning of each field.
When an error occurs in a network request initiated through RCP, the error information contains the extendInfo field, which records the key log information required for troubleshooting. To further improve the troubleshooting capability, more fields may be added to logs in the future. The following is an example of error information:
{"code":1007900035,"data":"SSL connect error","extendInfo":{"httpPhase":"011000","dnsDur":"0.31","tcpDur":"43.57","tlsDur":"0.00","sndDur":"0.00","rcvDur":"0.00","totDur":"0.0","redDur":"0.00","osErr":"2","sptIP6":"1",
"proxyType":"none","uptProxyMs":"0","peer":"0.0.**.**","lastOsIn":"0:0:0.0","lastOsOut":"0:0:0.0","sock":"100","sslErr":"error:0A000410:SSL routines::sslv3 alert handshake failure","minTlsVersion":"TLS1.3","maxTlsVersion":"TLS1.3"}} The following describes the fields that may be recorded.
Value type: string
Field description: network error description It displays the possible error description.
Value type: integer
Field description: HTTP phase status code, which is used to identify the progress of request execution. The value of httpPhase is a 6-bit number consisting of 1 or 0. Currently, the HTTP execution process is divided into six phases: dns (DNS resolution starts), tcp (TCP handshake starts and DNS ends), tls (TLS handshake starts and TCP ends), snd (request sending starts and TLS ends), rcv (response header receiving starts and SND ends), and bdy (response body receiving starts and RCV ends). When each phase starts, the corresponding bit value is 1.
The following table lists the possible values of httpPhase and their descriptions.
| dns | tcp | tls | snd | rcv | bdy | httpPhase Value | Description |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 111111 | Response body receiving phase |
| 1 | 1 | 1 | 1 | 1 | 0 | 111110 | Response header receiving phase |
| 1 | 1 | 1 | 1 | 0 | 0 | 111100 | Request sending phase |
| 1 | 1 | 1 | 0 | 0 | 0 | 111000 | TLS phase |
| 1 | 1 | 0 | 0 | 0 | 0 | 110000 | TCP phase |
| 1 | 0 | 0 | 0 | 0 | 0 | 100000 | DNS phase |
When the DNS response comes from the cache instead of the query, dns is set to 0. The following table lists several possible cases.
| dns | tcp | tls | snd | rcv | bdy | httpPhase Value | Description |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 1 | 011111 | (DNS from cache) Response body receiving phase |
| 0 | 1 | 1 | 1 | 1 | 0 | 011110 | (DNS from cache) Response header receiving phase |
| 0 | 1 | 1 | 1 | 0 | 0 | 011100 | (DNS from cache) Request sending phase |
| 0 | 1 | 1 | 0 | 0 | 0 | 011000 | (DNS from cache) TLS phase |
| 0 | 1 | 0 | 0 | 0 | 0 | 010000 | (DNS from cache) TCP phase |
After connection reuse is enabled, tcp and tls are set to 0. The following table lists several possible cases.
| dns | tcp | tls | snd | rcv | bdy | httpPhase Value | Description |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 000111 | (Connection reuse) Response body receiving phase |
| 0 | 0 | 0 | 1 | 1 | 0 | 000110 | (Connection reuse) Response header receiving phase |
| 0 | 0 | 0 | 1 | 0 | 0 | 000100 | (Connection reuse) Request sending phase |
| 1 | 0 | 0 | 1 | 1 | 1 | 100111 | (Connection reuse) Response body receiving phase |
| 1 | 0 | 0 | 1 | 1 | 0 | 100110 | (Connection reuse) Response header receiving phase |
| 1 | 0 | 0 | 1 | 0 | 0 | 100100 | (Connection reuse) Request sending phase |
Data type: floating point number
Field description: DNS resolution duration, in milliseconds. It indicates the duration from the time when a request is initiated to the time when DNS resolution is complete.
Data type: floating point number
Field description: TCP connection duration, in milliseconds. It indicates the duration from the time when DNS resolution is complete to the time when a TCP connection is established.
Data type: floating point number
Field description: TLS handshake duration, in milliseconds. It indicates the duration from the time when a TCP connection is established to the time when a TLS handshake is complete.
Data type: floating point number
Field description: request sending duration, in milliseconds. It indicates the duration from the time when all connection handshakes are complete to the time when an HTTP request starts to be sent.
Data type: floating point number
Field description: response receiving duration, in milliseconds. It indicates the duration from the time when an HTTP request starts to be sent to the time when the response header starts to be received.
Data type: floating point number
Field description: total request duration, in milliseconds. It indicates the total duration from the time when a request is initiated to the time when the response is completely received.
Data type: floating point number
Field description: redirection duration, in milliseconds. It indicates the time taken to process the redirection response.
Value type: integer
Field description: OS error code. For details, please refer to Kernel Error Codes.
Value type: integer
Field description: indicates whether IPv6 is supported. The value 0 indicates no, and 1 indicates yes.
Value type: integer
Field description: proxy handshake duration, in milliseconds. The value 0 indicates that no proxy is used.
Value type: integer
Field description: proxy status code. The value 0 indicates that no error occurs.
Value type: integer
Field description: proxy error code. The value 0 indicates that no error occurs.
Value type: string list
Field description: DNS server to be connected. The value is a list of IP addresses separated by commas (,), for example, 8.8.*.*,8.8.*.*.
Value type: string list
Field description: connected DNS server. The value is a valid IP address.
Value type: string list
Field description: DNS server that receives the response. The value is a valid IP address.
Value type: integer
Field description: DNS status code. The value 0 indicates success, 1 indicates that an IP address is available and the request is normal, 2 indicates that only the CNAME is obtained, and 3 indicates that the packet is invalid.
Value type: integer
Field description: indicates whether the DNS is from the network system cache. The value 0 indicates that the DNS is obtained from DNS server resolution, and 1 indicates that the DNS is obtained from the network system cache.
Value type: integer
Field description: DNS socket error code. The value 0 indicates that no error occurs.
Value type: integer
Field description: DNS closure error code. The value 0 indicates that no error occurs.
Value type: integer
Field description: DNS connection error code. The value 0 indicates that no error occurs.
Value type: integer
Field description: DNS receiving error code. The value 0 indicates that no error occurs.
Value type: integer
Field description: DNS sending error code. The value 0 indicates that no error occurs.
Value type: string
Field description: source address. The value is in IPv4 or IPv6 format.
Value type: string
Field description: destination address. The value is in IPv4 or IPv6 format.
Value type: integer
Field description: socket handle. The normal value is a positive integer.
Value type: integer
Field description: indicates whether the connection is reused. The value 0 indicates that a new connection is established, and 1 indicates that the connection is reused.
Value type: string list
Field description: IP address to be connected. Multiple IP addresses are separated by commas (,).
Value type: string list
Field description: port to be connected. Multiple ports are separated by commas (,).
Value type: integer
Field description: TCP connection error code. The value 0 indicates that no error occurs.
Value type: integer
Field description: SSL connection error code. The value 0 indicates that no error occurs.
Value type: string
Field description: SSL error description. If the value is empty, no error occurs. Otherwise, the specific error information is displayed.
Value type: string
Field description: last SSL receiving error If the value is empty, no error occurs. Otherwise, the specific error information is displayed.
Value type: string
Field description: last SSL handshake error If the value is empty, no error occurs. Otherwise, the specific error information is displayed.
Value type: integer
Field description: indicates whether to trust the global user certificate. The value 0 indicates no, and 1 indicates yes.
Value type: integer
Field description: indicates whether to trust the current user certificate. The value 0 indicates no, and 1 indicates yes.
Value type: integer
Field description: indicates whether to use a custom CA certificate path. The value 0 indicates no, and 1 indicates yes.
Value type: integer
Field description: indicates whether to use a custom CA certificate file. The value 0 indicates no, and 1 indicates yes.
Value type: integer
Field description: indicates whether to use custom CA binary data. The value 0 indicates no, and 1 indicates yes.
Value type: string
Field description: indicates whether to use a custom verification function. The value true indicates yes, and false indicates no.
Value type: string list
Field description: certificate issuer list, which is separated by commas (,)
Value type: long integer
Field description: number of bytes received over SSL for the last time
Value type: long integer
Field description: number of bytes sent over SSL for the last time
Value type: long integer
Field description: total number of bytes received over SSL
Value type: integer
Field description: configured connection timeout interval, in milliseconds
Value type: integer
Field description: configured transmission timeout interval, in milliseconds