Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/349.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 获取异常表间歇性处于只读模式_Java_Clickhouse - Fatal编程技术网

Java 获取异常表间歇性处于只读模式

Java 获取异常表间歇性处于只读模式,java,clickhouse,Java,Clickhouse,在我的应用程序中,当间歇执行clickhouse插入查询时,我遇到以下异常 代码:242,e.displayText()=DB::异常:表格处于只读模式(版本19.14.6.12) 在clickhouse服务器错误日志上,在下面观察到相同的时间戳异常 0. 0x3353de0 StackTrace::StackTrace() /usr/bin/clickhouse 1. 0x66f25e8 ? /usr/bin/clickhouse 2. 0x66f2d0b Coordination::Exc

在我的应用程序中,当间歇执行clickhouse插入查询时,我遇到以下异常

代码:242,e.displayText()=DB::异常:表格处于只读模式(版本19.14.6.12)

在clickhouse服务器错误日志上,在下面观察到相同的时间戳异常


0. 0x3353de0 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x66f25e8 ? /usr/bin/clickhouse
2. 0x66f2d0b Coordination::Exception::Exception(std::string const&, int) /usr/bin/clickhouse
3. 0x6708c75 Coordination::ZooKeeper::receiveThread() /usr/bin/clickhouse
4. 0x6708dc4 ? /usr/bin/clickhouse
5. 0x338cb43 ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
6. 0x766d06f ? /usr/bin/clickhouse
7. 0x7fb7ac0f9dd5 start_thread /usr/lib64/libpthread-2.17.so
8. 0x7fb7aba1702d __clone /usr/lib64/libc-2.17.so
 (version 19.14.6.12)
2020.10.21 02:37:16.915321 [ 36 ] {} <Error> LeaderElection (/clickhouse/test_db/tables/1/test_db.manager_table/leader_election): Code: 999, e.displayText() = Coordination::Exception: Session expired (Session expired), Stack trace:

0. 0x3353de0 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x66f25e8 ? /usr/bin/clickhouse
2. 0x66f2d0b Coordination::Exception::Exception(std::string const&, int) /usr/bin/clickhouse
3. 0x6709074 Coordination::ZooKeeper::pushRequest(Coordination::ZooKeeper::RequestInfo&&) /usr/bin/clickhouse
4. 0x6709f87 Coordination::ZooKeeper::list(std::string const&, std::function<void (Coordination::ListResponse const&)>, std::function<void (Coordination::WatchResponse const&)>) /usr/bin/clickhouse
5. 0x66f8a91 zkutil::ZooKeeper::getChildrenImpl(std::string const&, std::vector<std::string, std::allocator<std::string> >&, Coordination::Stat*, std::function<void (Coordination::WatchResponse const&)>) /usr/bin/clickhouse
6. 0x66faa5c zkutil::ZooKeeper::tryGetChildren(std::string const&, std::vector<std::string, std::allocator<std::string> >&, Coordination::Stat*, std::shared_ptr<Poco::Event> const&) /usr/bin/clickhouse
7. 0x66faaea zkutil::ZooKeeper::getChildren(std::string const&, Coordination::Stat*, std::shared_ptr<Poco::Event> const&) /usr/bin/clickhouse
8. 0x6132a55 zkutil::LeaderElection::threadFunction() /usr/bin/clickhouse
9. 0x63f89f4 DB::BackgroundSchedulePoolTaskInfo::execute() /usr/bin/clickhouse
10. 0x63f95c2 DB::BackgroundSchedulePool::threadFunction() /usr/bin/clickhouse
11. 0x63f9624 ? /usr/bin/clickhouse
12. 0x338cb43 ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
13. 0x766d06f ? /usr/bin/clickhouse
14. 0x7fb7ac0f9dd5 start_thread /usr/lib64/libpthread-2.17.so
15. 0x7fb7aba1702d __clone /usr/lib64/libc-2.17.so
 (version 19.14.6.12)
clickhouse-driver version
ru.yandex.clickhouse clickhouse-jdbc 0.1.54```


**clickhouse-server version**
19.14.6

This seems zookeeper issue, for same timestamp I verified zookeeper logs as well but no error observed. Let me know how can we fix this issue.

00x3353de0 StackTrace::StackTrace()/usr/bin/clickhouse
1.0x66f25e8/usr/bin/clickhouse
2.0x66f2d0b协调::异常::异常(std::string const&,int)/usr/bin/clickhouse
3.0x6708c75协调::ZooKeeper::receiveThread()/usr/bin/clickhouse
4.0x6708dc4/usr/bin/clickhouse
5.0x338cb43线程池impl::worker(标准::_List_iterator)/usr/bin/clickhouse
6.0x766d06f/usr/bin/clickhouse
7.0x7fb7ac0f9dd5启动线程/usr/lib64/libpthread-2.17.so
8.0x7fb7aba1702d__克隆/usr/lib64/libc-2.17.so
(版本19.14.6.12)
2020.10.21 02:37:16.915321[36]{}leadersection(/clickhouse/test_db/tables/1/test_db.manager_table/leader_election):代码:999,e.displayText()=协调::异常:会话已过期(会话已过期),堆栈跟踪:
00x3353de0 StackTrace::StackTrace()/usr/bin/clickhouse
1.0x66f25e8/usr/bin/clickhouse
2.0x66f2d0b协调::异常::异常(std::string const&,int)/usr/bin/clickhouse
3.0x6709074协调::ZooKeeper::pushRequest(协调::ZooKeeper::RequestInfo&)/usr/bin/clickhouse
4.0x6709f87协调::ZooKeeper::列表(标准::字符串常量和,标准::函数,标准::函数)/usr/bin/clickhouse
5.0x66f8a91 zkutil::ZooKeeper::getChildrenImpl(std::string const&,std::vector&,Coordination::Stat*,std::function)/usr/bin/clickhouse
6.0x66faa5c zkutil::ZooKeeper::tryGetChildren(std::string const&,std::vector&,Coordination::Stat*,std::shared_ptr const&)/usr/bin/clickhouse
7.0x66faaea zkutil::ZooKeeper::getChildren(std::string const&,Coordination::Stat*,std::shared_ptr const&)/usr/bin/clickhouse
8.0x6132a55 zkutil::LeaderElection::threadFunction()/usr/bin/clickhouse
90x63f89f4 DB::BackgroundSchedulePoolTaskInfo::execute()/usr/bin/clickhouse
100x63f95c2 DB::BackgroundSchedulePool::threadFunction()/usr/bin/clickhouse
110x63f9624/usr/bin/clickhouse
120x338cb43线程池impl::worker(标准::_List_iterator)/usr/bin/clickhouse
130x766d06f/usr/bin/clickhouse
140x7fb7ac0f9dd5启动线程/usr/lib64/libpthread-2.17.so
150x7fb7aba1702d__克隆/usr/lib64/libc-2.17.so
(版本19.14.6.12)
clickhouse驱动程序版本
ru.yandex.clickhouse clickhouse jdbc 0.1.54```
**clickhouse服务器版本**
19.14.6
这似乎是zookeeper的问题,对于相同的时间戳,我也验证了zookeeper日志,但没有发现错误。让我知道我们如何解决这个问题。

19.14.6.12不受支持

这是一个ZK问题。检查所有动物园管理员

这可能是CH与ZK通信中的网络问题