A
A
Alexandre2021-09-21 19:01:08
go
Alexandre, 2021-09-21 19:01:08

Why is go-clickhouse not connecting?

I'm using clickhouse-go
in clickhouse set user and password.
Using the native client, according to the database/password/login, I connect to the remote host normally.
In golang, I use the connection string:

tcp://10.0.0.100:9000?username=default&password=123$n#aa,bb&database=mydb&debug=false

tried to do urldecode, didn't help.

the mistake itself
[516] default: Authentication failed: password is incorrect or there is no user with such name 
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x12723a80 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0xa3f52bd in /usr/bin/clickhouse
2. ? @ 0xf2aa1be in /usr/bin/clickhouse
3. DB::TCPHandler::receiveHello() @ 0xfe9977a in /usr/bin/clickhouse
4. DB::TCPHandler::runImpl() @ 0xfe9ea39 in /usr/bin/clickhouse
5. DB::TCPHandler::run() @ 0xfea0060 in /usr/bin/clickhouse
6. Poco::Net::TCPServerConnection::start() @ 0x126418ab in /usr/bin/clickhouse
7. Poco::Net::TCPServerDispatcher::run() @ 0x12641d3b in /usr/bin/clickhouse
8. Poco::PooledThread::run() @ 0x127c0866 in /usr/bin/clickhouse
9. Poco::ThreadImpl::runnableEntry(void*) @ 0x127bbc60 in /usr/bin/clickhouse
10. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
11. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so


locally the application worked, but the clickhouse was without user/password
tcp://172.17.0.100:9000?username=&password=&database=mydb&debug=false


who faced? what do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slach, 2021-11-12
@Slach

Check your user settings, through /etc/clickhouse-server/users.d/*.xml
look at `networks` and `ip`
most likely a restriction by IP or by host, host_regexp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question