
## Troubleshooting ClickHouse connectivity

URL: https://docs.atlan.com/apps/connectors/database/clickhouse/troubleshooting/troubleshooting-clickhouse-connectivity

> Resolve common ClickHouse connection issues and errors.

## Authentication failed

**Error**: `Authentication failed` or `password is incorrect` or `no user with such name`

**Cause**: The username or password provided is incorrect, or the user doesn't exist in the ClickHouse instance.

**Solution**: Verify the username and password are correct. Connect to ClickHouse directly and confirm the user can authenticate:

```sql
SELECT currentUser();
```

If the user doesn't exist, create it by following the [setup guide](https://docs.atlan.com/llms/connectors/clickhouse/set-up-clickhouse/llms.txt).

## Connection refused

**Error**: `Connection refused` or `cannot connect`

**Cause**: The ClickHouse instance isn't reachable from Atlan, or the HTTP interface isn't enabled on the specified port.

**Solution**:
- Verify the host and port are correct. ClickHouse uses port `8443` for HTTPS by default.
- Confirm that the ClickHouse HTTP interface is enabled in your ClickHouse server configuration.
- Make sure your firewall or security group rules permit inbound connections from Atlan's IP addresses on the specified port.
- For databases behind a firewall, consider using [Self-Deployed Runtime](https://docs.atlan.com/llms/connectors/clickhouse/how-atlan-connects-to-clickhouse/llms.txt).

## Insufficient privileges

**Error**: `Access denied` or `insufficient privileges`

**Cause**: The configured user doesn't have the necessary SELECT permissions on ClickHouse system tables.

**Solution**: Grant the required permissions by following the [setup guide](https://docs.atlan.com/llms/connectors/clickhouse/set-up-clickhouse/llms.txt). At a minimum, the user needs SELECT access to `system.databases`, `system.tables`, and `system.columns`.

---
