开发者社区 > 云原生 > 云消息队列 > 正文

RocketMQ中plain_acl.yml里的全局白名单只能写ip吗?能不能写主机名?

RocketMQ中plain_acl.yml里的全局白名单只能写ip吗?能不能写主机名?我启动broker&proxy的时候会报错

java.lang.NumberFormatException: For input string: "broker"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.rocketmq.acl.plain.RemoteAddressStrategyFactory$RangeRemoteAddressStrategy.analysis(RemoteAddressStrategyFactory.java:192)
at org.apache.rocketmq.acl.plain.RemoteAddressStrategyFactory$RangeRemoteAddressStrategy.(RemoteAddressStrategyFactory.java:170)
at org.apache.rocketmq.acl.plain.RemoteAddressStrategyFactory.getRemoteAddressStrategy(RemoteAddressStrategyFactory.java:71)
at org.apache.rocketmq.acl.plain.PlainPermissionManager.load(PlainPermissionManager.java:144)
at org.apache.rocketmq.acl.plain.PlainPermissionManager.(PlainPermissionManager.java:85)
at org.apache.rocketmq.acl.plain.PlainAccessValidator.(PlainAccessValidator.java:35)
at org.apache.rocketmq.broker.BrokerController.initialAcl(BrokerController.java:971)
at org.apache.rocketmq.broker.BrokerController.recoverAndInitService(BrokerController.java:836)
at org.apache.rocketmq.broker.BrokerController.initialize(BrokerController.java:792)
at org.apache.rocketmq.broker.BrokerStartup.createBrokerController(BrokerStartup.java:240)
at org.apache.rocketmq.proxy.ProxyStartup.createBrokerController(ProxyStartup.java:229)
at org.apache.rocketmq.proxy.ProxyStartup.createMessagingProcessor(ProxyStartup.java:187)
at org.apache.rocketmq.proxy.ProxyStartup.main(ProxyStartup.java:79)

看起来是加载到了broker相关的字段,我的plain_acl.yml里包含broker的地方只有:
globalWhiteRemoteAddresses:

  • broker-a-s-0.broker-a-s.pscp-rocketmq.svc.cluster.local
  • broker-b-s-0.broker-b-s.pscp-rocketmq.svc.cluster.local我用4.9.8没有这个问题,有5.1.4有

展开
收起
真的很搞笑 2024-04-11 08:42:11 114 0
1 条回答
写回答
取消 提交回答
  • 域名不支持, 会分析是否连续的ip,或者 1.1.1.* 这种 ,此回答整理自钉群“群2-Apache RocketMQ 中国开发者钉钉群”

    2024-05-10 22:14:08
    赞同 展开评论 打赏

涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/

相关产品

  • 云消息队列 MQ
  • 相关电子书

    更多
    RocketMQ Client-GO 介绍 立即下载
    RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
    基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载