Tyk connecting to Consul on port 80

I’m trying to integrate Consul/Registrator service discovery with Tyk(via Docker). My Consul query endpoint is http://consul:8500/v1/catalog/service/payments.api, but when i try to use the Tyk API debugging to test, the tyk gateway is returning an error of “time=“Aug 15 03:27:29” level=error msg=“http: proxy error: dial tcp connect: connection refused” api_id=f822b3dfae634c82713e173042a0d082 org_id=5d510af9070fb30001952174 server_name=“” user_id=”****042a" user_ip= user_name= ".

If i try to curl the consul endpoint from the tyk gateway, it is returning the list of services correctly. But if from the Tyk dashboard, error, and getting a “There was a problem proxying the request”.

Able to advise? Thanks

Looking at error it feels like Ty successfully received data from consul and can’t connect to the upstream (

What would you advice for me to check? I configured Tyk to use consul at port 8500, but from the error, it is connecting to 80… Anything i missed? Thanks

If you can curl consul, can you post its JSON output here?

Thank you.

As I thought. As you can see is address of upstream returned by your Consul server.

This means that Tyk successfully connected to consul and received list of upstream addresses.
Issue with your upstream on address.

Thanks! Found the issue already. Apparently, my Data Path is set to “Address” but for Consul, it should be “ServiceAddress” as the ServiceAddress holds my API’s IP while Address holds the Consul’s IP. :smiley: