'Couldn't connect to the PD Server using `127.0.0.1` in TiDB

I have deployed a TiDB cluster for testing. When I was using PD Control, I found that I could only connect to the PD server using the local IP address, but couldn't connect to it using 127.0.0.1. I'm wondering why.



Solution 1:[1]

If your TiDB cluster is deployed using TiDB-Ansible, the PD external service port is not bound to 127.0.0.1, so PD Control won’t recognize 127.0.0.1.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Caitin Chen