How to delete Drainer 4.0

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: drainer 4.0的如何删除,

| username: 孤独的狼

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

[root@123 tidb-data]# tiup cluster display tidb
Starting component cluster: /root/.tiup/components/cluster/v1.3.1/tiup-cluster display tidb
Cluster type: tidb
Cluster name: tidb
Cluster version: v4.0.9
SSH type: builtin
Dashboard URL:
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir alertmanager 9093/9094 linux/x86_64 inactive /tidb-data/alertmanager-9093 /tidb-deploy/alertmanager-9093 drainer 8249 linux/x86_64 Down /tidb-data/drainer-8249 /tidb-deploy/drainer-8249

I want to delete and recreate the drainer.

| username: 孤独的狼 | Original post link

Direct deployment indicates it already exists
[root@GZ006011Monitor tidb-data]# tiup cluster start tidb -R drainer -N

Starting component cluster: /root/.tiup/components/cluster/v1.3.1/tiup-cluster start tidb -R drainer -N

Starting cluster tidb…

  • [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/tidb/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/tidb/ssh/

  • [ Serial ] - StartCluster

Starting component drainer

Starting instance drainer

Error: failed to start drainer: failed to start: drainer, please check the instance’s log(/tidb-deploy/drainer-8249/log) for more detail.: timed out waiting for port 8249 to be started after 2m0s

Verbose debug logs have been written to /root/.tiup/logs/tiup-cluster-debug-2023-05-25-16-00-38.log.

Error: run /root/.tiup/components/cluster/v1.3.1/tiup-cluster (wd:/root/.tiup/data/TfFmdgE) failed: exit status 1

| username: wakaka | Original post link

Did you execute scale-in and scale-out? What error is reported when the startup times out?

| username: 孤独的狼 | Original post link

tiup cluster start tidb -R drainer -N

| username: 孤独的狼 | Original post link

I feel like this is causing it.

| username: Billmay表妹 | Original post link

You can use the tiup cluster scale-in command to remove the Drainer instance from the cluster, and then use the tiup cluster scale-out command to add the Drainer instance back.

The specific steps are as follows:

  1. Stop the Drainer instance:

    tiup cluster stop tidb --node
  2. Remove the Drainer instance:

    tiup cluster scale-in tidb --node
  3. Add the Drainer instance back:

    tiup cluster scale-out tidb /path/to/drainer-topology.yaml

    Here, /path/to/drainer-topology.yaml is the path to the topology file of the Drainer instance. You can specify the configuration information of the Drainer instance in this file, such as IP address, port number, data directory, etc.

| username: 孤独的狼 | Original post link

| username: 孤独的狼 | Original post link

I can’t find my IP, but it is installed.

| username: huhaifeng | Original post link

I see the error mentions DestDBType, could you provide the relevant drainer configuration?

| username: huhaifeng | Original post link

Of course, if you are sure you don’t need it anymore, you can choose destroy --force.
Note, this is a high-risk operation, so be cautious.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.