You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "shell-nlp (via GitHub)" <gi...@apache.org> on 2025/11/11 11:05:20 UTC

[I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

shell-nlp opened a new issue, #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904

   ### Bug Type (问题类型)
   
   server status (启动/运行异常)
   
   ### Before submit
   
   - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (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, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   镜像信息:
   hugegraph/hugegraph:latest
   sha256:ac50bbca0b5288e6b9cf4d67d371cbf6135916b43821715c47527bd568f275a0
   
   ```
   init hugegraph with auth mode
   Initializing HugeGraph Store...
   2025-11-11 09:36:18 [main] [WARN] o.a.h.c.HugeConfig - The config option 'arthas.telnet_port' is redundant, please ensure it has been registered
   2025-11-11 09:36:18 [main] [WARN] o.a.h.c.HugeConfig - The config option 'arthas.http_port' is redundant, please ensure it has been registered
   2025-11-11 09:36:18 [main] [WARN] o.a.h.c.HugeConfig - The config option 'arthas.disabled_commands' is redundant, please ensure it has been registered
   2025-11-11 09:36:18 [main] [INFO] o.a.h.u.ConfigUtil - Scanning option 'graphs' directory './conf/graphs'
   2025-11-11 09:36:18 [main] [INFO] o.a.h.c.InitStore - Init graph with config file: /hugegraph-server/conf/graphs/hugegraph.properties
   Exception in thread "main" java.lang.ExceptionInInitializerError
           at java.base/java.lang.Class.forName0(Native Method)
           at java.base/java.lang.Class.forName(Unknown Source)
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:63)
           at org.apache.hugegraph.cmd.InitStore.initGraph(InitStore.java:109)
           at org.apache.hugegraph.cmd.InitStore.main(InitStore.java:93)
   Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public static synchronized void jdk.internal.reflect.Reflection.registerMethodsToFilter(java.lang.Class,java.lang.String[]) accessible: module java.base does not "exports jdk.internal.reflect" to unnamed module @7cd1ac19
           at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
           at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
           at java.base/java.lang.reflect.Method.checkCanSetAccessible(Unknown Source)
           at java.base/java.lang.reflect.Method.setAccessible(Unknown Source)
           at org.apache.hugegraph.util.Reflection.registerMethodsToFilter(Reflection.java:84)
           at org.apache.hugegraph.auth.HugeFactoryAuthProxy.filterCriticalSystemClasses(HugeFactoryAuthProxy.java:488)
           at org.apache.hugegraph.auth.HugeFactoryAuthProxy.registerPrivateActions(HugeFactoryAuthProxy.java:98)
           at org.apache.hugegraph.auth.HugeFactoryAuthProxy.<clinit>(HugeFactoryAuthProxy.java:78)
           ... 5 more
   Initialization finished.
   Starting HugeGraphServer in daemon mode...
   Connecting to HugeGraphServer (http://0.0.0.0:8080/graphs).....Starting HugeGraphServer failed
   See /hugegraph-server/logs/hugegraph-server.log for HugeGraphServer log output.
   ```
   
   
   
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "shell-nlp (via GitHub)" <gi...@apache.org>.
shell-nlp closed issue #2904: [Bug] 最新版的docker 镜像启动失败
URL: https://github.com/apache/incubator-hugegraph/issues/2904


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "Tsukilc (via GitHub)" <gi...@apache.org>.
Tsukilc commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3526307767

   Thx. We’ve fixed this issue in https://github.com/apache/incubator-hugegraph/pull/2905


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3516340206

   <!-- Answer -->
   你的问题是由于 Java 11+ 的模块系统限制导致的(InaccessibleObjectException),HugeGraph 在启动时需要访问 JDK 的内部 API,但当前 Docker 镜像的启动脚本没有自动加上必要的 JVM 参数。这个参数是:
   
   ```
   --add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED
   ```
   
   你可以通过设置环境变量 `JAVA_OPTS`,让 HugeGraph 在 Docker 启动时带上这个参数。例如:
   
   ```bash
   docker run -itd --name=graph -p 8080:8080 \
     -e JAVA_OPTS="--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED" \
     hugegraph/hugegraph:latest
   ```
   
   这样可以绕过 Java 模块的访问限制,避免启动时报错。[相关说明和修复建议见此 issue](https://github.com/apache/incubator-hugegraph/issues/2879)。
   
   另外,官方建议生产环境使用具体的 release tag(如 `hugegraph/hugegraph:1.5.0`),而不是 `latest`,以保证镜像的稳定性和兼容性。[参考文档](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph/hugegraph-server.md)。
   
   如需进一步排查,可查看容器内 `/hugegraph-server/logs/hugegraph-server.log` 获取详细日志。
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ba328bc6-f89e-4de4-8339-910724415833?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=githu
 b)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2904)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "shell-nlp (via GitHub)" <gi...@apache.org>.
shell-nlp commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3516378307

   > 你遇到的启动失败,是因为设置了 `PASSWORD`(开启鉴权模式)和 `PRELOAD`(预加载样例图)后,HugeGraph 会走认证和样例数据初始化的代码路径,这些路径需要访问 JDK 的内部 API(如 `jdk.internal.reflect.Reflection.registerMethodsToFilter`),但 Java 11+ 默认禁止访问这些内部模块,导致 `InaccessibleObjectException` 抛错,容器无法正常启动。[相关源码分析](https://github.com/apache/incubator-hugegraph/blob/a53af864b31f803780a1db31cb20d3d94d5d34fc/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java#L0-L646)
   > 
   > 解决方法:在 Docker Compose 的环境变量里加上 JVM 参数,允许访问 JDK 内部 API。具体做法如下:
   > 
   > version: '3'
   > services:
   >   server:
   >     image: docker.1ms.run/hugegraph/hugegraph:latest
   >     container_name: server
   >     environment:
   >       - PASSWORD=hugegraph@2025
   >       - PRELOAD=true
   >       - JAVA_OPTS=--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED
   >     ports:
   >       - 58080:8080
   > 这样 HugeGraph 启动时就能访问需要的 JDK 内部 API,避免报错。如果你用的是生产环境,建议用官方 release tag 镜像(如 `hugegraph/hugegraph:1.5.0`),不要用 `latest`,以保证稳定性。
   > 
   > 如果还有其他报错,可以查看 `/hugegraph-server/logs/hugegraph-server.log` 获取详细信息。
   > 
   > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._
   > 
   > How did I do? [Good](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=other)  [![Chat with Dosu](https://camo.githubusercontent.com/d9ffebb979729c9ef0fc4e3090dbae5b17cabbfec8afe378ada6b81913d6ad8a/68747470733a2f2f646f73752e6465762f
 646f73752d636861742d62616467652e737667)](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=github) [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2904)
   无法解决这个问题
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "Tsukilc (via GitHub)" <gi...@apache.org>.
Tsukilc commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3526318995

   You can try pulling the latest image again
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3516354757

   <!-- Answer -->
   你遇到的启动失败,是因为设置了 `PASSWORD`(开启鉴权模式)和 `PRELOAD`(预加载样例图)后,HugeGraph 会走认证和样例数据初始化的代码路径,这些路径需要访问 JDK 的内部 API(如 `jdk.internal.reflect.Reflection.registerMethodsToFilter`),但 Java 11+ 默认禁止访问这些内部模块,导致 `InaccessibleObjectException` 抛错,容器无法正常启动。[相关源码分析](https://github.com/apache/incubator-hugegraph/blob/a53af864b31f803780a1db31cb20d3d94d5d34fc/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/HugeFactoryAuthProxy.java#L0-L646)
   
   解决方法:在 Docker Compose 的环境变量里加上 JVM 参数,允许访问 JDK 内部 API。具体做法如下:
   
   ```yml
   version: '3'
   services:
     server:
       image: docker.1ms.run/hugegraph/hugegraph:latest
       container_name: server
       environment:
         - PASSWORD=hugegraph@2025
         - PRELOAD=true
         - JAVA_OPTS=--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED
       ports:
         - 58080:8080
   ```
   
   这样 HugeGraph 启动时就能访问需要的 JDK 内部 API,避免报错。如果你用的是生产环境,建议用官方 release tag 镜像(如 `hugegraph/hugegraph:1.5.0`),不要用 `latest`,以保证稳定性。
   
   如果还有其他报错,可以查看 `/hugegraph-server/logs/hugegraph-server.log` 获取详细信息。
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b147bd55-26cd-4c71-a5ac-27d3f91de1d5?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=githu
 b)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2904)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [I] [Bug] 最新版的docker 镜像启动失败 [incubator-hugegraph]

Posted by "shell-nlp (via GitHub)" <gi...@apache.org>.
shell-nlp commented on issue #2904:
URL: https://github.com/apache/incubator-hugegraph/issues/2904#issuecomment-3516341775

   启动的docker compose 如下:
   
   ```yml
   
   version: '3'
   services:
     server:
       image: docker.1ms.run/hugegraph/hugegraph:latest
       container_name: server
       environment:
         - PASSWORD=hugegraph@2025
       #  - PASSWORD=xxx 为可选参数,设置的时候可以开启鉴权模式,并设置密码
         - PRELOAD=true
       #  - PRELOAD=true 为可选参数,为 True 时可以在启动的时候预加载一个内置的样例图
       ports:
       # swagger: http://localhost:8080/swagger-ui/index.html
         - 58080:8080
   ```
   
   我发现如果 去掉 environment的   - PASSWORD=hugegraph@2025 和   - PRELOAD=true 是正常启动的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org