
突然,Firefox-ESR 和 Iceweasel 無法找到 DNS,但/etc/hosts
運作正常。其他程式也可以正常運作:konqueror
、wget
和curl
。
我已經經歷過http://mzl.la/1xKrMnN Firefox 無法載入網站,但其他瀏覽器可以,沒有防火牆阻止 Firefox 使用 DNS,停用 IPv6,沒有代理,也沒有 DNS 預取。
$ egrep "network.dns.dis|proxy" ~/.mozilla/firefox/*.default/prefs.js
user_pref("network.dns.disableIPv6", true);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.proxy.type", 0);
我努力了reboot
,reinstall
,purge & install
。以新定義的使用者登入也不起作用。然後:
mkdir debug ; cd debug
strace -o f -ff firefox http://example.org/
grep -rn example.org f*
並且有一些東西可以比較
strace -o k -ff konqueror http://example.org/
grep -rn example.org k*
我已經瀏覽了這些文件,但沒有找到任何鐵證如山然而。從現在起該去哪裡?重裝電腦?
答案1
你的尺寸/etc/hosts
太大了:
$ ls -l /etc/hosts
-rw-r--r-- 1 root root 5128 Oct 2 12:20 /etc/hosts
這裡有一個錯誤。如果檔案大小為 1562 位元組,Firefox 可以讀取它。如果是 1588 位元組或更多,Firefox 就無法使用 DNS。
結論:要嘛不使用 Firefox,要嘛減少/etc/hosts
使用1562 位元組。
此錯誤適用於 Firefox 版本 45.4.0。