-
Notifications
You must be signed in to change notification settings - Fork 619
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
Q: Fabio routing table not updated after service failure #216
Comments
The fabio routing table is updated automatically every time the consul state changes. This can be triggered either by a new instance of your service appearing, an existing instance disappearing or the health status of an existing instance changing. |
But in my case if you are looking fabio screen no service removed from UI . Test case is : i have run 3 instance of my service on my local box with port 8080, 8081 and 8082 and when i stopped service on port 8080 then after some time i am getting response from http://localhost:9999/ - in my case service name is world/myworld |
What I can see from the fabio logs is
Finally, the routing table empty and all requests fail with
|
Hi , STEP 1: i have run 3 instance of my service on port 8080, 8081 and 8082 , [ my service code is already on git you can use this (https://github.com/gagan2u2002/springboot-consul-Fabio-Integration-example)] STEP 2: when i close my service instance on 8080 then fabio is not responding even my service is responding me on port 8081 and 8082. Please refer the screen below - refer today (01/18/2017) log of consul and fabio- Even if you want i can have skype session with you so that i will show you the error demo but i think you can reproduce it your own to follow steps which i mention. |
i think i have resolve your query can we change issue label to Bug if you are okay with it . |
@gagan2u2002 I am not sure I understand. If you have resolved the issue then it isn't a bug. If it is a bug can you point me to what you think the issue is? |
Also, fabio just pulls information about running services from consul. If the consul service registration isn't updated properly then fabio will have an inconsistent routing table. Please make sure that you check that first. If I look at the fabio log then this doesn't look like you are shutting down the instance on port 8080 but the one on 8082.
Are you sure your instances are announcing the correct ports to consul? Is the service running on port 8080 actually registering to consul with port 8080? |
@magiconair My test cases are very simple , i have run 3 instances as i already described you earlier and i have stopped 1 instances , if i am hitting my fabio url then after some time it will through error but still my service is UP and responding in my box and same i can see in consul but fabio routing table is not updated on it's UI might be this is the root course of the problem. |
And yes still this issue is open at my end . So if you can close this , this would be good at my end . |
This looks like a consul issue. How do you register the health checks in consul? |
@magiconair But i don't think so this could be consul issue because fabio routing table need to update by fabio itself. Consul doing its job as expected. |
@gagan2u2002 |
@gagan2u2002 My guess is that you don't wait long enough after you've killed the service. Spring cloud by default checks every 10 seconds and has by default no timeout for the service check. You might want to set |
@magiconair i have even wait for long than 10 seconds after killing 1 st instance of services on 8080 but Fabio not able to route services on 8081 and 8082 port , also i observed Fabio is not updating its routing table too but my services return me the results on my dev environment on port 8081 and 8082. |
@magiconair i think i have resolve your query , is there is any update regarding this .... or we can mark this issue as BUG .....if you validate this issue at your end. |
@gagan2u2002 in the screenshot the instances running on port 8081 and 8082 are marked as If this is the case then this isn't a bug but how fabio is designed to work. You need to check why the instances on port 8081 and 8082 produce a critical health check if one of the other instances went down. |
@magiconair when i down first instance of service then other instances of that service become critical but when i check health of each instance then they will return me Response code 200. |
If you shut down one instance and the other instances become critical in consul then there is a problem with your service registration. My guess is that you use the same value for Can you post the output of |
So, I just found this after testing Fabio and finding out it doesn't remove routes for unhealthy services which was caused by non-unique service IDs. To quote the fabio docs regarding that:
This directly contradicts the Consul docs which state:
@magiconair Can you explain what is the reason fabio requires the service id to be unique per consul cluster? |
@alvaroaleman the reason it is like this was that I've built it like that in 2015 since that was my understanding on how this worked. So far this hasn't been a big issue. We've constructed our service ids as Can you elaborate why cluster wide unique service ids like I've described are not achievable? I'm curious for the motivation. I'll have a look at this again since I'm only interested for this to work not this specific implementation. |
@magiconair this can be closed as well, fixed in #414 |
Use-case:
When i run multiple instance of my service and forcefully i stop one instance
then Fabio not able to manage load properly and because of this my service getting failed after some time and return me 404 error , as i understand fabio routing table not updated in case of service fail-over.
service error msg -
fabio routing UI screen after i stop service which is running on port 8080-
i have attach fabio and consul log as well . Please refer the same.
consul_log.txt
fabio_log.txt
The text was updated successfully, but these errors were encountered: