[Bug] rmq.tools.logback.xml references an appender that is not defined in it, so mqadmin silently drops the Common/Store/Remoting logs
Los mantenedores suelen responder en 1 día
@iloveeyjafjalla ya está trabajando en esto.
Desde el 14/10/2026.
- #11432 de @iloveeyjafjalla — abierto
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 20/100
Línea de trabajo
The bad references are the three appender-ref entries to RocketmqBrokerAppender in tools/src/main/resources/rmq.tools.logback.xml; compare with rmq.namesrv.logback.xml around lines 94-100. Work is already under way: pull request #11432 is open against this issue, so check it before starting. If you pick this up, the fix is to point the three loggers at RocketmqToolsAppender and add a test that loads the file through JoranConfiguratorExt and asserts each logger has an appender.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Before Creating the Bug Report
- I found a bug, not just asking a question, which should be created in GitHub Discussions.
- I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
- I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
OS: any (the mqadmin tool)
RocketMQ version
branch: develop
Git commit id: a7edeecfb
JDK Version
Compiler: Temurin 1.8.0_504 (target 1.8, same as CI)
Describe the Bug
tools/src/main/resources/rmq.tools.logback.xml — the configuration the distribution installs as conf/rmq.tools.logback.xml and that mqadmin selects with -Drmq.logback.configurationFile (distribution/bin/mqadmin:45) — attaches three loggers to an appender it never defines:
<logger name="RocketmqCommon" additivity="false" level="INFO">
<appender-ref ref="RocketmqBrokerAppender"/> <!-- not defined in this file -->
</logger>
<logger name="RocketmqStore" additivity="false" level="INFO">
<appender-ref ref="RocketmqBrokerAppender"/>
</logger>
<logger name="RocketmqRemoting" additivity="false" level="INFO">
<appender-ref ref="RocketmqBrokerAppender"/>
</logger>
The appenders this file defines are DefaultAppender, RocketmqToolsAppender, RocketmqToolsAppender_inner and STDOUT; RocketmqBrokerAppender only exists in the broker and proxy configurations, and logback resolves appender-refs inside the configuration file that is being loaded, so the reference cannot be satisfied.
The consequence is user-visible and completely silent: those loggers also set additivity="false", so once their only appender-ref is dropped they are attached to no appender at all — everything logged through RocketmqCommon, RocketmqStore and RocketmqRemoting is discarded and nothing from the client/store/remoting layers reaches tools.log (or any other appender), which is exactly the diagnostic trail an operator needs when a tool misbehaves. I verified with the project's own loader (JoranConfiguratorExt, the class the runtime uses) and a status collector that this logback build reports no status message at all for the unresolved reference — no warning, no error, so the loss is not even visible in the tool's output.
The sibling configurations do this correctly, which is the pattern to keep: broker points those loggers at its own RocketmqBrokerAppender, namesrv at RocketmqNamesrvAppender (namesrv/src/main/resources/rmq.namesrv.logback.xml:94-100), proxy at its RocketmqBrokerAppender. This is the same class of mistake that was fixed in #11177 (an appender registered under a name that did not match its definition).
Steps to Reproduce
- Run any admin command, e.g.
mqadmin clusterList -n 127.0.0.1:9876(the wrapper passesconf/rmq.tools.logback.xml). - Check
${user.home}/logs/rocketmqlogs/tools.log: nothing logged byRocketmqCommon/RocketmqStore/RocketmqRemotingever appears there, and no message is printed about the dropped configuration either.
At the unit level the shipped file is loaded with the project's own JoranConfiguratorExt (common/.../logging/JoranConfiguratorExt.java, the loader that also rewrites the unshaded logback class names for the shaded runtime) into a fresh logger context: the three loggers end up with no appender, and the loader reports no error or warning for it.
What Did You Expect to See?
mqadmin starts without configuration errors, and its component loggers write to the tool's own log file — i.e. the three loggers reference RocketmqToolsAppender (the appender the file defines and that RocketmqTools already uses, writing to ${user.home}/logs/rocketmqlogs/tools.log), mirroring how each other component points those loggers at its own appender.
What Did You See Instead?
Three logback errors on every invocation and three loggers whose output is silently discarded.
Additional Context
Minimal fix: replace the three RocketmqBrokerAppender references with RocketmqToolsAppender. I checked the other shipped configurations for the same mistake: only this file references an appender it does not define (the controller file defines RocketmqControllerConsole twice, but with identical content, which logback merges harmlessly).
I will open a PR with the three-line change plus a regression test that loads the shipped rmq.tools.logback.xml through JoranConfiguratorExt and asserts the three loggers are attached to an appender (red before: RocketmqCommon must be attached to an appender).
- Lenguaje dominante
- Java
- Estrellas
- 22.7k
- Forks
- 12k
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/rocketmq
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPosiblemente ocupada @amalsaidov la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
CompressionType.of fails under the Turkish localePosiblemente ocupada @sharanggupta la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initializationAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket firstPosiblemente ocupada @iloveeyjafjalla la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/rocketmq#11441 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack testsPosiblemente ocupada @chennaji9 la tomó hace 34 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/rocketmq#11340 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/rocketmq
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
area/ai area/backend component/zeebe kind/task
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spAnser/reacharound#38 ·