This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Websocket connect failed.
Description
WebSocket connection failed.
Possible Causes
Connection establishment failure: The server may reject the client connection, a protocol issue may cause handshake failure, or the certificate verification may fail.
Abnormal link disconnection: No normal status code is returned when the client or server is disconnected.
Abnormal header processing during the handshake phase: An error occurs during header addition.
Internal system error.
Solution
Check whether the protocol is valid and whether the certificate verification is successful. If not, reconnect.
Check whether the network is abnormal, or switch networks and reconnect.
Check whether the added headers are correct.
If the issue persists, collect complete logs and contact technical support for assistance.
Error Message
Websocket url error.
Description
The WebSocket URL is incorrect.
Possible Causes
The WebSocket URL is incorrect.
Solution
Check whether the URL is empty or does not contain the correct protocol (ws:// or wss://).
Check whether the URL length exceeds 2048 characters.
Error Message
Websocket certificate file does not exist.
Description
The WebSocket certificate is not found.
Possible Causes
The certificate path is incorrect or no certificate is configured.
Solution
Check whether the CA certificate path is valid.
If WebSocketRequestOptions.clientCert is specified, check whether the certificate path and the private key path are valid.
Error Message
Websocket connection already exists.
Description
The WebSocket connection already exists.
Possible Causes
The WebSocket connection has been established.
Solution
A WebSocket connection has already been established. There is no need to call WebSocket.connect again to establish a connection, and no other processing steps are required.
Error Message
Can't listen on the given NIC.
Description
This error code is reported if the WebSocketServer failed to perform listening on the specified NIC.
Possible Causes
The IP address in the WebSocketServer server configuration file is invalid.
Solution
Check whether the network connection is normal and whether the IP address is valid.
Error Message
Can't listen on the given Port.
Description
This error code is reported if the WebSocketServer failed to perform listening on the specified port.
Possible Causes
The port number in the WebSocketServer configuration file is invalid.
Solution
Check whether the port number is valid.
Error Message
websocket connection does not exist.
Description
The WebSocketServer connection does not exist.
Possible Causes
The WebSocketServer connection to be operated (closed or sent a message) has been disconnected or does not exist.
Solution
Check whether the connection is still valid, and re-establish the connection before performing the operation if necessary.
Error Message
Websocket port already occupied.
Description
The port on which the WebSocketServer is currently listening is already occupied.
Possible Causes
The specified listening port has been occupied by another process.
Solution
Replace the port with an idle one.
Error Message
It is not allowed to access this domain.
Description
This error code is reported if access to a certain domain is prohibited.
Possible Causes
An incorrect server domain name is configured for the atomic service.
Solution
Configure a correct server domain name for the atomic service. For details, see Configuring Server Domain Names.