Skip to content

服务断联一段时间后无法重新注册 #207

@yangbocheng

Description

@yangbocheng

前置条件

现有3个服务注册。
agile server配置了超时移除服务;aspnetcore 配置了心跳15秒(见后图)

  1. aspnetcore服务的配置
  "AgileConfig": {
    "appId": "app1id",
    "secret": "123456",
    //    "nodes": "http://10.219.25.29:20003",
    "nodes": "http://localhost:12000",
    "name": "auth",
    "tag": "tag1",
    "env": "DEV",
    "serviceRegister": {
      "serviceName": "auth",
      //后台扩展赋值
      "ip": "",
      "port": "",
      "heartbeat": {
        "interval": "15"
      }
    }
  }
  1. agile server的配置
  "alwaysTrustSsl": true, // If true, the server will ignore SSL errors.
  "serviceHealthCheckInterval": 15, // 服务健康检测的间隔时间,单位:秒
  "serviceUnhealthInterval": 60, // 判断服务不健康的间隔,超出这个时间没响应过则认为不健康,默认60,单位:秒
  "removeServiceInterval": 30, // 如果一个服务超出这个时间没有响应,则直接移除这个服务,单位:秒;如果设定为 <= 0,则不会移除,默认 0 。

操作

当其中2个服务逐个处于调试模式(只要断点暂停就可以触发现象),暂停了超过30秒。
此时从agile面板看。 2个服务都在各自调试超过大约30秒后自动下线了。

但是此后,2者都无法自动重连。

Image

Image

想法

1.从直觉上看,如果启用了服务注册,从agile面板上看客户端以及服务2个菜单的数据应该是一致才对吧。现在断线2个服务后,客户端一直维持3个,服务确只有1个。
2.注册中心应该能支持断线重连行为
3.面板上 服务id和客户端id应该设计为一样

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions