歡迎您光臨本站 註冊首頁

代理上網奇怪的問題,squid

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

代理上網奇怪的問題,squid

squid代理最近出現這樣的問題:
在伺服器里能解析域名,但是在客戶端就是上不了網,具體的提示有:
The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: http://www.baidu.com/

The following error was encountered:

Unable to determine IP address from host name for www.baidu.com
The dnsserver returned:

Temporary network problem, please retry later
This means that:

The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
Your cache administrator is 84771409(77314).



--------------------------------------------------------------------------------

Generated Wed, 27 Aug 2008 03:29:30 GMT by Panyu-proxy (squid/2.5.STABLE14)
在伺服器里查看日誌 cat /var/log/squid/cache.log
提示如下:
2008/08/27 11:30:22| dnsSubmit: queue overload, rejecting tg4a31.mail.163.com
我查看dns進程的確有很多,kill一些dns進程后,可以上網了,但是這個不是解決問題的最終辦法,請問各位高手,如何解決這個問題呢?
《解決方案》

如果是dns請求超載的話cache.log中應該有如下兩句
2008/08/14 11:44:03| WARNING: All dnsserver processes are busy.
2008/08/14 11:44:03| Consider increasing the number of dnsserver processes to at least 288 in your config file.
上邊是我的伺服器在14日發生的超載日誌,當天突然出現大量dns請求,上邊的日誌最少要設置288個dns服務線程,平時我用64個滿足了,實際到後來我增加到400+才不超載了。

修改squid.conf
dns_children 64

調整dns服務線程數
《解決方案》

還有個問題,就是首頁能打開,確認不是緩存中的。下面的鏈接就打不開,提示的內容也是同樣的。
我打開www.sohu.com后,點擊「新聞」后
The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: http://news.sohu.com/

The following error was encountered:

Unable to determine IP address from host name for www.baidu.com
The dnsserver returned:

Temporary network problem, please retry later
This means that:

The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
Your cache administrator is 84771409(77314).
《解決方案》

這個應該不是每個客戶端都出現的問題,有可能是baidu插件的原因,換一台乾淨的客戶端計算機試試。
《解決方案》

按2樓的方法先查下吧,多數是dns_children參數過小造成的,按我以前做過的經驗,兩台squid供800人上網,每天dns_children我設置在150

[火星人 ] 代理上網奇怪的問題,squid已經有532次圍觀

http://coctec.com/docs/service/show-post-27954.html