Fabriceli commented on issue #9032: URL: https://github.com/apache/apisix/issues/9032#issuecomment-1474587669
> Dear Fabriceli, > > I've seen this behavior too but it happens when you leave the same instance of ApiSix and only change the version of Consul for testing, some version of consul works and adds the routes in ApiSix, then you switch to the non-working one and the route remains in ApiSix giving the impression that it works after reconnectins. I kindly invite you to try from scratch (the same steps of this [guide ](https://apisix.apache.org/blog/2023/01/18/consul-with-apisix/) ) with a clean version of ApiSix and only Consul v1.15.1. > > * Register some service to Consul 1.15.1 via Consul HTTP API. > * Check whether the test service is registered successfully on Consul 1.15.1 > * Add a Route to ApiSix with discovery type Consul > * Test and Verify the Result > > Even waiting for retries, ApiSix always logs something like this: > > ``` > 2023/03/15 18:54:28 [error] 49#49: *374 [lua] init.lua:225: connect consul: http://<consul_host>:30083/v1 by sub url: /catalog/services, got watch result: null, with error: closed, context: ngx.timer > 2023/03/15 18:54:28 [warn] 49#49: *374 [lua] init.lua:231: retry connecting consul **after 1 seconds**, context: ngx.timer > 2023/03/15 18:55:29 [error] 49#49: *8353 [lua] init.lua:225: connect consul: http://<consul_host>:30083/v1 by sub url: /catalog/services, got watch result: null, with error: closed, context: ngx.timer > 2023/03/15 18:55:29 [warn] 49#49: *8353 [lua] init.lua:231: retry connecting consul **after 4 seconds**, context: ngx.timer > ... > ... > 2023/03/15 18:57:49 [warn] 49#49: *25776 [lua] init.lua:231: retry connecting consul **after 64 seconds**, context: ngx.timer > 2023/03/15 18:59:53 [error] 49#49: *41328 [lua] init.lua:225: connect consul: http://<consul_host>:30083/v1 by sub url: /catalog/services, got watch result: null, with error: closed, context: ngx.timer > ... > ... > 2023/03/15 19:05:09 [error] 49#49: *81259 [lua] init.lua:225: connect consul: http://http://<consul_host>:30083/v1 by sub url: /catalog/services, got watch result: null, with error: closed, context: ngx.timer > 2023/03/15 19:05:09 [warn] 49#49: *81259 [lua] init.lua:231: retry connecting consul **after 1024 seconds**, context: ngx.timer > ``` > > The apsisx-gateway always responds: > > ``` > <html> > <head><title>404 Not Found</title></head> > <body> > <center><h1>404 Not Found</h1></center> > <hr><center>openresty</center> > <p><em>Powered by <a href="https://apisix.apache.org/">APISIX</a>.</em></p></body> > ``` > > P.S. I realized that the[ official image](https://hub.docker.com/_/consul/tags?page=1&name=1.15) of Consul 1.15.1 has been updated only 2 days ago with the same version number 1.15.1 & :latest (the digest has changed). I haven't tried this new specific version yet. Maybe they solved the problem on the Consul side. @Fabriceli was your test done after the publication of the latest consul version dating to 2 days ago? I can not reproduce, though i follow this [guide](https://apisix.apache.org/blog/2023/01/18/consul-with-apisix/). It work fine with the consul 1.15.1 version and also 1.15 version. Can you provide more info about the situation, eg. openresty version, lua version etc. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
