I got this “dial tcp: address 2601:547:980:b3e0::677c:32774: too many colons in address” error today and would like to see if anyone could help me. More details follow.
Consul 1.8.4 and 1.6.3 
-client ::1 127.0.0.1 172.28.128.1 192.0.2.1 198.51.100.1
Registratorto register Docker containers as services to
Ansibleto configure the target machine.
The error was about TCP-checking the health of a
postgres:13 Docker container which was set up in our Ansible playbook this way:
docker_container: env: SERVICE_CHECK_TCP: "true" SERVICE_CHECK_INTERVAL: 15s SERVICE_CHECK_TIMEOUT: 1s # Other `docker_container` arguments.
- I found the PR " Ensure Consul is IPv6 compliant" but this bug was fixed as early as
1.5.2. I’m assuming what I’m encountering is not a regressional issue.
- I confirmed that the PostgreSQL container was running properly when this error happened.
- I ran
pg_isreadyto test the database connection and it reported “good”:
ywen@ywen-Precision-7510:/tmp$ pg_isready --host=2601:547:980:b3e0::677c --port=32774 2601:547:980:b3e0::677c:32774 - accepting connections
- I’m guessing that when
Registratorused the IPv6 address to register the container to
Consuland, perhaps, somehow
Consuldidn’t handle the registration properly(??) so the IPv6 address was not quoted correctly. I’m guessing so because I tried to change the
-bindargument to my IPv4 address but didn’t fix the error.
Consulstill reported health check failure with the IPv6 address as shown above.
Could someone help me? Could this be some misconfiguration somewhere I’m not aware of?
-  My project uses
1.6.3which was released in Jan 2020. I tried the latest
1.8.4today after I found this error and still got the same error.