Closed JanYork closed 4 months ago
Has this issue been resolved? There is still a problem in 5.0.6
Has this issue been resolved? There is still a problem in 5.0.6
org.apache.rocketmq rocketmq-client-java 5.0.6
There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy
Has this issue been resolved? There is still a problem in 5.0.6
org.apache.rocketmq rocketmq-client-java 5.0.6
There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy
Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?
Has this issue been resolved? There is still a problem in 5.0.6
org.apache.rocketmq rocketmq-client-java 5.0.6
There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy
Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?
You can specify when you start rocket-broker that you want to start proxy, so that instead of port 9876, the default port is 8081
Has this issue been resolved? There is still a problem in 5.0.6 org.apache.rocketmq rocketmq-client-java 5.0.6
There is no problem, this is not a future bug, but my negligence, I did not start rocketmq-proxy
Understand, if I want to use this version of the client, I need to manually build the Proxy myself, right?
You can specify when you start rocket-broker that you want to start proxy, so that instead of port 9876, the default port is 8081
Got it, thanks for your reply, I'll try it
同样的问题,但是proxy没接收到消息
有人知道这是啥原因导致的吗 2024-07-17 14:40:16.128 ERROR [12116] [RocketmqClientAsyncWorker-1-15] [o.a.r.c.j.i.ClientImpl#?:?] - Failed to fetch topic route, clientId=DESKTOP-3QAXXX@12116@1@dqvj26vpdo, topic=phone-cabinet-dev org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2024-07-17 14:40:16.128 ERROR [12116] [PushConsumerImpl-1 STARTING] [o.a.r.c.j.i.c.PushConsumerImpl#?:?] - Exception raised while starting the rocketmq push consumer, clientId=DESKTOP-3QAXXX@12116@1@dqvj26vpdo java.util.concurrent.ExecutionException: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91) at org.apache.rocketmq.client.java.impl.ClientImpl.startUp(ClientImpl.java:188) at org.apache.rocketmq.client.java.impl.consumer.PushConsumerImpl.startUp(PushConsumerImpl.java:162) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Wed, 17 Jul 2024 06:40:15 GMT,server=Cowboy,content-length=0) at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ... 1 common frames omitted
I encountered a situation where, after installing using Docker, due to port conflicts, I did port mapping.
The original command was:
docker run -d \
--name rmqbroker \
--network rocketmq \
--privileged=true \
-p 10912:10912 -p 10911:10911 -p 10909:10909 \
-p 8090:8080 -p 8091:8081 \
-e "NAMESRV_ADDR=rmqnamesrv:9876" \
-v /opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf \
apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
-c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf
While debugging, I discovered that it was consistently retrieving port 8081. I created the rmq-proxy.json file on the host machine and mounted it to the container.
The configuration content is as follows:
{
"rocketMQClusterName": "DefaultCluster",
"grpcServerPort": 8091,
"remotingListenPort": 8090
}
I then modified the Docker command to:
docker run -d --restart=always \
--name rmqbroker \
--network rocketmq \
--privileged=true \
-p 10912:10912 -p 10911:10911 -p 10909:10909 \
-p 8090:8090 -p 8091:8091 \
-e "NAMESRV_ADDR=rmqnamesrv:9876" \
-v /opt/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.0/conf/broker.conf \
-v /opt/rocketmq/broker/conf/rmq-proxy.json:/home/rocketmq/rocketmq-5.3.0/conf/rmq-proxy.json \
apache/rocketmq:5.3.0 sh mqbroker --enable-proxy \
-c /home/rocketmq/rocketmq-5.3.0/conf/broker.conf
After restarting the broker container, it ran normally.
You are truly a genius. I was troubled by the client-side 404 error while everything was fine on the server side, until I followed your method to switch the port. The client started working normally, and the reason turned out to be laughably that it conflicted with the local port 8081...
Before Creating the Bug Report
[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.
[X] I have searched the GitHub Issues and GitHub 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.
Programming Language of the Client
Java
Runtime Platform Environment
Macos、JDK17
RocketMQ Version of the Client/Server
RocketMQ Server Version:5.2.0
RocketMQ Client Version:rocketmq-client-java 5.0.6
Run or Compiler Version
JDK17
Describe the Bug
Using the
rocketmq-client-java
SDK
to send message production requests toRocketMQ
, the following error occurs:Error log from
namesrv.log
:Error log from
broker remoting.log
:Error log from
broker.log
:my broker.conf info:
Steps to Reproduce
It's simple, first build a
springboot
project.use it in maven:
the ProducerSingleton class:
the MessageProducer class:
then run
main()
inMessageProducer
You will see the error after
What Did You Expect to See?
a success message
What Did You See Instead?
/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/bin/java -javaagent:/Users/muyouzhi/Applications/IntelliJ IDEA Ultimate.app/Contents/lib/idea_rt.jar=58565:/Users/muyouzhi/Applications/IntelliJ IDEA Ultimate.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/muyouzhi/Code/demo/spring/spring-demo/target/classes:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.6.13/spring-boot-starter-web-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter/2.6.13/spring-boot-starter-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot/2.6.13/spring-boot-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.6.13/spring-boot-autoconfigure-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.6.13/spring-boot-starter-logging-2.6.13.jar:/Users/muyouzhi/.m2/repository/ch/qos/logback/logback-classic/1.2.11/logback-classic-1.2.11.jar:/Users/muyouzhi/.m2/repository/ch/qos/logback/logback-core/1.2.11/logback-core-1.2.11.jar:/Users/muyouzhi/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.2/log4j-to-slf4j-2.17.2.jar:/Users/muyouzhi/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar:/Users/muyouzhi/.m2/repository/org/slf4j/jul-to-slf4j/1.7.36/jul-to-slf4j-1.7.36.jar:/Users/muyouzhi/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/muyouzhi/.m2/repository/org/yaml/snakeyaml/1.29/snakeyaml-1.29.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.6.13/spring-boot-starter-json-2.6.13.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.4.2/jackson-databind-2.13.4.2.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.4/jackson-annotations-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.4/jackson-core-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.4/jackson-datatype-jdk8-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.4/jackson-datatype-jsr310-2.13.4.jar:/Users/muyouzhi/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.4/jackson-module-parameter-names-2.13.4.jar:/Users/muyouzhi/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.6.13/spring-boot-starter-tomcat-2.6.13.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.68/tomcat-embed-core-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.68/tomcat-embed-el-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.68/tomcat-embed-websocket-9.0.68.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-web/5.3.23/spring-web-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-beans/5.3.23/spring-beans-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-webmvc/5.3.23/spring-webmvc-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-aop/5.3.23/spring-aop-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-context/5.3.23/spring-context-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-expression/5.3.23/spring-expression-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/apache/rocketmq/rocketmq-client-java/5.0.6/rocketmq-client-java-5.0.6.jar:/Users/muyouzhi/.m2/repository/org/apache/tomcat/annotations-api/6.0.53/annotations-api-6.0.53.jar:/Users/muyouzhi/.m2/repository/org/projectlombok/lombok/1.18.24/lombok-1.18.24.jar:/Users/muyouzhi/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-core/5.3.23/spring-core-5.3.23.jar:/Users/muyouzhi/.m2/repository/org/springframework/spring-jcl/5.3.23/spring-jcl-5.3.23.jar com.example.springdemo.mq.MessageProducer Exception in thread "main" java.lang.IllegalStateException: Expected the service ProducerImpl-0 [FAILED] to be RUNNING, but the service has FAILED at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService.awaitRunning(AbstractIdleService.java:165) at org.apache.rocketmq.client.java.impl.producer.ProducerBuilderImpl.build(ProducerBuilderImpl.java:93) at com.example.springdemo.mq.ProducerSingleton.buildProducer(ProducerSingleton.java:52) at com.example.springdemo.mq.ProducerSingleton.getInstance(ProducerSingleton.java:59) at com.example.springdemo.mq.MessageProducer.main(MessageProducer.java:25) Caused by: java.util.concurrent.ExecutionException: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91) at org.apache.rocketmq.client.java.impl.ClientImpl.startUp(ClientImpl.java:188) at org.apache.rocketmq.client.java.impl.producer.ProducerImpl.startUp(ProducerImpl.java:114) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) at org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.apache.rocketmq.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539) at org.apache.rocketmq.shaded.io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544) at org.apache.rocketmq.shaded.io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at org.apache.rocketmq.shaded.io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:563) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:744) at org.apache.rocketmq.shaded.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) at org.apache.rocketmq.shaded.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.rocketmq.shaded.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ... 1 more
进程已结束,退出代码为 1
Additional Context
Hey, is the
Grpc
API ofRocketMQ
available? Why do I have this problem no matter if it isgolang rocketmq sdk
orjava rocketmq sdk
ornodejs rocketmq sdk
? Why? ? ?I don't think it's a server-side problem. I tried using docker to deploy, compile the source code and run it, and use the compiled binary file to run, but this error will appear.
The strange thing is that
io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
This error should be impossible. There is no such a large message. I just transmitted a 35-byte message. Or is it a Netty serialization problem? I don't understand, why does it happen?And why is the community of this project so inactive? It seems that no one will answer my questions.