当前位置:网站首页>Pod / service rejected your request

Pod / service rejected your request

2020-12-07 19:23:18 Zeusro

Recently, I encountered a typical problem :service,pod All normal , And in pod Inside curl 0.0.0.0 It's normal , however curl pod IP,curl service IP There are problems. , Tips connection refused .

Further investigation found that network plug-ins , Nodes are normal , And it didn't fix that istio High end operations like that .

In the end, we found that , The problem is : The container itself only monitors localhost .

So the question is , Why just monitor localhost There will be problems. ? localhost What the hell is that? ?

image.png

So I asked the magic conch , It told me : localhost It's just a domain name , according to host file , It usually points to 127.0.0.1. but 127.0.0.1 It's an autistic child , It only receives local IP. in other words , The external flow can't get into it .

image.png

therefore ,pod Although normal , But by pod ip ,service ip Can't access it .

It's like a product manager submitting a requirement to R & D , But his reply was :

image.png

therefore , Back to the subject . To solve this problem , You have to make the app to open up , monitor 0.0.0.0 that will do .0.0.0.0 Indicates that both intranet and Intranet can access .

image.png

Reference link

  1. Monitoring is different ip The difference in address

Original statement , This article is authorized by the author + Community publication , Unauthorized , Shall not be reproduced .

If there is any infringement , Please contact the yunjia_community@tencent.com Delete .

版权声明
本文为[Zeusro]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/11/202011161720158681.html