Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul service discovery error 500 #957

Closed
Leandropintogit opened this issue Jul 8, 2019 · 3 comments · Fixed by #2067
Closed

Consul service discovery error 500 #957

Leandropintogit opened this issue Jul 8, 2019 · 3 comments · Fixed by #2067
Assignees
Labels
bug Identified as a potential bug Consul Service discovery by Consul merged Issue has been merged to dev and is waiting for the next release Service Discovery Ocelot feature: Service Discovery Spring'24 Spring 2024 release
Milestone

Comments

@Leandropintogit
Copy link

The issue #909 added a option to resolve hostname of consul node using its name, but the name of consul node is a arbitrary string and not always a valid hostname.

I created a new node on consul called services and registred my services in this node. when ocelot query for services, it binds service to services:9091 for example and off course, this fail.

Specifications

  • Version: 13.5.2
  • Platform: Linux
  • Subsystem: Docker
@raman-m
Copy link
Member

raman-m commented Sep 25, 2023

@Leandropintogit
Is this still an issue? )))
Could yoiu share route conifgs, ocelot.json plz?

The issue #909 added a option to resolve hostname of consul node using its name, but the name of consul node is a arbitrary string and not always a valid hostname.

Please share more details!

@raman-m
Copy link
Member

raman-m commented Jan 27, 2024

Duplicate of #954

@raman-m raman-m marked this as a duplicate of #954 Jan 27, 2024
@raman-m
Copy link
Member

raman-m commented Jan 27, 2024

@Leandropintogit
It will be fixed with #954

@raman-m raman-m closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2024
@raman-m raman-m reopened this May 15, 2024
@raman-m raman-m added bug Identified as a potential bug Service Discovery Ocelot feature: Service Discovery Consul Service discovery by Consul Spring'24 Spring 2024 release labels May 15, 2024
@raman-m raman-m added this to the March-April'24 milestone May 15, 2024
raman-m added a commit that referenced this issue May 27, 2024
…e discovery provider (#2067)

* Interfaces folder and namespace

* `IConsulServiceBuilder` interface vs `ConsulServiceBuilder` class

* Inject services into `ConsulServiceBuilder`

* Extend `IConsulServiceBuilder` interface

* Finalize design of the customization.
No JSON options because `ServiceDiscoveryProvider` are generalized for all types of providers

* Remove BDDfy in favor of AAA pattern

* Refactor original unit tests

* Rename to `DefaultConsulServiceBuilder`

* Update src/Ocelot.Provider.Consul/DefaultConsulServiceBuilder.cs

Update `IsValid(ServiceEntry entry)`

Co-authored-by: Raynald Messié <redbird_project@yahoo.fr>

* Code review by @RaynaldM

* Read the node instance from `ServiceEntry`.
If it is null, search for a node in the common collection.

* Refactor `OcelotBuilderExtensionsTests`

* The generic `AddConsul<TServiceBuilder>(IOcelotBuilder)` method

* Rename to `ConsulTests`

* Unit tests: 100% coverage

* Move to `ServiceDiscovery` folder

* DRY: GivenServiceEntry, GivenRoute

* Convert to file-scoped namespace

* Inherit from `Steps`

* Refactor acceptance tests

* Acceptance test for #954 user scenario

* Move "Store Configuration in Consul" to "Service Discovery"

* Feature docs

---------

Co-authored-by: Raynald Messié <redbird_project@yahoo.fr>
@raman-m raman-m self-assigned this May 27, 2024
@raman-m raman-m added the merged Issue has been merged to dev and is waiting for the next release label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identified as a potential bug Consul Service discovery by Consul merged Issue has been merged to dev and is waiting for the next release Service Discovery Ocelot feature: Service Discovery Spring'24 Spring 2024 release
Projects
None yet
2 participants