clickhouse无法启动问题
问题描述
clickhouse在虚拟机关机之后,在启动clickhouse就启动不了,启动之后啥都不显示,日志也不报错
systemctl start clickhouse-server.service
查看clickhouse状态信息
[root@localhost ~]# systemctl status clickhouse-server.service
● clickhouse-server.service - ClickHouse Server (analytic DBMS for big data)
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since 三 2023-03-15 11:34:56 CST; 18s ago
Process: 3313 ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid (code=exited, status=232/ADDRESS_FAMILIES)
Main PID: 3313 (code=exited, status=232/ADDRESS_FAMILIES)
3月 15 11:34:56 localhost.localdomain systemd[1]: clickhouse-server.service: main process exited, code=exited, status=232/ADDRESS_FAMILIES
3月 15 11:34:56 localhost.localdomain systemd[1]: Unit clickhouse-server.service entered failed state.
3月 15 11:34:56 localhost.localdomain systemd[1]: clickhouse-server.service failed.
查看日志
[root@localhost ~]# clickhouse-server --config-file=/etc/clickhouse-server/config.xml
Processing configuration file '/etc/clickhouse-server/config.xml'.
Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = SAXParseException: Junk after document element in '/etc/clickhouse-server/config.xml', line 1079 column 1, Stack trace (when copying this message, always include the lines below):
0. Poco::XML::SAXParseException::SAXParseException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::XML::Locator const&) @ 0x1261430e in /usr/bin/clickhouse
1. Poco::XML::ParserEngine::handleError(int) @ 0x1261d62b in /usr/bin/clickhouse
2. Poco::XML::ParserEngine::parseByteInputStream(std::__1::basic_istream<char, std::__1::char_traits<char> >&) @ 0x1261b9de in /usr/bin/clickhouse
3. Poco::XML::ParserEngine::parse(Poco::XML::InputSource*) @ 0x1261b087 in /usr/bin/clickhouse
4. Poco::XML::SAXParser::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x12617389 in /usr/bin/clickhouse
5. Poco::XML::DOMBuilder::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x125fa318 in /usr/bin/clickhouse
6. Poco::XML::DOMParser::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x125f8ef3 in /usr/bin/clickhouse
7. DB::ConfigProcessor::processConfig(bool*, zkutil::ZooKeeperNodeCache*, std::__1::shared_ptr<Poco::Event> const&) @ 0x1022116e in /usr/bin/clickhouse
8. DB::ConfigProcessor::loadConfig(bool) @ 0x10223ab2 in /usr/bin/clickhouse
9. BaseDaemon::reloadConfiguration() @ 0x89afbfe in /usr/bin/clickhouse
10. BaseDaemon::initialize(Poco::Util::Application&) @ 0x89b17fe in /usr/bin/clickhouse
11. DB::Server::initialize(Poco::Util::Application&) @ 0x8868e00 in /usr/bin/clickhouse
12. Poco::Util::Application::run() @ 0x125cf046 in /usr/bin/clickhouse
13. DB::Server::run() @ 0x8868c6f in /usr/bin/clickhouse
14. mainEntryClickHouseServer(int, char**) @ 0x88678e5 in /usr/bin/clickhouse
15. main @ 0x87f1dce in /usr/bin/clickhouse
16. __libc_start_main @ 0x22555 in /usr/lib64/libc-2.17.so
17. _start @ 0x87bd06e in /usr/bin/clickhouse
(version 21.4.6.55 (official build))
问题定位
从日志来看,发现是应该配置文件解析有问题导致的,我想起来了,我之前做了jdbc桥接,在配置文件里面加了配置导致
处理办法
删除桥接文件配置
启动服务
systemctl start clickhouse-server.service
查看状态
systemctl status clickhouse-server.service
参考
https://blog.csdn.net/wulitaotao96/article/details/118355511
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步