0
votes

I have created a table in my local system : CREATE TABLE default.test_distributed ( a Int8) ENGINE = Distributed(logs, default, test_remote)

and created a table in remote system with IP 10.121.21.33 : create table test_remote (a Int8) Engine=Log

and then I inserted data in my local system : insert into test_distributed values (1011)

And then I fired Select query : select * from test_distributed

And got following exception : 2017.05.02 18:49:36.155606 [ 14 ] ConnectionPoolWithFailover: Connection failed at try №1, reason: Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException 2017.05.02 18:49:36.155982 [ 14 ] ConnectionPoolWithFailover: Connection failed at try №2, reason: Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException 2017.05.02 18:49:36.156316 [ 14 ] ConnectionPoolWithFailover: Connection failed at try №3, reason: Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException 2017.05.02 18:49:36.162780 [ 4 ] executeQuery: Code: 279, e.displayText() = DB::NetException: All connection tries failed. Log:

Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException Code: 210, e.displayText() = DB::NetException: Connection refused: (10.121.21.33:9000), e.what() = DB::NetException

, e.what() = DB::NetException (from 127.0.0.1:33590) (in query: select * from test_distributed), Stack trace:

  1. clickhouse-server(StackTrace::StackTrace()+0x16) [0x17c6e76]
  2. clickhouse-server(DB::Exception::Exception(std::string const&, int)+0x1f) [0xfdd9ff]
  3. clickhouse-server(PoolWithFailoverBase::getMany(DB::Settings const*, PoolMode)+0x773) [0x17615f3]
  4. clickhouse-server(DB::ConnectionPoolWithFailover::doGetMany(DB::Settings const*, PoolMode)+0x33) [0x17617f3]
  5. clickhouse-server(DB::MultiplexedConnections::initFromShard(DB::IConnectionPool*)+0x26d) [0x19afcad]
  6. clickhouse-server(DB::MultiplexedConnections::MultiplexedConnections(DB::IConnectionPool*, DB::Settings const*, std::shared_ptr, bool, PoolMode)+0x138) [0x19b0a38]
  7. clickhouse-server(DB::RemoteBlockInputStream::createMultiplexedConnections()+0x3fb) [0x1665e8b]
  8. clickhouse-server(DB::RemoteBlockInputStream::readPrefix()+0x23) [0x166b043]
  9. clickhouse-server(DB::AsynchronousBlockInputStream::calculate(MemoryTracker*)+0x60) [0xfe8ea0]
  10. clickhouse-server(ThreadPool::worker()+0x141) [0x17d2d91]
  11. clickhouse-server() [0x33d4faf]
  12. /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f8fe38aa182]
  13. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8fe2ec530d]
1

1 Answers

0
votes

check settings on local system

SELECT * FROM system.clusters

and check following files /etc/clickhouse-server/config.xml for remote_servers section

see https://clickhouse.yandex/reference_en.html#Distributed for remote_servers example config