apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.64k stars 517 forks source link

使用 scylladb 作为存储启动失败 #1287

Closed JamCh01 closed 3 years ago

JamCh01 commented 3 years ago

Expected behavior 期望表现

能成功启动 hugegraph

Actual behavior 实际表现

./init-store.sh 失败

Steps to reproduce the problem 复现步骤

  1. docker run -d -p 8080:8080 -p 8088:8088 hugegraph:local
  2. docer exec -it nervous_brattain bash
  3. cd hugegraph-server/bin/
  4. ./init-store.sh

Status of loaded data 数据状态

init-store.sh 输出

root@50d1045449ab:~/hugegraph-server/bin# ./init-store.sh
Initing HugeGraph Store...
2020-12-03 18:07:29 738   [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Init graph with config file: conf/hugegraph.properties
2020-12-03 18:07:29 800   [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Opening backend store 'scylladb' for graph 'hugegraph'
2020-12-03 18:07:30 1170  [main] [WARN ] com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to close cluster after an error
    at com.baidu.hugegraph.backend.store.cassandra.CassandraSessionPool.doClose(CassandraSessionPool.java:123) ~[hugegraph-cassandra-0.10.4.jar:?]
    at com.baidu.hugegraph.backend.store.BackendSessionPool.close(BackendSessionPool.java:140) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.store.cassandra.CassandraStore.open(CassandraStore.java:154) [hugegraph-cassandra-0.10.4.jar:?]
    at com.baidu.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:73) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:30) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.tx.SchemaTransaction.<init>(SchemaTransaction.java:69) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.cache.CachedSchemaTransaction.<init>(CachedSchemaTransaction.java:53) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph.openSchemaTransaction(HugeGraph.java:258) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph.access$700(HugeGraph.java:80) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.getOrNewTransaction(HugeGraph.java:768) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.schemaTransaction(HugeGraph.java:747) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.access$000(HugeGraph.java:622) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.HugeGraph.schemaTransaction(HugeGraph.java:320) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.store.BackendStoreSystemInfo.exists(BackendStoreSystemInfo.java:88) [hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.cmd.InitStore.initGraph(InitStore.java:99) [hugegraph-dist-0.10.4.jar:?]
    at com.baidu.hugegraph.cmd.InitStore.main(InitStore.java:87) [hugegraph-dist-0.10.4.jar:?]
2020-12-03 18:07:30 1174  [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Close graph hugegraph[hugegraph]
2020-12-03 18:07:30 1211  [task-db-worker-1] [WARN ] com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to close cluster after an error
    at com.baidu.hugegraph.backend.store.cassandra.CassandraSessionPool.doClose(CassandraSessionPool.java:123) ~[hugegraph-cassandra-0.10.4.jar:?]
    at com.baidu.hugegraph.backend.store.BackendSessionPool.close(BackendSessionPool.java:140) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.store.cassandra.CassandraStore.open(CassandraStore.java:154) ~[hugegraph-cassandra-0.10.4.jar:?]
    at com.baidu.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:73) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:30) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.backend.tx.GraphTransaction.<init>(GraphTransaction.java:120) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.task.TaskScheduler$TaskTransaction.<init>(TaskScheduler.java:428) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.task.TaskScheduler.tx(TaskScheduler.java:115) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at com.baidu.hugegraph.task.TaskScheduler.lambda$close$4(TaskScheduler.java:221) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
