Query exception codes
On the Queries page, ADQM Control allows filtering queries by predefined sets of possible query execution errors that you can select on the Presets tab of the filter in the Exception code column.
Syntax Processing
Errors in a query text or in the structure of the abstract syntax tree (AST).
| Exception code | Exception |
|---|---|
6 |
CANNOT_PARSE_TEXT |
62 |
SYNTAX_ERROR |
80 |
INCORRECT_QUERY |
211 |
EMPTY_QUERY |
417 |
EXPECTED_ALL_OR_ANY |
558 |
EXPECTED_ALL_OR_DISTINCT |
| Exception code | Exception |
|---|---|
37 |
UNKNOWN_ELEMENT_IN_AST |
167 |
TOO_DEEP_AST |
168 |
TOO_BIG_AST |
229 |
QUERY_IS_TOO_LARGE |
| Exception code | Exception |
|---|---|
38 |
CANNOT_PARSE_DATE |
41 |
CANNOT_PARSE_DATETIME |
72 |
CANNOT_PARSE_NUMBER |
376 |
CANNOT_PARSE_UUID |
675/676 |
CANNOT_PARSE_IPV4/IPV6 |
Semantics
Semantic errors in a query, such as:
-
reference to an object (column, table, database) that does not exist in the current context;
-
incorrect use of a function (for example, if a function does not exist, incorrect arguments are passed, or an aggregate function is called in the context where aggregation is not possible);
-
incorrect use of a data type (for example, if you try to assign a non-existent data type or perform an operation between values of different types that cannot be converted automatically);
-
errors when using JOIN (for example, a join key is specified incorrectly, or unsupported JOIN type is used) or set operators.
| Exception code | Exception |
|---|---|
16 |
NO_SUCH_COLUMN_IN_TABLE |
47 |
UNKNOWN_IDENTIFIER |
60 |
UNKNOWN_TABLE |
81 |
UNKNOWN_DATABASE |
174 |
CYCLIC_ALIASES |
207 |
AMBIGUOUS_IDENTIFIER |
352 |
AMBIGUOUS_COLUMN_NAME |
| Exception code | Exception |
|---|---|
36 |
BAD_ARGUMENTS |
42 |
NUMBER_OF_ARGUMENTS_DOESNT_MATCH |
46 |
UNKNOWN_FUNCTION |
63 |
UNKNOWN_AGGREGATE_FUNCTION |
184 |
ILLEGAL_AGGREGATION |
527 |
NO_SUITABLE_FUNCTION_IMPLEMENTATION |
| Exception code | Exception |
|---|---|
50 |
UNKNOWN_TYPE |
53 |
TYPE_MISMATCH |
70 |
CANNOT_CONVERT_TYPE |
321 |
VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE |
386 |
NO_COMMON_TYPE |
| Exception code | Exception |
|---|---|
121 |
UNSUPPORTED_JOIN_KEYS |
162 |
TOO_DEEP_SUBQUERIES |
264 |
INCOMPATIBLE_TYPE_OF_JOIN |
418 |
UNKNOWN_JOIN |
596 |
INTERSECT_OR_EXCEPT_RESULT_STRUCTURES_MISMATCH |
Runtime Operations
Errors in arithmetic calculations and runtime operations, for example:
-
attempt to insert a NULL value into a non-Nullable column;
-
regular expression cannot be processed;
-
low-level errors during execution of user-defined functions (UDF).
| Exception code | Exception |
|---|---|
153 |
ILLEGAL_DIVISION |
407 |
DECIMAL_OVERFLOW |
503 |
AGGREGATE_FUNCTION_THROW |
| Exception code | Exception |
|---|---|
349 |
CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN |
427 |
CANNOT_COMPILE_REGEXP |
447 |
HYPERSCAN_CANNOT_SCAN_TEXT |
754 |
UDF_EXECUTION_FAILED |
Resource Governing
Query performance and resource usage issues, such as:
-
a query or background process requires more RAM than allowed;
-
there is not enough disk space to execute a query;
-
a query is taking too long to execute, or its execution time exceeds the specified limit;
-
a query should process too much data (a large number of rows/bytes, data parts, partitions, etc.), which may lead to system slowdowns and overloads;
-
the maximum allowed number of simultaneous queries or connections has been reached.
| Exception code | Exception |
|---|---|
173 |
CANNOT_ALLOCATE_MEMORY |
241 |
MEMORY_LIMIT_EXCEEDED |
243 |
NOT_ENOUGH_SPACE |
| Exception code | Exception |
|---|---|
159 |
TIMEOUT_EXCEEDED |
160 |
TOO_SLOW |
| Exception code | Exception |
|---|---|
158 |
TOO_MANY_ROWS |
252 |
TOO_MANY_PARTS |
307 |
TOO_MANY_BYTES |
396 |
TOO_MANY_ROWS_OR_BYTES |
565 |
TOO_MANY_PARTITIONS |
692 |
TOO_MANY_MUTATIONS |
| Exception code | Exception |
|---|---|
201 |
QUOTA_EXCEEDED |
202 |
TOO_MANY_SIMULTANEOUS_QUERIES |
203 |
NO_FREE_CONNECTION |
745 |
SERVER_OVERLOADED |
749 |
TCP_CONNECTION_LIMIT_REACHED |
Filesystem
Issues related to accessing files and directories in the file system, for example:
-
when executing a query, data cannot be read, written, or found in a file;
-
a file/directory does not exist or already exists.
| Exception code | Exception |
|---|---|
3 |
UNEXPECTED_END_OF_FILE |
32 |
ATTEMPT_TO_READ_AFTER_EOF |
33 |
CANNOT_READ_ALL_DATA |
74/75 |
CANNOT_READ/WRITE_TO_FILE_DESCRIPTOR |
87 |
CANNOT_SEEK_THROUGH_FILE |
294 |
CANNOT_WRITE_TO_FILE |
| Exception code | Exception |
|---|---|
76 |
CANNOT_OPEN_FILE |
83/84 |
DIRECTORY_DOESNT_EXIST/ALREADY_EXISTS |
107 |
FILE_DOESNT_EXIST |
172 |
CANNOT_CREATE_DIRECTORY |
504 |
FILE_ALREADY_EXISTS |
521 |
ATOMIC_RENAME_FAIL |
| Exception code | Exception |
|---|---|
204 |
CANNOT_FSYNC |
274/275 |
AIO_READ/WRITE_ERROR |
400 |
CANNOT_STAT |
678/679 |
IO_URING_INIT_FAILED/SUBMIT_ERROR |
Data Health
Problems related to the integrity, structure, or format of data that may occur when inserting, updating, or reading data.
| Exception code | Exception |
|---|---|
40 |
CHECKSUM_DOESNT_MATCH |
117 |
INCORRECT_DATA |
246 |
CORRUPTED_DATA |
740 |
POTENTIALLY_BROKEN_DATA_PART |
| Exception code | Exception |
|---|---|
7 |
INCORRECT_NUMBER_OF_COLUMNS |
9 |
SIZES_OF_COLUMNS_DOESNT_MATCH |
91 |
SIZES_OF_MARKS_FILES_ARE_INCONSISTENT |
366 |
SIZES_OF_NESTED_COLUMNS_ARE_INCONSISTENT |
Data Shaping
Errors related to compression algorithms and formats applied to data.
| Exception code | Exception |
|---|---|
89 |
UNKNOWN_COMPRESSION_METHOD |
270 |
CANNOT_COMPRESS |
271 |
CANNOT_DECOMPRESS |
354/355 |
ZLIB_INFLATE/DEFLATE_FAILED |
448/449 |
BROTLI_READ/WRITE_FAILED |
553/554 |
LZMA_STREAM_ENCODER/DECODER_FAILED |
560/561 |
ZSTD_ENCODER/DECODER_FAILED |
617/618 |
LZ4_ENCODER/DECODER_FAILED |
638/639 |
SNAPPY_UNCOMPRESS/COMPRESS_FAILED |
| Exception code | Exception |
|---|---|
73 |
UNKNOWN_FORMAT |
85 |
FORMAT_IS_NOT_SUITABLE_FOR_INPUT |
715 |
CANNOT_DETECT_FORMAT |
| Exception code | Exception |
|---|---|
434 |
CANNOT_PARSE_PROTOBUF_SCHEMA |
436 |
PROTOBUF_BAD_CAST |
622 |
CANNOT_PARSE_CAPN_PROTO_SCHEMA |
723 |
PARQUET_EXCEPTION |
748 |
AVRO_EXCEPTION |
Networking
Problems with network connections, for example:
-
a client is unable to connect to the server;
-
a connection cannot be established, or data cannot be transferred in time;
-
IP address cannot be found by the host name;
-
a client is trying to connect to the ClickHouse server using an incorrect port or protocol.
| Exception code | Exception |
|---|---|
95/96 |
CANNOT_READ/WRITE_TO_SOCKET |
198 |
DNS_ERROR |
209 |
SOCKET_TIMEOUT |
210 |
NETWORK_ERROR |
279 |
ALL_CONNECTION_TRIES_FAILED |
| Exception code | Exception |
|---|---|
99–102 |
UNEXPECTED/UNKNOWN PACKET FROM CLIENT/SERVER |
217 |
CLIENT_HAS_CONNECTED_TO_WRONG_PORT |
902 |
PROTOCOL_VERSION_MISMATCH |
Distributed Execution
Problems with the coordination service, replication, or distributed query execution.
| Exception code | Exception |
|---|---|
225 |
NO_ZOOKEEPER |
244 |
UNEXPECTED_ZOOKEEPER_ERROR |
308 |
UNEXPECTED_NODE_IN_ZOOKEEPER |
568 |
RAFT_ERROR |
999 |
KEEPER_EXCEPTION |
| Exception code | Exception |
|---|---|
251 |
NO_SUCH_REPLICA |
254 |
NO_ACTIVE_REPLICAS |
369 |
ALL_REPLICAS_ARE_STALE |
415 |
ALL_REPLICAS_LOST |
529 |
NOT_A_LEADER |
571 |
DATABASE_REPLICATION_FAILED |
| Exception code | Exception |
|---|---|
285 |
TOO_FEW_LIVE_REPLICAS |
286 |
UNSATISFIED_QUORUM_FOR_PREVIOUS_WRITE |
289 |
REPLICA_IS_NOT_IN_QUORUM |
| Exception code | Exception |
|---|---|
297 |
SHARD_HAS_NO_CONNECTIONS |
519 |
NO_REMOTE_SHARD_AVAILABLE |
574 |
DISTRIBUTED_TOO_MANY_PENDING_BYTES |
581 |
TOO_LARGE_DISTRIBUTED_DEPTH |
Core Storage
Errors related to the management of data parts, execution of background processes, or metadata.
| Exception code | Exception |
|---|---|
226/227 |
NO_FILE_IN/UNEXPECTED_FILE_IN_DATA_PART |
232 |
NO_SUCH_DATA_PART |
235 |
DUPLICATE_DATA_PART |
| Exception code | Exception |
|---|---|
238 |
FORMAT_VERSION_TOO_OLD |
342 |
METADATA_MISMATCH |
345 |
TABLE_DIFFERS_TOO_MUCH |
741 |
TABLE_UUID_MISMATCH |
| Exception code | Exception |
|---|---|
384 |
PART_IS_TEMPORARILY_LOCKED |
388 |
CANNOT_ASSIGN_OPTIMIZE |
389 |
INSERT_WAS_DEDUPLICATED |
450 |
BAD_TTL_EXPRESSION |
System Governance
Errors that may occur when performing DDL operations (creating databases and tables), working with dictionaries, or setting configuration parameters (for example, if an invalid configuration parameter is set, or the server is unable to process its configuration files).
| Exception code | Exception |
|---|---|
57 |
TABLE_ALREADY_EXISTS |
82 |
DATABASE_ALREADY_EXISTS |
219 |
DATABASE_NOT_EMPTY |
517 |
CANNOT_ASSIGN_ALTER |
524 |
ALTER_OF_COLUMN_IS_FORBIDDEN |
609 |
FUNCTION_ALREADY_EXISTS |
| Exception code | Exception |
|---|---|
115 |
UNKNOWN_SETTING |
137 |
UNKNOWN_ELEMENT_IN_CONFIG |
318 |
INVALID_CONFIG_PARAMETER |
347 |
CANNOT_LOAD_CONFIG |
452 |
SETTING_CONSTRAINT_VIOLATION |
472 |
READONLY_SETTING |
| Exception code | Exception |
|---|---|
156 |
DICTIONARIES_WAS_NOT_LOADED |
387 |
DICTIONARY_ALREADY_EXISTS |
489 |
INCORRECT_DICTIONARY_DEFINITION |
Access Control
Authentication, authorization, and encryption issues, such as:
-
an unknown user or invalid user password is specified;
-
user credentials are out of date;
-
access to the server from the specified IP address is denied;
-
a user does not have permission to access a database/table.
| Exception code | Exception |
|---|---|
192 |
UNKNOWN_USER |
193 |
WRONG_PASSWORD |
195 |
IP_ADDRESS_NOT_ALLOWED |
516 |
AUTHENTICATION_FAILED |
532 |
LDAP_ERROR |
576 |
KERBEROS_ERROR |
720 |
USER_EXPIRED |
| Exception code | Exception |
|---|---|
164 |
READONLY |
291 |
DATABASE_ACCESS_DENIED |
497 |
ACCESS_DENIED |
509 |
INVALID_GRANT |
511 |
UNKNOWN_ROLE |
| Exception code | Exception |
|---|---|
454 |
OPENSSL_ERROR |
592 |
DATA_ENCRYPTION_ERROR |
761 |
ACME_ERROR |
Integrations
Issues related to integrations with external data sources.
| Exception code | Exception |
|---|---|
499 |
S3_ERROR |
500 |
AZURE_BLOB_STORAGE_ERROR |
693 |
AWS_ERROR |
707 |
GCP_ERROR |
737 |
GOOGLE_CLOUD_ERROR |
| Exception code | Exception |
|---|---|
538 |
MYSQL_SYNTAX_ERROR |
614 |
POSTGRESQL_CONNECTION_FAILURE |
484 |
INTERNAL_REDIS_ERROR |
634 |
MONGODB_ERROR |
750–753 |
ARROWFLIGHT_* |
| Exception code | Exception |
|---|---|
530 |
CANNOT_CONNECT_RABBITMQ |
660 |
HDFS_ERROR |
665 |
CANNOT_CONNECT_NATS |
| Exception code | Exception |
|---|---|
640 |
NO_HIVEMETASTORE |
742 |
DELTA_KERNEL_ERROR |
743 |
ICEBERG_SPECIFICATION_VIOLATION |
Features
Errors related to ADQM/ClickHouse features such as data backup and recovery, projections, query caching, transactions, and machine learning.
| Exception code | Exception |
|---|---|
598 |
BACKUP_ALREADY_EXISTS |
599 |
BACKUP_NOT_FOUND |
601 |
BACKUP_DAMAGED |
654 |
WRONG_BACKUP_SETTINGS |
| Exception code | Exception |
|---|---|
582 |
NO_SUCH_PROJECTION_IN_TABLE |
583 |
ILLEGAL_PROJECTION |
713 |
BROKEN_PROJECTION |
| Exception code | Exception |
|---|---|
704 |
QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS |
719 |
QUERY_CACHE_USED_WITH_SYSTEM_TABLE |
| Exception code | Exception |
|---|---|
649 |
INVALID_TRANSACTION |
659 |
UNKNOWN_STATUS_OF_TRANSACTION |
| Exception code | Exception |
|---|---|
382/383 |
CANNOT_LOAD/APPLY_CATBOOST_MODEL |
System Errors
Low-level issues related to the operating system or internal states, and general exceptions.
| Exception code | Exception |
|---|---|
1 |
UNSUPPORTED_METHOD |
48 |
NOT_IMPLEMENTED |
49 |
LOGICAL_ERROR |
269 |
INFINITE_LOOP |
668 |
INVALID_STATE |
| Exception code | Exception |
|---|---|
114 |
CANNOT_CLOCK_GETTIME |
239/240 |
CANNOT_MUNMAP/MREMAP |
299 |
CANNOT_FORK |
411 |
PTHREAD_ERROR |
425 |
SYSTEM_ERROR |
445 |
CANNOT_MPROTECT |
459 |
CANNOT_SET_THREAD_PRIORITY |
| Exception code | Exception |
|---|---|
236 |
ABORTED |
394 |
QUERY_WAS_CANCELLED |
677 |
THREAD_WAS_CANCELED |
1000 |
POCO_EXCEPTION |
1001 |
STD_EXCEPTION |
1002 |
UNKNOWN_EXCEPTION |