dyrnq commented on PR #8928:
URL: https://github.com/apache/apisix/pull/8928#issuecomment-1445825627

   > > @Fabriceli
   > > I encountered difficulties.
   > > I notice the test ci use docker-compose start consul_1 8500 and consul_2 
8600 and then they can not access `http://127.0.0.1:30511` which register to 
consul , the health check always check failed. That will not be expected.
   > > I need use host IP register service replace `127.0.0.1` , so consul 
(start by docker-compose) can check the register instance IP successfully
   > 
   > L26-43: 
https://github.com/apache/apisix/blob/master/t/discovery/consul_dump.t#L26
   
   Yes , I use here code ,I mean this instance reg Address can use 
127.0.0.1:30511 but the checks can not use 127.0.0.1:30511
   because the consul use docker ,it can`t check 127.0.0.1:30511 , 30511 on 
host, not in consul container ,check health are always failed, look the check 
http use `http://192.168.6.35:30511` can work fine, but 
`http://127.0.0.1:30511` not ok.
   
   ```bash
   "PUT /v1/agent/service/register\n" . "{\"Checks\": [{\"http\": 
\"http://192.168.6.35:30511\",\"interval\": 
\"1s\"}],\"ID\":\"service_a1\",\"Name\":\"service_a\",\"Tags\":[\"primary\",\"v1\"],\"Address\":\"127.0.0.1\",\"Port\":30511,\"Meta\":{\"service_a_version\":\"4.0\"},\"EnableTagOverride\":false,\"Weights\":{\"Passing\":10,\"Warning\":1}}",```
   


-- 
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]

Reply via email to