Exception in thread "main" com.baidu.hugegraph.exception.ConnectionException: Failed to connect to Cassandra
    at com.baidu.hugegraph.backend.store.cassandra.CassandraStore.open(CassandraStore.java:158)
    at com.baidu.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:73)
    at com.baidu.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:30)
    at com.baidu.hugegraph.backend.tx.SchemaTransaction.<init>(SchemaTransaction.java:69)
    at com.baidu.hugegraph.backend.cache.CachedSchemaTransaction.<init>(CachedSchemaTransaction.java:53)
    at com.baidu.hugegraph.HugeGraph.openSchemaTransaction(HugeGraph.java:258)
    at com.baidu.hugegraph.HugeGraph.access$700(HugeGraph.java:80)
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.getOrNewTransaction(HugeGraph.java:768)
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.schemaTransaction(HugeGraph.java:747)
    at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.access$000(HugeGraph.java:622)
    at com.baidu.hugegraph.HugeGraph.schemaTransaction(HugeGraph.java:320)
    at com.baidu.hugegraph.backend.store.BackendStoreSystemInfo.exists(BackendStoreSystemInfo.java:88)
    at com.baidu.hugegraph.cmd.InitStore.initGraph(InitStore.java:99)
    at com.baidu.hugegraph.cmd.InitStore.main(InitStore.java:87)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at com.datastax.driver.core.NettyUtil.newEventLoopGroupInstance(NettyUtil.java:136)
    at com.datastax.driver.core.NettyOptions.eventLoopGroup(NettyOptions.java:99)
    at com.datastax.driver.core.Connection$Factory.<init>(Connection.java:774)
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1446)
    at com.datastax.driver.core.Cluster.init(Cluster.java:159)
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:330)
    at com.datastax.driver.core.Cluster.connect(Cluster.java:280)
    at com.baidu.hugegraph.backend.store.cassandra.CassandraSessionPool$Session.open(CassandraSessionPool.java:215)
    at com.baidu.hugegraph.backend.store.cassandra.CassandraStore.open(CassandraStore.java:142)
    ... 13 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.datastax.driver.core.NettyUtil.newEventLoopGroupInstance(NettyUtil.java:134)
    ... 21 more
Caused by: java.lang.NoSuchMethodError: io.netty.util.concurrent.SingleThreadEventExecutor.<init>(Lio/netty/util/concurrent/EventExecutorGroup;Ljava/util/concurrent/Executor;ZLjava/util/Queue;Lio/netty/util/concurrent/RejectedExecutionHandler;)V
    at io.netty.channel.SingleThreadEventLoop.<init>(SingleThreadEventLoop.java:65)
    at io.netty.channel.epoll.EpollEventLoop.<init>(EpollEventLoop.java:87)
    at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:143)
    at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:35)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
    at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
    at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:104)
    at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:91)
    at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:68)
    ... 26 more

backend=scylladb
serializer=scylladb

store=hugegraph

# cassandra backend config
cassandra.host=*.*.*.*
cassandra.port=9042
cassandra.username=root
cassandra.password=***
#cassandra.connect_timeout=5
#cassandra.read_timeout=20
#cassandra.keyspace.strategy=SimpleStrategy
#cassandra.keyspace.replication=3

Vertex/Edge summary 数据量

Vertex/Edge example 数据示例

{type something here...}

Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构

{type something here...}

Specifications of environment 环境信息

JamCh01 commented 3 years ago

1067 的解决方案并不奏效

Linary commented 3 years ago

@JamCh01 这个还是netty包冲突,请把netty-transport-native-epoll换成4.1.36,其他netty包换成4.1.42试试。

JamCh01 commented 3 years ago

docker 中的有关 netty 的项目有

-rw-r--r-- 1 501 staff 3.8M Dec  9  2019 hbase-shaded-netty-2.1.0.jar
-rw-r--r-- 1 501 staff 3.9M Dec  9  2019 netty-all-4.1.42.Final.jar
-rw-r--r-- 1 501 staff 275K Dec  9  2019 netty-buffer-4.1.36.Final.jar
-rw-r--r-- 1 501 staff 145K Dec  9  2019 netty-codec-4.0.44.Final.jar
-rw-r--r-- 1 501 staff 585K Dec  9  2019 netty-common-4.1.36.Final.jar
-rw-r--r-- 1 501 staff 315K Dec  9  2019 netty-handler-4.0.44.Final.jar
-rw-r--r-- 1 501 staff  33K Dec  9  2019 netty-resolver-4.1.36.Final.jar
-rw-r--r-- 1 501 staff 461K Dec  9  2019 netty-transport-4.1.36.Final.jar
-rw-r--r-- 1 501 staff 139K Dec  9  2019 netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar
-rw-r--r-- 1 501 staff  33K Dec  9  2019 netty-transport-native-unix-common-4.1.36.Final.jar

您所给出的解决方式是否是:

  1. 将 netty-transport-native-epoll 更换为 netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar
  2. 将其他 netty 更换为 4.1.42?

但:

  1. 目前的 netty-transport-native-epoll 版本确认为 4.1.36
JamCh01 commented 3 years ago

十分感谢~已经可以正常运行了,记录一下修复的过程

  1. 备份当前 lib
  2. 下载 4.1.42.Final 版本 https://bintray.com/netty/downloads/netty/4.1.42.Final#files
  3. 替换 netty 相关 jar 文件