java 5.0.7sdk客户端访问docker中部署的rocketmq5.3.0报错,请帮我分析问题,
topic创建结果如下:
rocketmq@c0e79cf7ce67:~/rocketmq-5.3.0/bin$ ./mqadmin updateTopic -n rmqnamesrv:9876 -c DefaultCluster -t phone-cabinet-dev -a +message.type=NORMAL
create topic to 192.168.31.234:10911 success.
TopicConfig [topicName=phone-cabinet-dev, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={+message.type=NORMAL}]
broker.conf 如下:
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 192.168.31.234
autoCreateTopicEnable = true
autoCreateSubscriptionGroup = true
enableACL = false
rmq-proxy.json 如下:
{
"rocketMQClusterName": "DefaultCluster",
"brokerIP1": "192.168.31.234",
"autoCreateTopicEnable": true,
"autoCreateSubscriptionGroup": true,
"enableACL": false
}
报错如下:
2024-08-20 15:28:22.783 INFO [34336] [RocketmqClientScheduler-0-2] [o.a.r.c.j.i.ClientManagerImpl#?:?] - Start to log statistics, clientVersion=5.0.7, clientWrapperVersion=null, clientEndpoints=ipv4:192.168.31.234:8081, os description=[Windows 10 10.0], java description=[Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 11.0.9+7-LTS], clientId=DESKTOP-3QARCJC@34336@0@16p6ukuzl2o
2024-08-20 15:28:30.973 INFO [34336] [PushConsumerImpl-1 STARTING] [o.a.r.c.j.i.c.PushConsumerImpl#?:?] - Begin to start the rocketmq push consumer, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo
2024-08-20 15:28:30.975 INFO [34336] [PushConsumerImpl-1 STARTING] [o.a.r.c.j.i.ClientImpl#?:?] - Begin to start the rocketmq client, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo
2024-08-20 15:28:30.975 INFO [34336] [ClientManagerImpl-1 STARTING] [o.a.r.c.j.i.ClientManagerImpl#?:?] - Begin to start the client manager, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo
2024-08-20 15:28:30.976 INFO [34336] [ClientManagerImpl-1 STARTING] [o.a.r.c.j.i.ClientManagerImpl#?:?] - The client manager starts successfully, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo
2024-08-20 15:28:30.976 INFO [34336] [PushConsumerImpl-1 STARTING] [o.a.r.c.j.i.ClientImpl#?:?] - Begin to fetch topic(s) route data from remote during client startup, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo, topics=[phone-cabinet-dev]
2024-08-20 15:28:31.793 INFO [34336] [RocketmqClientScheduler-0-5] [o.a.r.c.j.i.ClientImpl#?:?] - Start to update route cache for a new round, clientId=DESKTOP-3QARCJC@34336@0@16p6ukuzl2o
2024-08-20 15:28:31.981 INFO [34336] [RocketmqClientScheduler-1-10] [o.a.r.c.j.i.ClientManagerImpl#?:?] - Start to log statistics, clientVersion=5.0.7, clientWrapperVersion=null, clientEndpoints=ipv4:192.168.31.234:8081, os description=[Windows 10 10.0], java description=[Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 11.0.9+7-LTS], clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo
2024-08-20 15:28:31.981 INFO [34336] [RocketmqClientScheduler-1-10] [o.a.r.c.j.i.c.PushConsumerImpl#?:?] - clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo, consumerGroup=GID-CCD-PUSH-ATTENDANCE-PERCEIVE-IN-OUT-NOTICE, receptionTimes=0, receivedMessagesQuantity=0, consumptionOkQuantity=0, consumptionErrorQuantity=0
2024-08-20 15:28:32.897 ERROR [34336] [RocketmqClientAsyncWorker-1-17] [o.a.r.c.j.i.ClientImpl#?:?] - Failed to fetch topic route, clientId=DESKTOP-3QARCJC@34336@1@16p6ytbp7wo, 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=Tue, 20 Aug 2024 07:28:32 GMT,server=Cowboy,content-length=0)
at org.apache.rocketmq.shaded.io.grpc.Status.asRuntimeException(Status.java:539)
你是local模式吗 还是Cluster模式呢,或者我记得grpc UNIMPLEMENTED错误,好像服务端也有错误日志的,你看看proxy那边报啥错呢。此回答整理自钉群“群2-Apache RocketMQ 中国开发者钉钉群”
HTTP状态码404表示请求的资源未找到,可能是由于RocketMQ代理配置不正确导致的。
本文介绍Apache RocketMQ Java SDK的消息收发示例代码。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/