内江市住房和城乡建设局网站,看房地产的app在哪看,wordpress cms主题,顺德网站制作案例价位问题
办公室有一台二手服务器#xff0c;作为平时开发测试使用。由于机器没放在机房#xff0c;会偶发断电异常断电后#xff0c;文件系统是有出问题的可能的#xff0c;尤其是一些不断在读写合并的文件春节后#xff0c;发现clickhouse启动不了#xff0c;使用systemct…问题
办公室有一台二手服务器作为平时开发测试使用。由于机器没放在机房会偶发断电异常断电后文件系统是有出问题的可能的尤其是一些不断在读写合并的文件春节后发现clickhouse启动不了使用systemctl status clickhouse-server返回如下
● 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-02-21 15:46:41 CST; 10s agoProcess: 9688 ExecStart/usr/bin/clickhouse-server --config/etc/clickhouse-server/config.xml --pid-file/run/clickhouse-server/clickhouse-server.pid (codeexited, status70)Main PID: 9688 (codeexited, status70)2月 21 15:46:41 localhost.localdomain systemd[1]: clickhouse-server.service: main process exited, codeexited, status70/n/a
2月 21 15:46:41 localhost.localdomain systemd[1]: Unit clickhouse-server.service entered failed state.
2月 21 15:46:41 localhost.localdomain systemd[1]: clickhouse-server.service failed.对于具体的报错信息还是要查看clickhouse的报错日志默认位置在/var/log/clickhouse-server/错误日志如下
2023.02.21 15:47:12.351823 [ 9848 ] {} Error system.query_thread_log (95febdac-d99a-4bdb-9431-653a75f3a34b): Detaching broken part /var/lib/clickhouse/store/95f/95febdac-d99a-4bdb-9431-653a75f3a34b/202302_390451_394084_2980 (size: 0.00 B). If it happened after update, it is likely because of backward incompability. You need to resolve this manually
2023.02.21 15:47:12.365662 [ 9787 ] {} Error Application: Caught exception while loading metadata: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() filesystem error: in directory_iterator::directory_iterator(...): Structure needs cleaning [/var/lib/clickhouse/store/95f/95febdac-d99a-4bdb-9431-653a75f3a34b/202302_390451_394023_2919/], Stack trace (when copying this message, always include the lines below):0. std::runtime_error::runtime_error(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) 0x1b4107cd in ?
1. std::__1::system_error::system_error(std::__1::error_code, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) 0x1b41a437 in ?
2. ? 0x145458c1 in /usr/bin/clickhouse
3. ? 0x1b3bf356 in /usr/bin/clickhouse
4. ? 0x1b3bd762 in /usr/bin/clickhouse
5. std::__1::__fs::filesystem::directory_iterator::directory_iterator(std::__1::__fs::filesystem::path const, std::__1::error_code*, std::__1::__fs::filesystem::directory_options) 0x1b3bd581 in /usr/bin/clickhouse
6. DB::DiskLocalDirectoryIterator::DiskLocalDirectoryIterator(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) 0x14552124 in /usr/bin/clickhouse
7. DB::DiskLocal::iterateDirectory(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) 0x145483d7 in /usr/bin/clickhouse
8. DB::MergeTreeIndexGranularityInfo::getMarksExtensionFromFilesystem(std::__1::shared_ptrDB::IDisk const, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) 0x1552dd06 in /usr/bin/clickhouse
9. DB::MergeTreeData::createPart(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, DB::MergeTreePartInfo const, std::__1::shared_ptrDB::IVolume const, std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, DB::IMergeTreeDataPart const*) const 0x1547a871 in /usr/bin/clickhouse
10. ? 0x154c98ac in /usr/bin/clickhouse
11. ThreadPoolImplThreadFromGlobalPool::worker(std::__1::__list_iteratorThreadFromGlobalPool, void*) 0xaf6546a in /usr/bin/clickhouse
12. ThreadFromGlobalPool::ThreadFromGlobalPoolvoid ThreadPoolImplThreadFromGlobalPool::scheduleImplvoid(std::__1::functionvoid (), int, std::__1::optionalunsigned long)::lambda0()(void, void ThreadPoolImplThreadFromGlobalPool::scheduleImplvoid(std::__1::functionvoid (), int, std::__1::optionalunsigned long)::lambda0()...)::lambda()::operator()() 0xaf674a4 in /usr/bin/clickhouse
13. ThreadPoolImplstd::__1::thread::worker(std::__1::__list_iteratorstd::__1::thread, void*) 0xaf62837 in /usr/bin/clickhouse
14. ? 0xaf662fd in /usr/bin/clickhouse
15. start_thread 0x7ea5 in /usr/lib64/libpthread-2.17.so
16. __clone 0xfe96d in /usr/lib64/libc-2.17.soCannot print extra info for Poco::Exception (version 22.2.2.1)
2023.02.21 15:47:12.366162 [ 9787 ] {} Information Application: Shutting down storages.
2023.02.21 15:47:12.366178 [ 9787 ] {} Information Context: Shutdown disk default
2023.02.21 15:47:12.391451 [ 9787 ] {} Debug Application: Shut down storages.
2023.02.21 15:47:13.199583 [ 9787 ] {} Debug Application: Destroyed global context.
2023.02.21 15:47:13.202239 [ 9787 ] {} Error Application: filesystem error: in directory_iterator::directory_iterator(...): Structure needs cleaning [/var/lib/clickhouse/store/95f/95febdac-d99a-4bdb-9431-653a75f3a34b/202302_390451_394023_2919/]
2023.02.21 15:47:13.202291 [ 9787 ] {} Information Application: shutting down
2023.02.21 15:47:13.202308 [ 9787 ] {} Debug Application: Uninitializing subsystem: Logging Subsystem
2023.02.21 15:47:13.203474 [ 9788 ] {} Trace BaseDaemon: Received signal -2
2023.02.21 15:47:13.203546 [ 9788 ] {} Information BaseDaemon: Stop SignalListener thread
2023.02.21 15:47:13.276203 [ 9786 ] {} Information Application: Child process exited normally with code 70.关键报错日志是这一句Error Application: filesystem error: in directory_iterator::directory_iterator(...): Structure needs cleaning [/var/lib/clickhouse/store/95f/95febdac-d99a-4bdb-9431-653a75f3a34b/202302_390451_394023_2919/]这个文件夹损坏结构需要清理
解决
百度了一堆确实能搜到解决方式牵涉到磁盘挂载、修复之类的试了下没用识别不到磁盘可能是我哪里搞错了暂时舍弃还有一个办法给文件重命名试了下使用mv old_file_name new_file_name重命名直接死机了重启服务器后我使用文件传输工具查看修改文件名竟然成功了。想了下这个损坏的文件应该不能随便移动应该使用rename虽然文件命名成功了但是clickhouse还是无法启动还是类似报错应该是clickhouse还是会使用这个文件想着怎么才能让clickhouse忽略这个文件夹试着把上面层级的文件夹95f改了下改成95f1启动服务后发现可以了 文章转载自: http://www.morning.hcwlq.cn.gov.cn.hcwlq.cn http://www.morning.gkpgj.cn.gov.cn.gkpgj.cn http://www.morning.rkzb.cn.gov.cn.rkzb.cn http://www.morning.fjntg.cn.gov.cn.fjntg.cn http://www.morning.hcbky.cn.gov.cn.hcbky.cn http://www.morning.rhkgz.cn.gov.cn.rhkgz.cn http://www.morning.tngdn.cn.gov.cn.tngdn.cn http://www.morning.rwxnn.cn.gov.cn.rwxnn.cn http://www.morning.nrcbx.cn.gov.cn.nrcbx.cn http://www.morning.gjwkl.cn.gov.cn.gjwkl.cn http://www.morning.dpfr.cn.gov.cn.dpfr.cn http://www.morning.inheatherskitchen.com.gov.cn.inheatherskitchen.com http://www.morning.rcfwr.cn.gov.cn.rcfwr.cn http://www.morning.fgsqz.cn.gov.cn.fgsqz.cn http://www.morning.touziyou.cn.gov.cn.touziyou.cn http://www.morning.ldmtq.cn.gov.cn.ldmtq.cn http://www.morning.jwrcz.cn.gov.cn.jwrcz.cn http://www.morning.sjsks.cn.gov.cn.sjsks.cn http://www.morning.cyjjp.cn.gov.cn.cyjjp.cn http://www.morning.wwdlg.cn.gov.cn.wwdlg.cn http://www.morning.pbksb.cn.gov.cn.pbksb.cn http://www.morning.whpsl.cn.gov.cn.whpsl.cn http://www.morning.zwhtr.cn.gov.cn.zwhtr.cn http://www.morning.ghphp.cn.gov.cn.ghphp.cn http://www.morning.vjdofuj.cn.gov.cn.vjdofuj.cn http://www.morning.lynmt.cn.gov.cn.lynmt.cn http://www.morning.stph.cn.gov.cn.stph.cn http://www.morning.dtcsp.cn.gov.cn.dtcsp.cn http://www.morning.zxybw.cn.gov.cn.zxybw.cn http://www.morning.rzbcz.cn.gov.cn.rzbcz.cn http://www.morning.kgfsz.cn.gov.cn.kgfsz.cn http://www.morning.tcxzn.cn.gov.cn.tcxzn.cn http://www.morning.ishoufeipin.cn.gov.cn.ishoufeipin.cn http://www.morning.yrctp.cn.gov.cn.yrctp.cn http://www.morning.pdkht.cn.gov.cn.pdkht.cn http://www.morning.drspc.cn.gov.cn.drspc.cn http://www.morning.ccyns.cn.gov.cn.ccyns.cn http://www.morning.wnjrf.cn.gov.cn.wnjrf.cn http://www.morning.ykrck.cn.gov.cn.ykrck.cn http://www.morning.xlztn.cn.gov.cn.xlztn.cn http://www.morning.wrcgy.cn.gov.cn.wrcgy.cn http://www.morning.dhmll.cn.gov.cn.dhmll.cn http://www.morning.kbntl.cn.gov.cn.kbntl.cn http://www.morning.bswhr.cn.gov.cn.bswhr.cn http://www.morning.mrttc.cn.gov.cn.mrttc.cn http://www.morning.fgqbx.cn.gov.cn.fgqbx.cn http://www.morning.rksg.cn.gov.cn.rksg.cn http://www.morning.qfths.cn.gov.cn.qfths.cn http://www.morning.zhnyj.cn.gov.cn.zhnyj.cn http://www.morning.pdwzr.cn.gov.cn.pdwzr.cn http://www.morning.lgkbn.cn.gov.cn.lgkbn.cn http://www.morning.wrtbx.cn.gov.cn.wrtbx.cn http://www.morning.xqknl.cn.gov.cn.xqknl.cn http://www.morning.cnprt.cn.gov.cn.cnprt.cn http://www.morning.sthgm.cn.gov.cn.sthgm.cn http://www.morning.phechi.com.gov.cn.phechi.com http://www.morning.mnwb.cn.gov.cn.mnwb.cn http://www.morning.fgxr.cn.gov.cn.fgxr.cn http://www.morning.ckdgj.cn.gov.cn.ckdgj.cn http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn http://www.morning.hmnhp.cn.gov.cn.hmnhp.cn http://www.morning.kbbmj.cn.gov.cn.kbbmj.cn http://www.morning.xllrf.cn.gov.cn.xllrf.cn http://www.morning.xnltz.cn.gov.cn.xnltz.cn http://www.morning.qdxkn.cn.gov.cn.qdxkn.cn http://www.morning.xgxbr.cn.gov.cn.xgxbr.cn http://www.morning.incmt.com.gov.cn.incmt.com http://www.morning.rnzgf.cn.gov.cn.rnzgf.cn http://www.morning.tsycr.cn.gov.cn.tsycr.cn http://www.morning.lwsct.cn.gov.cn.lwsct.cn http://www.morning.wmdqc.com.gov.cn.wmdqc.com http://www.morning.smhtg.cn.gov.cn.smhtg.cn http://www.morning.zbjfq.cn.gov.cn.zbjfq.cn http://www.morning.rjyd.cn.gov.cn.rjyd.cn http://www.morning.wnwjf.cn.gov.cn.wnwjf.cn http://www.morning.smtrp.cn.gov.cn.smtrp.cn http://www.morning.jfwrf.cn.gov.cn.jfwrf.cn http://www.morning.pmdlk.cn.gov.cn.pmdlk.cn http://www.morning.jklns.cn.gov.cn.jklns.cn http://www.morning.xqjh.cn.gov.cn.xqjh.cn