Active health checks cannot set HTTPS target "Healthy" automatically again after "down" simulation #7592
Replies: 10 comments 1 reply
-
Thank you for reporting this, we'll investigate. |
Beta Was this translation helpful? Give feedback.
-
Hi @igorgomeslima! Are you sure those logs are from Kong 2.5.0? There are a few things that should be different on them. Anyway, it seems that the behavior is correct because Kong is not getting an answer from the upstream services. I see in the logs you shared that the upstream services are responding to
|
Beta Was this translation helpful? Give feedback.
-
Hey @locao! You are right, those logs are from Kong 2.3.2-alpine, I tried two versions of Kong(mentioned in the end of issue description) and I put the wrong log version here, my bad. I recorded a video showing my configuration, if interest, please see ✌. CURL GET result from Kong container
I've been update Docker network configuration used by Kong container in the issue description. Some logs from version 2.5.0-centos
|
Beta Was this translation helpful? Give feedback.
-
UPDATE When I run The path
In this situation, how to configure the targets on Upstream? Keeping in mind that if we don't type a path, we won't get a return |
Beta Was this translation helpful? Give feedback.
-
Hey @igorgomeslima, thanks for the logs! In your case, the health checker is telling you that it To fix that you must configure the
(I redacted everything that is not relevant to this issue) We don't support Konga, but it seems by your video that those options are available in the Upstream Details tab. I'm closing this issue as it is not a bug. Please feel free to reopen it if the problem persists or create a new Discussion if you would like some help from the community to configure your environment. |
Beta Was this translation helpful? Give feedback.
-
Hey @locao thank you so much for your help on this. Yours comments give me a lot of insights. But, some things sounds strange for me when I try to configure an Please see, I set the configuration mentioned before:
Konga And I've been configured a "health check" endpoint in my targets: HTTPS target HTTP target With this configuration, after simulate "down" services, the "Kong health checkers" can only set See: "Down" both targets:
"Up" both targets:
Some With HTTP:// on URI Without HTTP:// on URI With HTTPS:// on URI Without HTTPS:// on URI Well, on this last Log sample -> 192.168.65.2 = host.docker.internal Only to check: With HTTPS:// protocol = HTTP/1.1 200 OK With HTTPS:// protocol = Empty reply from server 😱 Make sense? I need something like "force Kong checkers to use HTTPS protocol on calls"? I miss something? Please @locao, do you think this is more adequate on discussions? I cannot re-open this issue with my privileges. Thanks! 🐱👤 |
Beta Was this translation helpful? Give feedback.
-
Hi @igorgomeslima! Is this weather service open source? Can you share it so I can run some tests here? If this is an issue with Kong I can reopen this ticket, if it's a configuration problem I will move it to the Discussions. Thank you for your help! |
Beta Was this translation helpful? Give feedback.
-
Hey @locao, the weather service is the default Web Api sample project used by .NET scaffolding CLI If you kindly can, I've made a repo with my sample applications: Weather Forecast Apis - HTTP & HTTPS.
I've put some info in Thank you for your support! -
|
Beta Was this translation helpful? Give feedback.
-
Hi @locao, any news? |
Beta Was this translation helpful? Give feedback.
-
Hi @igorgomeslima! Thanks for the detailed test environment. I was able to reproduce your issue and the solution here. The service provided indeed blocks any HTTP request:
Using HTTPS without a certificate also does not work:
Using
With these restraints, a valid upstream configuration would be:
When the service is up, I get these log entries in Kong:
If I stop the service, I can see these entries:
... and then:
Now an unhealthy target is being checked:
When the service is back:
Kong is behaving as expected for this case, but the active health check only works with this service if the
|
Beta Was this translation helpful? Give feedback.
-
Summary
Steps To Reproduce
SERVICES
ROUTES
UPSTREAMS
Additional Details & Logs
I'am using the "Active health checks" configuration with two targets running locally on HOST(outside network used by Kong container):
In the Upstream configuration I put the host.docker.internal solved by host file(Windows) so the Kong container can "touch" this targets/services, like:
With this initial configuration on Upstream everything works fine, the Kong algorithm can balance beetween this two targets. But, when I try to enable the "Active health checks" I had a unexpected behavior when simulate a "shutdown" of one these targets.
When I activate the health check mechanism Kong set both target as "Healthy", great. But when I try to simulate a "broken target"(shutdown a localhost api, for example) the Kong "checkers" set this target "Unhealthy" and never set this "Healthy" again.
Kong container logs sample
If we set the "Healthy" of this targets using the Kong api directly everything works fine, and the balancing can work again:
Logs:
Infra/Config
Docker network configuration(used by Kong container)
Why I miss? Any network configuration between HOST and Docker container used by Kong? 😆
Beta Was this translation helpful? Give feedback.
All reactions