我在本地系统中创建了一个表: CREATE TABLE default.test_distributed(a Int8)ENGINE = Distributed(logs,default,test_remote)
并在远程系统中使用IP 10.121.21.33创建了一个表: create table test_remote(Int8)Engine = Log
然后我在本地系统中插入数据: 插入test_distributed值(1011)
然后我解雇了Select查询: select * from test_distributed
并得到以下例外: 2017.05.02 18:49:36.155606 [14] ConnectionPoolWithFailover:尝试№1时连接失败,原因:代码:210,e.displayText()= DB :: NetException:连接被拒绝:(10.121.21.33:9000),e。 what()= DB :: NetException 2017.05.02 18:49:36.155982 [14] ConnectionPoolWithFailover:尝试№2时连接失败,原因:代码:210,e.displayText()= DB :: NetException:连接被拒绝:(10.121.21.33:9000),e。 what()= DB :: NetException 2017.05.02 18:49:36.156316 [14] ConnectionPoolWithFailover:尝试№3连接失败,原因:代码:210,e.displayText()= DB :: NetException:连接被拒绝:(10.121.21.33:9000),e。 what()= DB :: NetException 2017.05.02 18:49:36.162780 [4] executeQuery:代码:279,e.displayText()= DB :: NetException:所有连接尝试都失败。经度:
代码:210,e.displayText()= DB :: NetException:拒绝连接:(10.121.21.33:9000),e.what()= DB :: NetException 代码:210,e.displayText()= DB :: NetException:拒绝连接:(10.121.21.33:9000),e.what()= DB :: NetException 代码:210,e.displayText()= DB :: NetException:连接被拒绝:(10.121.21.33:9000),e.what()= DB :: NetException
,e .what()= DB :: NetException(来自127.0.0.1:33590)(在查询中:select * from test_distributed),堆栈跟踪:
答案 0 :(得分:0)
检查本地系统上的设置
SELECT * FROM system.clusters
并检查以下文件/etc/clickhouse-server/config.xml以获取remote_servers部分
请参阅https://clickhouse.yandex/reference_en.html#Distributed了解remote_servers示例配置