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.65k stars 518 forks source link

hugegraph0.10.4使用Cassandra作为后端存储,无法启动服务 #878

Closed CPJ-data closed 4 years ago

CPJ-data commented 4 years ago

麻烦各位大佬了,感谢...... hugegraph:0.10.4 Cassandra:3.11.5 启动:常规脚本启动 hugegraph:0.9.2可以加载Cassandra但无法创建unique约束。 报错信息:

2020-03-02 17:54:00 4569  [main] [ERROR] com.baidu.hugegraph.dist.HugeGraphServer [] - HugeRestServer start error: 
com.baidu.hugegraph.backend.BackendException: The backend store of 'hugegraph' has not been initialized
    at com.baidu.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:206) ~[hugegraph-api-0.10.4.jar:0.48.0.0]
    at com.baidu.hugegraph.core.GraphManager.<init>(GraphManager.java:76) ~[hugegraph-api-0.10.4.jar:0.48.0.0]
    at com.baidu.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:108) ~[hugegraph-api-0.10.4.jar:0.48.0.0]
    at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener.onStartup(MonitoringContainerListener.java:81) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180) ~[jersey-server-2.25.1.jar:?]
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.start(GrizzlyHttpContainer.java:357) ~[jersey-container-grizzly2-http-2.25.1.jar:?]
    at org.glassfish.grizzly.http.server.HttpHandlerChain.start(HttpHandlerChain.java:422) ~[grizzly-http-server-2.3.28.jar:2.3.28]
    at org.glassfish.grizzly.http.server.HttpServer.setupHttpHandler(HttpServer.java:314) ~[grizzly-http-server-2.3.28.jar:2.3.28]
    at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:290) ~[grizzly-http-server-2.3.28.jar:2.3.28]
    at com.baidu.hugegraph.server.RestServer.start(RestServer.java:62) ~[hugegraph-api-0.10.4.jar:0.48.0.0]
    at com.baidu.hugegraph.server.RestServer.start(RestServer.java:113) ~[hugegraph-api-0.10.4.jar:0.48.0.0]
    at com.baidu.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:58) ~[hugegraph-dist-0.10.4.jar:?]
    at com.baidu.hugegraph.dist.HugeGraphServer.<init>(HugeGraphServer.java:55) [hugegraph-dist-0.10.4.jar:?]
    at com.baidu.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:100) [hugegraph-dist-0.10.4.jar:?]
2020-03-02 17:54:00 4572  [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[]
2020-03-02 17:54:00 4573  [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[session]
2020-03-02 17:54:00 4574  [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[traversal]
2020-03-02 17:54:00 4575  [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down thread pools.
2020-03-02 17:54:00 4576  [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Executing shutdown LifeCycleHook
2020-03-02 17:54:00 4576  [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Executed once at shutdown of Gremlin Server.
2020-03-02 17:54:02 6779  [gremlin-server-stop] [INFO ] com.baidu.hugegraph.HugeGraph [] - Close graph hugegraph[hugegraph]
2020-03-02 17:54:02 6787  [gremlin-server-stop] [WARN ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Exception while closing Graph instance [hugegraph]
java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph'
    at com.google.common.base.Preconditions.checkState(Preconditions.java:199) ~[guava-19.0.jar:?]
    at com.baidu.hugegraph.util.E.checkState(E.java:68) ~[hugegraph-common-1.6.16.jar:1.6.16.0]
    at com.baidu.hugegraph.HugeGraph.close(HugeGraph.java:503) ~[hugegraph-core-0.10.4.jar:0.10.4.0]
    at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$null$7(GremlinServer.java:298) ~[gremlin-server-3.4.3.jar:3.4.3]
    at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649) ~[?:1.8.0_144]
    at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$stop$8(GremlinServer.java:295) ~[gremlin-server-3.4.3.jar:3.4.3]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
2020-03-02 17:54:02 6787  [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Closed Graph instance [hugegraph]
2020-03-02 17:54:02 6789  [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Gremlin Server - shutdown complete
Exception in thread "main" com.baidu.hugegraph.backend.BackendException: The backend store of 'hugegraph' has not been initialized
    at com.baidu.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:206)
    at com.baidu.hugegraph.core.GraphManager.<init>(GraphManager.java:76)
    at com.baidu.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:108)
    at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74)
    at org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener.onStartup(MonitoringContainerListener.java:81)
    at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.start(GrizzlyHttpContainer.java:357)
    at org.glassfish.grizzly.http.server.HttpHandlerChain.start(HttpHandlerChain.java:422)
    at org.glassfish.grizzly.http.server.HttpServer.setupHttpHandler(HttpServer.java:314)
    at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:290)
    at com.baidu.hugegraph.server.RestServer.start(RestServer.java:62)
    at com.baidu.hugegraph.server.RestServer.start(RestServer.java:113)
    at com.baidu.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:58)
    at com.baidu.hugegraph.dist.HugeGraphServer.<init>(HugeGraphServer.java:55)
    at com.baidu.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:100)
javeme commented 4 years ago

The backend store of 'hugegraph' has not been initialized

@CPJ-data 需要先初始化后端,执行init-store.sh

CPJ-data commented 4 years ago

@javeme 已初始化的,0.10.4暂时是不是无法支持Cassandra存储后端,本地和服务器启动都不行?之前有提问这个问题,你的答复是使用tool中migrate命令迁移到0.9中去?

CPJ-data commented 4 years ago

@javeme 使用migrate命令在本地tools上执行,提示要安装sudo apt install python3-migrate,是否是这么操作的,如果不是具体该怎么执行操作。使用migrate进行hugegraph迁移,是不是0.10和0.9版本只要在本地下载就可以了,还是需要下载tools中进行执行操作,在官网的tools中也没有看到具体的详情介绍。感谢

javeme commented 4 years ago

@CPJ-data 升级是指将v0.9中的数据迁移到v0.10,两个版本的服务均需要正常运行。 升级之前,v0.9中有数据的,v0.10是空的图没有数据;通过migrate升级之后,把v0.9中的数据迁移到了v0.10中,v0.10有了全部的数据,并且可以把v0.9服务关闭了。

迁移需要执行命令 bin/hugegraph migrate

tools使用介绍

解压后,进入 hugegraph-tools 目录,可以使用bin/hugegraph或者bin/hugegraph help来查看 usage 信息。主要分为:

请参考 https://hugegraph.github.io/hugegraph-doc/quickstart/hugegraph-tools.html