question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ConsulResolver] For service location, use Node.Address if Service.Address is empy

See original GitHub issue

Describe the bug When using the ConsulResolver, if a service is registered with Consul which doesn’t have a manually specified location Address (via the related consul.d service config file) then Ambassador will not be able to route to this service.

The Consul docs state that any app (Ambassador in this case) consuming the Consul API service endpoint should use the Node.Address field location details if the Service.Address field is empty. At the moment Ambassador doesn’t do this

Example of empty Service.Address field from Consul API call:


[{"ID":"bdc9c542-5101-dfdf-8dbc-524591e8e2d0","Node":"shopfront-instance-0","Address":"10.128.0.9","Datacenter":"dc1","TaggedAddresses":{"lan":"10.128.0.9","wan":"10.128.0.9"},"NodeMeta":{"consul-network-segment":""},"ServiceKind":"","ServiceID":"shopfront","ServiceName":"shopfront","ServiceTags":["springboot"],"ServiceAddress":"","ServiceWeights":{"Passing":1,"Warning":1},"ServiceMeta":{},"ServicePort":80,"ServiceEnableTagOverride":false,"ServiceProxyDestination":"","ServiceProxy":{},"ServiceConnect":{},"CreateIndex":8409,"ModifyIndex":8409}]

To Reproduce Enable ConsulResolver within Ambassador and configure a Mapping to a Consul service that does not have the Address configuration specified.

Expected behavior If Ambassador retrieves an empty Service.Address when querying the Consul API for the service location, then Ambassador should use the location details from Node.Address.

Versions (please complete the following information):

  • Ambassador: 0.73.0 (but presumedly earlier versions, too)
  • Kubernetes environment: GKE
  • Version: 1.13.7-gke.8

Additional context Chatted about this on Datawire Internal Slack 9am EDT 24 July 2019

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jrrdevcommented, Apr 21, 2020

I believe this is still not fixed but this is quite annoying for anyone using the ConsulResolver. I will have some holidays soon, I may try to look about a fix for this issue

0reactions
lawliet89commented, Jul 3, 2021

Not stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API: Autofill Service.Address with Node.Address if ... - GitHub
Whenever the Consul API reports a ServiceAddress or Service.Address , if this value is blank/empty, default to the address of the Node ......
Read more >
Common Error Messages - Troubleshoot | Consul
Troubleshoot issues based on the error message. Common errors result from failed actions, timeouts, multiple entries, bad and expired certificates, ...
Read more >
ServiceAddress is empty when using Consul Registrator
This is what I get from querying the Consul service API (/v1/catalog/service/service1). Commands that I used to start registrator and services:
Read more >
Consul Template for transparent load balancing of containers
We are using Consul as a service discovery mechanism and Registrator to transparently register our containers there.
Read more >
Clustering Guide - RabbitMQ
RabbitMQ nodes address each other using a node name, a combination of a prefix and ... If the Windows service is used, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found