ClickHouse / clickhouse-odbc

ODBC driver for ClickHouse

Home Page:https://clickhouse.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to reload odbc-bridge without restarting the clickhouse server?

hashbash opened this issue · comments

Sometimes the connection to the remote database is lost and I have to restart the server to fix it.
How to reload odbc-bridge without restarting the clickhouse server?

default> system reload dictionary dictionaries.branch_office
[2022-03-16 22:19:21] Code: 86, e.displayText() = DB::Exception: Received error from remote server /?connection_string=DSN%3DGreenplum&max_block_size=8192. HTTP status code: 500 Internal Server Error, body: ��std::exception. Code: 1001, type: nanodbc::database_error, e.what() = ../contrib/nanodbc/nanodbc/nanodbc.cpp:1045: IM00: [unixODBC][Driver Manager]Data source name not found, and no default driver specified , (version 21.7.6.39 (official build))
root@do-ch0:/home/egg# clickhouse-server --version
ClickHouse server version 21.7.6.39 (official build).

First of all, clickhouse-odbc-bridge is a part of ClickHouse code base, so it's better to ask there: https://github.com/ClickHouse/ClickHouse/issues

How to reload odbc-bridge without restarting the clickhouse server?

Try to locate the process of clickhouse-odbc-bridge and terminate it. clickhouse-server may start another fresh one.

Sometimes the connection to the remote database is lost and I have to restart the server to fix it.

This is rather an indication of missing/misconfigured/misspelled DSN or Driver in the system/user ODBC configs, and not a problem with the bridge process:

../contrib/nanodbc/nanodbc/nanodbc.cpp:1045: IM00: [unixODBC][Driver Manager]Data source name not found, and no default driver specified