# [KB]关于 TiDB 缩容 TiDB Server 后，PD 日志打印 fail to recv activity from remote, stay inactive and wait to next checking round

## Issue

1. 缩容 TiDB Server 节点 10.5.x.x:4000
2. 通过 TiDB-Dashboard –> 日志搜索，检索 PD Server 的日志，发现 PD Server 输出下面的日志信息：

```log
[proxy.go:181] ["fail to recv activity from remote,stay inactive and wait to next checking round"] [remote=10.5.x.x:10080] [interval=2s] [error="dial tcp 10.5.x.x:10080: connect: connection refused"]
```

![know-issue-tidb-scale-in-pd-failed1](/images/TiDB/know-issue-tidb-scale-in-pd-failed1.png)

## Root Cause

TiDB-Dashboard 获取 Instance 信息时会展示所有的 info，把 TTL（Time To Live） 不存在的 Instance 标记为非活跃。但是使用这个信息的地方，未判断这个非活跃标记，导致了刷日志。
Github Issue：<https://github.com/tikv/pd/issues/3612>

## Diagnostic Steps

查看 Dashboard 日志搜索中 PD 日志展示如下日志（或者直接查看 pd.log 日志）,判断日志中连接的信息是已经缩容的 TiDB Server 节点

```log
fail to recv activity from remote,stay inactive and wait to next checking round
```

## Resolution

日志输出此信息并不会对业务有任何影响。
修复 PR <https://github.com/pingcap/tidb-dashboard/pull/893>
对应 Dashboard 版本 2021.05.12.1，TiDB 集群修复版本 v4.0.13，v5.0.2，v5.1.0-alpha，v5.2.0-alpha 及以上版本，详细对应关系请查看版本对应关系

## Workaround

缩容 TiDB Server 后，主动到 `TiDB-Dashboard –> 集群信息 –> 实例` 的菜单中，找到已下线的 TiDB Server 节点，并手动删除。不会对业务有任何影响。

![know-issue-tidb-scale-in-pd-failed2](/images/TiDB/know-issue-tidb-scale-in-pd-failed2.png)