[Problem Encountered]:
Currently, there are three TiDB nodes, but there is no owner node, resulting in the inability to execute DDL. How can I select an owner node?
The situation that caused this problem was that the owner node tidb-tidb-1 crashed. Since it is a stateless service, I restarted it, but it still couldn’t select an owner.
curl -X POST http://10.20.186.225:10080/ddl/owner/resign
This node is not a ddl owner, can't be resigned./ # curl -X POST http://10.20.186.225:10080/ddl/owner/resign
curl: (28) Failed to connect to 10.20.186.225 port 10080 after 131920 ms: Operation timed out
According to the official documentation, there is another method:
/tmp/tidb-community-server-v5.4.0-linux-amd64 # ./tidb-ctl etcd delowner 7fe29d0d-1376-49f3-918f-37f6e8057c9d
control the info about etcd by grpc_gateway
Usage:
tidb-ctl etcd [command]
Available Commands:
ddlinfo Show All Information about DDL
delkey Delete the key associated with DDL by `delkey [key]`
putkey [ONLY FOR TEST!] put a key in the path of TiDB schema versions by `putkey [key] [value]`
Flags:
-h, --help help for etcd
Global Flags:
--ca string TLS CA path
--host ip TiDB server host (default 127.0.0.1)
--pdhost ip PD server host (default 127.0.0.1)
--pdport uint16 PD server port (default 2379)
--port uint16 TiDB server port (default 10080)
--ssl-cert string TLS Cert path
--ssl-key string TLS Key path
Use "tidb-ctl etcd [command] --help" for more information about a command.
subcommand is required
Could it be that the document is incorrect?
Do we need to delete the etcd key to automatically select the owner?