clickhouse-client exit codes and their meaning

923 views
Skip to first unread message

Martin Sebastijan Šestak

unread,
Oct 4, 2016, 3:57:45 AM10/4/16
to ClickHouse
Good afternoon

I use clickhouse-client to import TabDelimited records into a table. What I noticed is that client sometimes works and gives exit code 0 and sometimes it gives exit code of  -1 for the same query:


cat
/blastout/an3_map | clickhouse-client --query "INSERT INTO kam.an3_map (prot_id, ps, ti, psname) FORMAT TabSeparated"

STDOUT is:
STDERR  is:
EXIT   is: -1

I can't find any errors in error log or normal log. So how to find out what happened and what does error code -1 mean?

Second: I tried to use --stacktrace option in the hope that I can understand the exit codes of clickhouse-client. However, I didn't see any extra info. So, how is
clickhouse-client --stacktrace

option meant to be used on the command line?





man...@gmail.com

unread,
Oct 4, 2016, 2:18:45 PM10/4/16
to ClickHouse
Good evening.

In case of any error, clickhouse-client should write exception message with error description; and if --stacktrace option is given, it also will write stack trace of exception (useful for developers).

If it exits and writes nothing, you should check:
- maybe clickhouse-client process get killed by another program;
- maybe it is finished after received signal.

To do that, please run it with strace:

strace -f clickhouse-client ...

and attach result of failed run here.
Reply all
Reply to author
Forward
0 new messages