Skip to content

monitor's cluster config is set to failsafe and set to failsafe only. #274

Closed

Description

@isaacdong

DubboMonitorFactory创建monitor时,强制写死了monitor的cluster策略,违反了dubbo 服务配置参数获取方式。当然我知道monitor一般需要设置成failsafe,但是不排除有特殊场景需要修改(如特殊业务)。比如我在用redis registry就会创建monitor失败,因为redis不支持failsafe策略。

我认为正确的方式是读取用户配置,没有配置的情况下默认使用failsafe策略

下面是我用redis遇到的错误

2016-06-23 17:43:07,781 [DubboServerHandler-10.104.121.111:20880-thread-8] ERROR com.alibaba.dubbo.monitor.support.MonitorFilter (MonitorFilter.java:125) -  [DUBBO] Failed to monitor count service dubbo://ip:port/com.alibaba.dubbo.demo.DemoService?params&params, cause: Unsupported redis cluster: failsafe. The redis cluster only supported failover or replicate., dubbo version: 2.5.4-SNAPSHOT, current host: ip.ip.ip.ip
java.lang.IllegalArgumentException: Unsupported redis cluster: failsafe. The redis cluster only supported failover or replicate.
        at com.alibaba.dubbo.registry.redis.RedisRegistry.<init>(RedisRegistry.java:93)
        at com.alibaba.dubbo.registry.redis.RedisRegistryFactory.getRegistry(RedisRegistryFactory.java:30)
        at com.alibaba.dubbo.registry.RegistryFactory$Adpative.getRegistry(RegistryFactory$Adpative.java)
        at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:240)
        at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:60)
        at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63)
        at com.alibaba.dubbo.rpc.Protocol$Adpative.refer(Protocol$Adpative.java)
        at com.alibaba.dubbo.monitor.dubbo.DubboMonitorFactroy.createMonitor(DubboMonitorFactroy.java:60)

Activity

  1. added
    help wanted
    on Jul 19, 2018
  2. added a commit that references this issue on Feb 26, 2019
  3. added this to the 2.7.1 milestone on Mar 4, 2019
  4. changed the title [-]monitor的cluster一定是failsafe的,而且无法修改[/-] [+]monitor's cluster config is set to failsafe and set to failsafe only.[/+] on Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions