Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] 使用cassandra作为后端,持久化配置后,容器重建无法完全加载

Open
#2,711 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cassandra, docker, docker-compose, java

Research direction

Reproduce the restart with the supplied Docker Compose configuration, persisted Cassandra data, and HugeGraph configuration volume. Start at GraphManager.java:456 and inspect the backend-version check; done means the rebuilt server loads both configured graphs without reporting a null data version or failing to start.

Written by the indexing model from the issue text.

Description

bug cassandra
Bug Type (问题类型)

server status (启动/运行异常)

Before submit
  • 我已经确认现有的 Issues 与 FAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
Environment (环境信息)
  • Server Version: 1.5.0
  • Backend: cassandra 4
  • OS: docker
  • Data Size: 100以内
Expected & Actual behavior (期望与实际表现)

2024-12-24 07:20:12 [main] [INFO] o.a.h.c.GraphManager - Graph 'hugegraph2' was successfully configured via './conf/graphs/hugegraph2.properties'
2024-12-24 07:20:12 [main] [INFO] o.a.h.c.GraphManager - Graph 'hugegraph' was successfully configured via './conf/graphs/hugegraph.properties'
2024-12-24 07:20:12 [main] [INFO] o.a.h.c.GraphManager - RpcServer is not enabled, skip starting rpc service
2024-12-24 07:20:12 [main] [INFO] o.a.h.c.GraphManager - RpcServer is not enabled, skip wait graphs ready
2024-12-24 07:20:12 [main] [INFO] o.a.h.c.GraphManager - Check backend version
2024-12-24 07:20:12 [main] [ERROR] o.a.h.b.s.BackendStoreInfo - The backend driver version '1.11' is inconsistent with the data version 'null' of backend store for graph 'hugegraph2'
2024-12-24 07:20:12 [main] [INFO] o.a.h.StandardHugeGraph - Close graph standardhugegraph[hugegraph]
2024-12-24 07:20:18 [main] [INFO] o.a.h.StandardHugeGraph - Close graph standardhugegraph[hugegraph2]
2024-12-24 07:20:24 [main] [ERROR] o.a.h.d.HugeGraphServer - HugeRestServer start error:
org.apache.hugegraph.backend.BackendException: The backend store version is inconsistent
at org.apache.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:456) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
at org.apache.hugegraph.core.GraphManager.init(GraphManager.java:124) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
at org.apache.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:143) ~[hugegraph-api-1.5.0.jar:0.71.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:70) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
at org.apache.hugegraph.server.RestServer.start(RestServer.java:177) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
at org.apache.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:31) ~[hugegraph-dist-1.5.0.jar:1.5.0]
at org.apache.hugegraph.dist.HugeGraphServer.(HugeGraphServer.java:61) ~[hugegraph-dist-1.5.0.jar:1.5.0]
at org.apache.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:127) ~[hugegraph-dist-1.5.0.jar:1.5.0]
2024-12-24 07:20:24 [main] [INFO] o.a.h.HugeFactory - HugeFactory shutdown
2024-12-24 07:20:24 [hugegraph-shutdown] [INFO] o.a.h.HugeFactory - HugeGraph is shutting down
t(RestServer.java:70)
at org.apache.hugegraph.server.RestServer.start(RestServer.java:177)
at org.apache.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:31)
at org.apache.hugegraph.dist.HugeGraphServer.(HugeGraphServer.java:61)
at org.apache.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:127)

Docker Compose 配置
version: "3"

services:
  server:
    image: hugegraph/hugegraph
    container_name: cas-server
    ports:
      - 8080:8080
    restart: always
    environment:
      hugegraph.gremlin.graph: org.apache.hugegraph.HugeFactory
      hugegraph.backend: cassandra
      hugegraph.serializer: cassandra
      hugegraph.cassandra.host: cas-cassandra
      hugegraph.cassandra.port: 9042
      PASSWORD: ABCD123
    volumes:
      - ./hugegraph/conf:/hugegraph-server/conf/graphs
    networks:
      - ca-network
    depends_on:
      - cassandra
    healthcheck:
      test: ["CMD", "bin/gremlin-console.sh", "--" ,"-e", "scripts/remote-connect.groovy"]
      interval: 10s
      timeout: 30s
      retries: 3

  cassandra:
    image: cassandra:4
    container_name: cas-cassandra
    ports:
      - 7000:7000
      - 9042:9042
    restart: always
    security_opt:
      - seccomp:unconfined
    volumes:
      - ./cassandra/config/cassandra.yaml:/etc/cassandra/cassandra.yaml
      - ./cassandra/data:/var/lib/cassandra
    networks:
      - ca-network
    healthcheck:
      test: ["CMD", "cqlsh", "--execute", "describe keyspaces;"]
      interval: 10s
      timeout: 30s
      retries: 5
      
  #loader:
  #  image: hugegraph/loader
  #  container_name: hugegraph_loader
  #  restart: always
  #  volumes:
  #    - /root/hugegraph/hugegraph-dataset:/loader/dataset
  #  networks:
  #    - ca-network
    
  hubble:
    image: hugegraph/hubble
    container_name: hugegraph_hubble
    ports:
      - 8088:8088
    restart: always
    networks:
      - ca-network
networks:
  ca-network:
Dominant language
Java
Stars
3.2k
Forks
640
Avg merge
3d 9h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/hugegraph

All issues in apache/hugegraph

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.