【发布时间】:2020-07-08 23:58:24
【问题描述】:
我是 clickhouse 的新手,我正在尝试在我的 unbuntu 18.04 远程服务器上创建一个 clickhouse 数据库,我按照以下链接中的说明从 DEB 包安装 clickhouse:https://clickhouse.tech/docs/en/getting_started/install/#from-sources
之后,当我运行命令 clickhouse-client 时,它会显示如下内容:
root@busmap-api-test:~# clickhouse-client
ClickHouse client version 20.3.5.21 (official build)
Connecting to localhost:9000 as user default.
Code: 209. DB::NetException: Timeout exceeded while reading from socket (127.0.0.1:9000)
有人可以帮我找出问题所在以及如何解决吗? 谢谢,
【问题讨论】:
-
让我们检查一下 CH-service 是否运行:service clickhouse-server status
-
@vladimir 是的,我得到了这个:``` clickhouse-server.service - ClickHouse 服务器(用于大数据的分析 DBMS)已加载:已加载(/etc/systemd/system/clickhouse-server.service;已启用;供应商预设:已启用)活动:自 2020 年 3 月 25 日星期三 10:23:21 UTC 起活动(运行); 3 天前 Main PID: 11193 (clickhouse-serv) Tasks: 59 (limit: 1152) CGroup: /system.slice/clickhouse-server.service └─11193 /usr/bin/clickhouse-server --config=/etc/ clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid ``` –
-
如果使用远程服务器,需要定义--host选项(详见clickhouse.tech/docs/en/interfaces/cli/#command-line-options)
-
不,我的意思是我通过远程服务器上的终端在我的远程服务器上创建 clickhouse 数据库,而不是从我的本地计算机创建
-
查看日志文件:cat /var/log/clickhouse-server/clickhouse-server.err.log。检查配置文件 /etc/clickhouse-server/config.xml 并确保
127.0.0.1 未注释(更改配置后重新启动服务)。
标签: clickhouse