Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] docker挂载数据目录时,启动失败 #2298

Closed
1 task done
justbejyk opened this issue Aug 26, 2023 · 3 comments
Closed
1 task done

[Question] docker挂载数据目录时,启动失败 #2298

justbejyk opened this issue Aug 26, 2023 · 3 comments
Labels

Comments

@justbejyk
Copy link

justbejyk commented Aug 26, 2023

Problem Type (问题类型)

server status (启动/运行异常)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: RocksDB x nodes, SSD
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: xx vertices, xx edges

docker挂载数据目录时,启动失败

使用docker的方式时,使用的是rocksdb,但是只要一将rockdb数据目录一挂载,就会启动失败,日志如下
执行命令如下:
版本1.0.0
docker run -itd --name graph -v pwd/graph-data:/hugegraph/rocksdb-data -p 8085:8080 hugegraph/hugegraph

2023-08-26 08:37:32 [main] [INFO] o.a.h.s.RestServer - RestServer starting...
2023-08-26 08:37:48 [main] [INFO] o.a.h.u.ConfigUtil - Scanning option 'graphs' directory './conf/graphs'
2023-08-26 08:37:52 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStore - Opening RocksDB with data path: rocksdb-data/m
2023-08-26 08:37:53 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStore - Failed to open RocksDB 'rocksdb-data/m' with database 'hugegraph', try to init CF later
2023-08-26 08:37:53 [main] [INFO] o.a.h.b.c.CacheManager - Init RamCache for 'schema-id-hugegraph' with capacity 10000
2023-08-26 08:37:53 [main] [INFO] o.a.h.b.c.CacheManager - Init RamCache for 'schema-name-hugegraph' with capacity 10000
2023-08-26 08:37:53 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStore - Opening RocksDB with data path: rocksdb-data/s
2023-08-26 08:38:04 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStore - Opening RocksDB with data path: rocksdb-data/g
2023-08-26 08:38:04 [main] [INFO] o.c.o.l.Uns - OHC using JNA OS native malloc/free
2023-08-26 08:38:05 [main] [INFO] o.a.h.b.c.CacheManager - Init LevelCache for 'vertex-hugegraph' with capacity 10000:10000000
2023-08-26 08:38:05 [main] [INFO] o.a.h.b.c.CacheManager - Init LevelCache for 'edge-hugegraph' with capacity 1000:1000000
2023-08-26 08:38:05 [main] [INFO] o.a.h.b.c.CacheManager - Init RamCache for 'users-hugegraph' with capacity 10240
2023-08-26 08:38:05 [main] [INFO] o.a.h.b.c.CacheManager - Init RamCache for 'users_pwd-hugegraph' with capacity 10240
2023-08-26 08:38:05 [main] [INFO] o.a.h.b.c.CacheManager - Init RamCache for 'token-hugegraph' with capacity 10240
2023-08-26 08:38:05 [main] [INFO] o.a.h.c.GraphManager - Graph 'hugegraph' was successfully configured via './conf/graphs/hugegraph.properties'
2023-08-26 08:38:05 [main] [INFO] o.a.h.r.RpcServer - RpcServer config is empty, skip starting RpcServer
2023-08-26 08:38:07 [main] [INFO] o.a.h.c.GraphManager - Check backend version
2023-08-26 08:38:07 [main] [INFO] o.a.h.StandardHugeGraph - Close graph standardhugegraph[hugegraph]
2023-08-26 08:38:07 [main] [INFO] o.a.h.r.RpcServer - RpcServer stop on port 8091
2023-08-26 08:38:07 [main] [ERROR] o.a.h.d.HugeGraphServer - HugeRestServer start error:
org.apache.hugegraph.backend.BackendException: The backend store of 'hugegraph' has not been initialized
at org.apache.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:448) ~[hugegraph-api-1.0.0.jar:0.69.0.0]
at org.apache.hugegraph.core.GraphManager.init(GraphManager.java:124) ~[hugegraph-api-1.0.0.jar:0.69.0.0]
at org.apache.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:129) ~[hugegraph-api-1.0.0.jar:0.69.0.0]
at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:49) ~[jersey-server-3.0.3.jar:?]
at org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener.onStartup(MonitoringContainerListener.java:56) ~[jersey-server-3.0.3.jar:?]
at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:711) ~[jersey-server-3.0.3.jar:?]
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.start(GrizzlyHttpContainer.java:330) ~[jersey-container-grizzly2-http-3.0.3.jar:?]
at org.glassfish.grizzly.http.server.HttpHandlerChain.start(HttpHandlerChain.java:376) ~[grizzly-http-server-3.0.1.jar:3.0.1]
at org.glassfish.grizzly.http.server.HttpServer.setupHttpHandler(HttpServer.java:268) ~[grizzly-http-server-3.0.1.jar:3.0.1]
at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:245) ~[grizzly-http-server-3.0.1.jar:3.0.1]
at org.apache.hugegraph.server.RestServer.start(RestServer.java:71) ~[hugegraph-api-1.0.0.jar:0.69.0.0]
at org.apache.hugegraph.server.RestServer.start(RestServer.java:178) ~[hugegraph-api-1.0.0.jar:0.69.0.0]
at org.apache.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:32) ~[hugegraph-dist-1.0.0.jar:1.0.0]
at org.apache.hugegraph.dist.HugeGraphServer.(HugeGraphServer.java:60) ~[hugegraph-dist-1.0.0.jar:1.0.0]
at org.apache.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:120) ~[hugegraph-dist-1.0.0.jar:1.0.0]
2023-08-26 08:38:07 [main] [INFO] o.a.h.HugeFactory - HugeFactory shutdown
2023-08-26 08:38:09 [SOFA-RPC-ShutdownHook] [WARN] c.a.s.r.c.RpcRuntimeContext - SOFA RPC Framework catch JVM shutdown event, Run shutdown hook now.
2023-08-26 08:38:09 [hugegraph-shutdown] [INFO] o.a.h.HugeFactory - HugeGraph is shutting down

Vertex/Edge example (问题点 / 边数据举例)

No response

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

No response

@justbejyk justbejyk changed the title [Question] describe your problem [Question] docker挂载数据目录时,启动失败 Aug 26, 2023
@imbajin
Copy link
Member

imbajin commented Aug 26, 2023

Thanks for your feedback, @aroundabout could take a look for it?

@imbajin imbajin moved this to 🆕 New in HugeGraph Tasks Aug 26, 2023
@aroundabout
Copy link
Contributor

If you want to make it work as soon as possible, please try:

  1. docker volume create graph_data
  2. docker run -itd --name graph -v graph_data:/hugegraph/rocksdb-data -p 18080:8080 hugegraph/hugegraph
  3. echo curl -o /dev/null -s -w %{http_code} "http://localhost:18080/graphs/hugegraph/graph/vertices"
  4. If return 200, it works.
  5. You can find the data at /var/lib/docker/volumes/graph_data/_data

The problem is caused by the inappropriate timing to init-store. It will be fix soon.

@imbajin imbajin moved this from 🆕 New to 🏗 In progress in HugeGraph Tasks Aug 28, 2023
@github-actions
Copy link

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants