1# Socket Error Codes 2 3> **NOTE** 4> 5> The following describes only the error codes specific to the **socket** module. For details about common error codes, see [Common Error Codes](errorcode-universal.md) file. 6 7## 2301001 Operation Not Allowed 8 9**Error Message** 10 11Operation not permitted. 12 13**Description** 14 15This error code is reported if an operation is not allowed. 16 17**Cause** 18 19The operation is illegal. 20 21**Procedure** 22 23Check the operation procedure. 24 25## 2301002 File Not Exist 26 27**Error Message** 28 29No such file or directory. 30 31**Description** 32 33This error code is reported if the requested file does not exist. 34 35**Cause** 36 37The requested file does not exist. 38 39**Procedure** 40 41Check the file name or file path. 42 43## 2301003 Process Not Exist 44 45**Error Message** 46 47No such process. 48 49**Description** 50 51This error code is reported if a process does not exist. 52 53**Cause** 54 55The process does not exist. 56 57**Procedure** 58 59Check the process information. 60 61## 2301004 System Call Interrupted 62 63**Error Message** 64 65Interrupted system call. 66 67**Description** 68 69This error code is reported if the system call is interrupted. 70 71**Cause** 72 73The system call is interrupted. 74 75**Procedure** 76 77Rectify system call errors. 78 79**Description of TCP/UDP error codes:** 80> Mapping format of other TCP/UDP Socket error codes: 2301000 + Linux kernel error code (errno). For details, see Linux kernel error codes. 81 82## 2300002 System Internal Error 83 84**Error Message** 85 86System internal error. 87 88**Description** 89 90This error code is reported if a system internal error occurs. 91 92**Cause** 93 941. The memory is abnormal. 95 962. A null pointer is present. 97 98**Procedure** 99 1001. Check whether the memory space is sufficient. If not, clear the memory and try again. 101 1022. Check whether the system is normal. If not, try again later or restart the device. 103 104## 2303104 System Call Interrupted 105 106**Error Message** 107 108Interrupted system call. 109 110**Description** 111 112This error code is reported if the system call is interrupted. 113 114**Cause** 115 116Calling the **connect** function may result in a long blocking time. In such a case, the system generates an interrupt signal and returns an **EINTR** error. 117 118**Procedure** 119 120Call the **connect** function to try network connection again. 121 122## 2303109 Error File Number 123 124**Error Message** 125 126Bad file number. 127 128**Description** 129 130This error code is reported if an operation is performed on a locally closed socket. 131 132**Cause** 133 134The socket FD may be closed. 135 136**Procedure** 137 138Check whether the socket is closed unexpectedly. 139 140## 2303111 Requested Resource Temporarily Unavailable 141 142**Error Message** 143 144Resource temporarily unavailable try again. 145 146**Description** 147 148This error code is reported if the requested system resource is temporarily unavailable. 149 150**Cause** 151 152The system resources are in use. 153 154**Procedure** 155 156Try again later. 157 158## 2303188 Socket Operations on Non-Sockets 159 160**Error Message** 161 162Socket operation on non-socket. 163 164**Description** 165 166This error code is reported if a socket descriptor is not specified for the **socket** parameter. 167 168**Cause** 169 170A socket descriptor is not specified for the **socket** parameter. 171 172**Procedure** 173 174Check whether the descriptor is correctly obtained. 175 176## 2303191 Incorrect Socket Protocol Type 177 178**Error Message** 179 180Protocol wrong type for socket. 181 182**Description** 183 184This error code is reported if the type of the specified socket protocol is incorrect. 185 186**Cause** 187 188The **socket** function is called with an unsupported socket protocol type. 189For example, the protocol type cannot be set to **SOCK_STREAM socket** for the the Internet UDP protocol. 190 191**Procedure** 192 193Check whether the socket protocol type is correct. 194 195## 2303198 Network Address Already In Use 196 197**Error Message** 198 199Address already in use. 200 201**Description** 202 203This error code is reported if a network address has been used. 204 205**Cause** 206 207The probable cause can be any of the following: The application attempts to bind a socket to an IP address/port that has been used for an existing socket. The socket is not properly closed. The socket is still being closed. 208 209**Procedure** 210 211Try another network address. 212 213## 2303199 Failed to Assign the Requested Address 214 215**Error Message** 216 217Cannot assign requested address. 218 219**Description** 220 221This error code is reported if the requested address is invalid in its context. 222 223**Cause** 224 225The remote address or port is invalid for the remote server. 226 227**Procedure** 228 229Check whether the address or port is correct. 230 231## 2303210 Connection Timeout 232 233**Error Message** 234 235Connection timed out. 236 237**Description** 238 239This error code is reported if the connection to the remote server cannot be set up for a long time. 240 241**Cause** 242 243It is probable that a server breakdown has occurred. 244 245**Procedure** 246 247Contact the peer end to rectify the fault. 248 249## 2303501 Null SSL 250 251**Error Message** 252 253SSL is null. 254 255**Description** 256 257This error code is reported if the SSL is null. 258 259**Cause** 260 261The returned error information is null when an internal function fails to be executed. 262 263**Procedure** 264 265Call the function again. 266 267## 2303502 TLS Reading Error 268 269**Error Message** 270 271Error in tls reading. 272 273**Description** 274 275This error code is reported if an error occurs while reading data on the TLS socket. 276 277**Cause** 278 279The underlying socket is blocked. 280 281**Procedure** 282 283Perform data receiving again. 284 285## 2303503 TLS Writing Error 286 287**Error Message** 288 289Error in tls writing. 290 291**Description** 292 293This error code is reported if an error occurs while writing data on the TLS socket. 294 295**Cause** 296 297When the send buffer is full, the underlying socket sends an **EWOUDLBLOCK** error, which means that the server does not read the data sent from the client. 298 299**Procedure** 300 301Rectify the fault on the server side. 302 303## 2303504 x509 Failed to Look Up the x509 Certificate 304 305**Error Message** 306 307Error looking up x509. 308 309**Description** 310 311An error occurred when verifying the x509 certificate. 312 313**Cause** 314 315The local certificate does not match the server certificate. 316 317**Procedure** 318 319Check whether the local CA matches the server certificate. 320 321## 2303505 TLS System Call Error 322 323**Error Message** 324 325Error occurred in the tls system call. 326 327**Description** 328 329This error code is reported if the TLS system call fails because of fatal I/O errors. 330 331**Cause** 332 333Network communication fails because of network faults. 334 335**Procedure** 336 337For details, see the Linux kernel error codes (errno). 338 339## 2303506 Failed to Close TLS Connections 340 341**Error Message** 342 343Error clearing tls connection. 344 345**Description** 346 347This error code is reported if the TLS/SSL connection to be closed has been disabled. 348 349**Cause** 350 351The TLS/SSL connection to be closed has been disabled. 352 353**Procedure** 354 355Initiate a new TLS/SSL connection. 356