hi @werkof
I have the same problem as @igghibu
My relay(s) are running inside Kubernetes and the service is exposed behind a LoadBalancer. This is a very common setup nowadays with Cloud managed Kubernetes. See the External IP and port below, this is how the relay can be reached externally.
TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
5473/TCP 13d
testnet foo-cardano-headless ClusterIP None <none> 6000/TCP 12d
testnet foo-cardano-producer ClusterIP 10.0.181.141 <none> 6000/TCP 12d
testnet foo-cardano-relay LoadBalancer 10.0.83.217 51.105.220.72 6000:31972/TCP 12d
testnet foo-redis-headless ClusterIP None <none> 6379/TCP 12d
However, this public IP (51.105.220.72) is only assigned to the relay service.
Other pods, such as topology updater bash script, or the simple curl commands have to go through standard NAT and will have a different clientIP address when they reach api.clio.one.
As you can see from the following curl command, it complains that the hostname and clientIP do not match. They cannot match. Routing is asymmetric due to how Kubernetes and Cloud providers handle the IP traffic.
$ k run -ti --restart=Never --rm -n testnet --image=curlimages/curl foo -- sh
If you don't see a command prompt, try pressing enter.
/ $ curl -s -f -4 'https://api.clio.one/htopology/v1/?port=3001&blockNo=2890699&magic=1097911063&hostname=regel-testnet.westeurope.cloudapp.azure.com'
{ "resultcode": "501", "datetime":"2021-09-06 20:27:30", "clientIp": "20.93.174.215", "msg": "invalid hostname not pointing to client IP" }
/ $ curl -s -f -4 'https://api.clio.one/htopology/v1/?port=6000&blockNo=2890699&magic=1097911063&hostname=regel-testnet.westeurope.cloudapp.azure.com'
{ "resultcode": "501", "datetime":"2021-09-06 20:27:47", "clientIp": "20.93.174.215", "msg": "invalid hostname not pointing to client IP" }
To try to resolve this issue, if I remove the hostname, then I get a “welcome to the topology” output but the clientIP registered by api.clio.one will be wrong because it does not match the relay DNS address.
curl -s -f -4 'https://api.clio.one/htopology/v1/?port=3001&blockNo=2890699&magic=1097911063'
{ "resultcode": "203", "datetime":"2021-09-06 20:00:21", "clientIp": "20.93.174.215", "iptype": 4, "msg": "welcome to the topology" }
20.93.174.215 is not the relay IP address.
I hope this clarifies the issue.
We’ve all been waiting for P2P in cardano-node but it’s not clear when it will be out, or even if it will be able to resolve the above issue.
Let me know your thoughts and please share P2P information if available.
If anyone reads this thread and is using Kubernetes to run cardano-node, please let me know how you managed the above issue.