由于加载jar触发器时出现java.nio.file.FileAlreadyExistsException,Cassandra未启动

siotufzp  于 2022-11-23  发布在  Cassandra
关注(0)|答案(1)|浏览(173)

我尝试在Cassandra 4.1中使用触发器,但在加载jar文件时初始化失败
追踪:

cassandra_1  | INFO  [OptionalTasks:1] 2022-11-17 22:35:17,483 CustomClassLoader.java:83 - Loading new jar /etc/cassandra/triggers/cassandra-logger-0.2.jar
cassandra_1  | ERROR [OptionalTasks:1] 2022-11-17 22:35:17,488 JVMStabilityInspector.java:68 - Exception in thread Thread[OptionalTasks:1,5,OptionalTasks]
cassandra_1  | org.apache.cassandra.io.FSWriteError: java.nio.file.FileAlreadyExistsException: /tmp/lib/cassandra-0.jar
(...)
cassandra_1  | Caused by: java.nio.file.FileAlreadyExistsException: /tmp/lib/cassandra-0.jar
cassandra_1  |  at java.base/sun.nio.fs.UnixCopyFile.copy(Unknown Source)
cassandra_1  |  at java.base/sun.nio.fs.UnixFileSystemProvider.copy(Unknown Source)
cassandra_1  |  at java.base/java.nio.file.Files.copy(Unknown Source)
cassandra_1  |  at org.apache.cassandra.triggers.CustomClassLoader.addClassPath(CustomClassLoader.java:86)
cassandra_1  |  ... 22 common frames omitted
cassandra_1  | ERROR [OptionalTasks:1] 2022-11-17 22:35:17,493 DefaultFSErrorHandler.java:64 - Stopping transports as disk_failure_policy is stop
cassandra_1  | ERROR [OptionalTasks:1] 2022-11-17 22:35:17,494 StorageService.java:501 - Stopping native transport
cassandra_1  | INFO  [OptionalTasks:1] 2022-11-17 22:35:17,505 Server.java:176 - Stop listening for CQL clients
cassandra_1  | ERROR [OptionalTasks:1] 2022-11-17 22:35:17,506 StorageService.java:506 - Stopping gossiper
cassandra_1  | WARN  [OptionalTasks:1] 2022-11-17 22:35:17,507 StorageService.java:405 - Stopping gossip by operator request
cassandra_1  | INFO  [OptionalTasks:1] 2022-11-17 22:35:17,507 Gossiper.java:2087 - Announcing shutdown
cassandra_1  | INFO  [OptionalTasks:1] 2022-11-17 22:35:17,509 StorageService.java:2950 - Node /192.168.96.2:7000 state jump to shutdown
cassandra_1  | INFO  [OptionalTasks:1] 2022-11-17 22:35:17,513 StorageService.java:2950 - Node /192.168.96.2:7000 state jump to shutdown

Jar档案:https://github.com/felipead/cassandra-logger/releases/download/v0.2/cassandra-logger-0.2.jar
Docker-Compose.Yaml和Cassandra.Yaml:https://github.com/hofstede-matheus/MATB09-postgres-vs-cassandra
hms-cassandra-triggers-1.0.1.jar也会发生这种错误,所以我认为cassandra-logger-0.2.jar没有问题
已尝试使用其他.jar文件,但未成功。
先谢了

vatpfxk5

vatpfxk51#

在docker-compose.yaml中使用cassandra:3.0映像解决了这个启动问题。
我认为触发器与 cassandra 4.1版不兼容。

相关问题