How to fix the error “ Host not found in upstream”?

235    Asked by DanPeters in Data Science , Asked on Jul 31, 2023

 I am using nginx with docker in the AWS ECS service. However, I got an error and I feel that the proxy path has become invalid for a server. How to fix the error?

Answered by Dan Peters

If you wish to fix the host not found in upstream a resolver directive can be added to the configuration to avoid future crashes. The following code will simplify:


Server {
Listen 80;
Server_name test.com;
Location / {
Resolver 8.8.8.8
Proxy_pass
Proxy_redirect off;

However, using a public DNS is risky since the DNS requests can be spoofed. Hence use a safe DNS server.

The Data Science Certification Training offered at JanBask Training provides courses similar to offline sessions, helping students attain a broad idea on the basic and advanced concepts related to Data Science. The students also get to know the ways to manage structured and unstructured data applying the intelligence to figure out substantial conclusions. JanBask Training makes you industry-ready to face the job market scenario, examining the provided data and creating proper insights from them.



Your Answer

Interviews

Parent Categories