Troubleshooting
Installation
Cannot import GPG keys from keyserver.ubuntu.com with apt-key
The apt-key
feature with the Advanced package tool (APT) has been deprecated. Users should use the gpg
command instead. Please refer the install guide article.
Cannot import GPG keys from keyserver.ubuntu.com with gpg
- See if your
gpg
is installed:
Cannot get deb packages from ClickHouse repository with apt-get
- Check firewall settings.
- If you cannot access the repository for any reason, download packages as described in the install guide article and install them manually using the
sudo dpkg -i <packages>
command. You will also need thetzdata
package.
Cannot update deb packages from ClickHouse repository with apt-get
The issue may be happened when the GPG key is changed.
Please use the manual from the setup page to update the repository configuration.
You get different warnings with apt-get update
The completed warning messages are as one of following:
To resolve the above issue, please use the following script:
Can't get packages with Yum because of wrong signature
Possible issue: the cache is wrong, maybe it's broken after updated GPG key in 2022-09.
The solution is to clean out the cache and lib directory for Yum:
After that follow the install guide
Connecting to the server
Possible issues:
- The server is not running.
- Unexpected or wrong configuration parameters.
Server is not running
Check if server is running
If the server is not running, start it with the command:
Check the logs
The main log of clickhouse-server
is in /var/log/clickhouse-server/clickhouse-server.log
by default.
If the server started successfully, you should see the strings:
<Information> Application: starting up.
— Server started.<Information> Application: Ready for connections.
— Server is running and ready for connections.
If clickhouse-server
start failed with a configuration error, you should see the <Error>
string with an error description. For example:
If you do not see an error at the end of the file, look through the entire file starting from the string:
If you try to start a second instance of clickhouse-server
on the server, you see the following log:
See system.d logs
If you do not find any useful information in clickhouse-server
logs or there aren’t any logs, you can view system.d
logs using the command:
Start clickhouse-server in interactive mode
This command starts the server as an interactive app with standard parameters of the autostart script. In this mode clickhouse-server
prints all the event messages in the console.
Configuration parameters
Check:
-
Docker settings:
- If you run ClickHouse in Docker in an IPv6 network, make sure that
network=host
is set.
- If you run ClickHouse in Docker in an IPv6 network, make sure that
-
Endpoint settings.
- Check listen_host and tcp_port settings.
- ClickHouse server accepts localhost connections only by default.
-
HTTP protocol settings:
- Check protocol settings for the HTTP API.
-
Secure connection settings.
- Check:
- The tcp_port_secure setting.
- Settings for SSL certificates.
- Use proper parameters while connecting. For example, use the
port_secure
parameter withclickhouse_client
.
- Check:
-
User settings:
- You might be using the wrong user name or password.
Query processing
If ClickHouse is not able to process the query, it sends an error description to the client. In the clickhouse-client
you get a description of the error in the console. If you are using the HTTP interface, ClickHouse sends the error description in the response body. For example:
If you start clickhouse-client
with the stack-trace
parameter, ClickHouse returns the server stack trace with the description of an error.
You might see a message about a broken connection. In this case, you can repeat the query. If the connection breaks every time you perform the query, check the server logs for errors.
Efficiency of query processing
If you see that ClickHouse is working too slowly, you need to profile the load on the server resources and network for your queries.
You can use the clickhouse-benchmark utility to profile queries. It shows the number of queries processed per second, the number of rows processed per second, and percentiles of query processing times.