apache / apache/rocketmq

[Bug] Bug title 使用jdk17启动mqcontroller报错

Open
#10,612 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 1h
Merged PRs (30d)
27

Description

### Before Creating the Bug Report

- [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).

- [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.

- [x] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

### Runtime platform environment

本地虚拟机:centos9
java环境jdk17

### RocketMQ version

mq版本:5.5.0

### JDK Version

BellSoft jdk17

### Describe the Bug

启动mqcontroller报错
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.StackTraceElement.classLoaderName accessible: module java.base does not "opens java.lang" to unnamed module @32993f6f
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.caucho.hessian.io.JavaDeserializer.getFieldMap(JavaDeserializer.java:329)
at com.caucho.hessian.io.JavaDeserializer.(JavaDeserializer.java:97)
at com.caucho.hessian.io.StackTraceElementDeserializer.(StackTraceElementDeserializer.java:57)
at com.caucho.hessian.io.SerializerFactory.(SerializerFactory.java:589)
at org.apache.rocketmq.controller.impl.manager.ReplicasInfoManager.(ReplicasInfoManager.java:79)
at org.apache.rocketmq.controller.impl.DLedgerController.(DLedgerController.java:132)
at org.apache.rocketmq.controller.ControllerManager.initialize(ControllerManager.java:122)
at org.apache.rocketmq.controller.ControllerStartup.start(ControllerStartup.java:134)
at org.apache.rocketmq.controller.ControllerStartup.main0(ControllerStartup.java:56)
at org.apache.rocketmq.controller.ControllerStartup.main(ControllerStartup.java:49)

### Steps to Reproduce

使用bellsoft启动的mqcontroller

### What Did You Expect to See?

解决方案

### What Did You See Instead?

xx

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure when starting mqcontroller on CentOS 9 with BellSoft JDK 17 and RocketMQ 5.5.0. Trace the path from ControllerStartup.java through ControllerManager.java and DLedgerController.java to ReplicasInfoManager.java, then inspect the Hessian stack frames in JavaDeserializer.java. Done means mqcontroller starts without the reported InaccessibleObjectException under JDK 17.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.