Apache-2.2

訪問我的網站時 DNS 查找失敗一些代理錯誤

  • January 13, 2011

這是直到今天早上的情況,一切對我來說都很好。從過去 6 個月開始,我的許多域都可以通過以下方式訪問

http://site1.myserver.com

http://site2.myserver.com

http://site3.myserver.com

http://site4.myserver.com

所有這些都是反向代理配置。我對他們每個人都有一些應用程序。

直到今天早上,有人報告我

http://site1.myserver.com/app1 無法正常工作,但http://site1.myserver.com 可以訪問

,但http://site2.myserver.com 可以訪問

,但http:// /site3.myserver.com 可訪問

,但http://site4.myserver.com 不可訪問

在過去的 6 個月中,我沒有更改任何這些 Apache 配置

(一切執行良好)

在瀏覽器中可以看到的錯誤是在訪問 http://site1.myserver.com/app1時

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /app1.

Reason: DNS lookup failure for: myserver.com

同樣是http://site4.myserver.com的錯誤

那麼我應該檢查什麼我已經檢查了所有 apache 日誌到我可以看到的範圍內

   192.168.1.25 - - [10/Jan/2011:14:50:48 +0530] "GET /app1 HTTP/1.1" 502 531 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3"

Mon Jan 10 14:27:42 2011] [error] (113)No route to host: proxy: HTTP: attempt to connect to 192.168.1.3:80 (192.168.1.3) failed
[Mon Jan 10 14:27:42 2011] [error] ap_proxy_connect_backend disabling worker for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:46 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:47 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:35:29 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:35:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:35:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:50:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:50:48 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1

對於 site4.myserver.com

我明白了

[Mon Jan 10 14:57:40 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 14:57:40 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 14:57:43 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:02:38 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /
[Mon Jan 10 15:03:04 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:03:04 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:03:08 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:03:08 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:03:10 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:06:21 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /
[Mon Jan 10 15:06:31 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:26:03 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /

通過安裝 prodns 和 dnsproxy 解決了這個問題。

如果您沒有改變任何東西,那麼顯然有其他東西改變了。

您需要從反向代理伺服器檢查 DNS 解析。

聽起來您的代理指向的 DNS 伺服器上可能有記憶體的否定響應。

引用自:https://serverfault.com/questions/220583