-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Service discovery and "PollConsul" type: ServicesAreEmptyError #1634
Comments
Hello please check the following issue. Try "Consul" instead of "PollConsul" |
Is it still urgent? 🤣 |
@ggnaegi Hi Guillaume! If @Danimatar0 has used this configuration sample: "ServiceDiscoveryProvider": {
"Host": "localhost",
"Port": 8500,
"Type": "PollConsul", // WRONG !!!
"PollingInterval": 100
} But it is wrong! I believe it should be: "ServiceDiscoveryProvider": {
"Host": "localhost",
"Port": 8500,
"Type": "Consul", // CORRECT !!!
"PollingInterval": 100
} What do you think? |
@raman-m Hi Raman In my case, short interval polling was too chatty, there are some issues there if your consul.json file is big with several routes. The references to the consul services are not stored as singletons. So, as soon, as you are querying new routes, then the gateway will try to retrieve the service addresses... For one address, ok, but then, it's the explosion... |
Wow! That will be awesome! 💟 It seems it will not be easy to resolve all these merge conflicts...
OR I can add you to Ocelot Core team 😉 and you will have ability to create feature branches inside of Ocelot repo directly!
Oh, no! 😢 |
Yeah, sure, I would love to be part of the team :-) I don't have much time until wednesday, but I will prepare something next week. As for the performance issues, they should be addressed in my forked repo. |
Sorry, I've double checked, and I cannot add you to the team because I have no rights to manage the repo. Guillaume, I advise you to start by resolving merge conflicts first if you are only going to use your repo. Waiting a good news from you about your contribution! |
Hello @raman-m |
@Danimatar0 |
…ements and fix errors (#1670) * fixing some issues in poll consul: - Timer is not thread safe, avoiding usage of it - No Ressources are returned for first call - Using a providers pool, instead of creating a new provider instance * line endings * adding some test cases * Using a lock instead of SemaphoreSlim * Improve code readability * CA2211: Non-constant fields should not be visible * Use IOcelotLogger to remove warnings & messages of static code analysis (aka IDE0052) * Fix errors with unit tests discovery. Remove legacy life hacks of discovering tests on .NET Core * Update unit tests * Also refactoring the kubernetes provider factory (like consul and eureka) * shorten references... * const before... * Some minor fixes, using Equals Ordinal ignore case and a string constant for provider type definition instead of string litterals. Fixing usings. * waiting a bit longer then? * @RaynaldM code review * renaming PollKubernetes to PollKube * ... odd... * ... very odd, we have an issue with configuration update duration... * IDE0002: Name can be simplified * All tests passing locally, hopefully it works online * just a bit of cleanup * Some missing braces and commas * Update servicediscovery.rst: Review and update "Consul" section --------- Co-authored-by: Guillaume Gnaegi <[email protected]> Co-authored-by: raman-m <[email protected]>
@Danimatar0 @ggnaegi |
I was trying to access a microservice called UserManagement from an ocelot api gateway but when attempting the request, i got the following error in logs:
and here is my ocelot.json file :
And the service was successfully registered because I can clearly see it's in consul UI dashboard in services list.
I appreciate any help because it's an urgent matter!
P.S: The following steps were produced without Docker, just a normal web API.
The text was updated successfully, but these errors were encountered: