Hi, I recently installed Fedora 24 (infact today only). I am facing issues with dnf. Here is what I get whenever I use it.
Error: Failed to synchronize cache for repo 'fedora'
I can reach fedoraproject.org but I cant reach xyz.fedoraproject.org (ask,forums). Also, I cannot download anything from the GUI 'software sources'
Detailed errors from the package manager follow:
cannot download Packages/h/hexchat-2.12.1-2.fc24.x86_64.rpm to /var/cache/PackageKit/24/metadata/fedora/packages/: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-24&arch=x86_64 [Resolving timed out after 120000 milliseconds]
I have tried 'dnf clean all' but I am still getting the same errors. Output of dnf clean all - http://pastebin.com/e8uEVJ6v This is not a network issue since I can access other websites.
Can I do anything to fix this ? or Should I try a fresh install ?
Thanks, Akash
On 06/24/2016 08:04 AM, Akash Mishra wrote:
Hi, I recently installed Fedora 24 (infact today only). I am facing issues with dnf. Here is what I get whenever I use it.
Error: Failed to synchronize cache for repo 'fedora'
I can reach fedoraproject.org but I cant reach xyz.fedoraproject.org (ask,forums). Also, I cannot download anything from the GUI 'software sources'
Detailed errors from the package manager follow:
cannot download Packages/h/hexchat-2.12.1-2.fc24.x86_64.rpm to /var/cache/PackageKit/24/metadata/fedora/packages/: Curl error (28): Timeout was reached for https://mirrors.fedoraproject.org/metalink?repo=fedora-24&arch=x86_64 [Resolving timed out after 120000 milliseconds]
I have tried 'dnf clean all' but I am still getting the same errors. Output of dnf clean all - http://pastebin.com/e8uEVJ6v This is not a network issue since I can access other websites.
Can I do anything to fix this ? or Should I try a fresh install ?
You have a DNS failure:
[Resolving timed out after 120000 milliseconds]
So get that solved first. Verify your network came up ("sudo ifconfig -a") and that you have valid nameservers configured ("cat /etc/resolv.conf"). Try to ping the name servers from that list (if you have any). ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - God is real...........unless declared integer or long - ----------------------------------------------------------------------
Hi,
You have a DNS failure:
[Resolving timed out after 120000 milliseconds]
So get that solved first. Verify your network came up ("sudo ifconfig -a") and that you have valid nameservers configured ("cat /etc/resolv.conf"). Try to ping the name servers from that list (if you have any).
According to ifconfig, my network is fine. There was an entry 'wlo1'.
cat /etc/resolv.conf returned : # Generated by NetworkManager nameserver 192.168.1.1
I could ping this. After this, I added google's open DNS to this file : 8.8.8.8 Now, I can access xyz.fedoraproject.org
Idk if this can help or not in diagnosing the problem, I read on a related question to try this,
1.rpm -q dnf librepo python-librepo Output: dnf-1.1.9-2.fc24.noarch librepo-1.7.18-2.fc24.x86_64 package python-librepo is not installed.
2. Installing python2 Curl error (28): Timeout was reached for https://mirrors.fedoraproject. org/metalink?repo=fedora-24&arch=x86_64 [Resolving timed out after 120000 milliseconds] However, I can download metalink file from the browser.
Does this help ? OR is it still looking like a network issue?
On 06/24/2016 10:37 AM, machine wrote:
Hi,
You have a DNS failure:
[Resolving timed out after 120000 milliseconds]
So get that solved first. Verify your network came up ("sudo ifconfig -a") and that you have valid nameservers configured ("cat /etc/resolv.conf"). Try to ping the name servers from that list (if you have any).
According to ifconfig, my network is fine. There was an entry 'wlo1'.
Based on that device name, I'm assuming you're using wifi. I'm also assuming you're using DHCP to get an IP address for your machine and that the DHCP server is your wireless access point/router/whatever.
cat /etc/resolv.conf returned : # Generated by NetworkManager nameserver 192.168.1.1
I could ping this.
Not surprising. On the vast majority of networks, the first usable IP (in your case 192.168.1.1) is the gateway and should be pingable. Some networks use the LAST usable IP as the gateway (nowhere near as common) and still others use some arbitrary address as the gateway (pretty rare).
What disturbs me is that your DHCP server didn't offer any external DNS servers and that, based on the fact it only gave you its own address, that it's not acting as either a caching DNS server or proxying your requests through.
After this, I added google's open DNS to this file : 8.8.8.8 Now, I can access xyz.fedoraproject.org
Idk if this can help or not in diagnosing the problem, I read on a related question to try this,
1.rpm -q dnf librepo python-librepo Output: dnf-1.1.9-2.fc24.noarch librepo-1.7.18-2.fc24.x86_64 package python-librepo is not installed.
- Installing python2
Curl error (28): Timeout was reached for https://mirrors.fedoraproject. org/metalink?repo=fedora-24&arch=x86_64 [Resolving timed out after 120000 milliseconds] However, I can download metalink file from the browser.
That data may be cached by your browser if you examined it after adding the 8.8.8.8 nameserver to your /etc/resolv.conf. Try a reboot or flush the browser's cache and try to fetch the metadata again via the browser without the 8.8.8.8 nameserver in /etc/resolv.conf. I'll bet it fails.
Does this help ? OR is it still looking like a network issue?
It still looks like a network issue to me in that the DNS services aren't happening. Check your NetworkManager (NM) config for that device, go to the "IPv4 Settings" tab (assuming you're using IPv4) and make sure that if you're using DHCP, you have "Automatic (DHCP)" selected in the "Method" section and NOT "Automatic (DHCP) addresses only" and that you don't have anything in the "Additional DNS servers" section, then restart Network Manager:
sudo systemctl restart NetworkManager
Recheck the /etc/resolv.conf file to see if you have any additional nameservers defined. If not, then you COULD add 8.8.8.8 to the "Additional DNS servers" section of the NM config and do another NM restart. The thing that bothers me is that the DHCP stuff is not giving you any nameservers to use other than the router and that the machine it is giving you (192.168.1.1) isn't acting like a resolver itself and it should if it doesn't pass along any nameservers.
The vast majority of wireless routers pass through the DNS servers they get from their ISP upstream providers. The WAN side of your wireless router gets its IP via DHCP from your ISP along with nameservers to use. It usually passes those nameservers along to ITS DHCP clients on the LAN side of things. If not, they run a caching name server or proxy that the LAN DHCP clients use.
---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - Always remember you're unique, just like everyone else. - ----------------------------------------------------------------------
Allegedly, on or about 24 June 2016, Rick Stevens sent:
Recheck the /etc/resolv.conf file to see if you have any additional nameservers defined. If not, then you COULD add 8.8.8.8 to the "Additional DNS servers" section of the NM config and do another NM restart. The thing that bothers me is that the DHCP stuff is not giving you any nameservers to use other than the router and that the machine it is giving you (192.168.1.1) isn't acting like a resolver itself and it should if it doesn't pass along any nameservers.
The vast majority of wireless routers pass through the DNS servers they get from their ISP upstream providers. The WAN side of your wireless router gets its IP via DHCP from your ISP along with nameservers to use. It usually passes those nameservers along to ITS DHCP clients on the LAN side of things. If not, they run a caching name server or proxy that the LAN DHCP clients use.
Routers usually upstream your request to the ISP's DNS servers to resolve, *but*... I've found many ISPs DNS servers to be awful (*), you can be better off to run one properly, yourself, or configure your router to use an external reliable one *instead* of your ISPs. Then, all the other equipment on a LAN will just work without any fuss.
* (Slow, overworked, sometimes timing out, sometimes never having answers queries. On one ISP, on of the biggest in the country, their own DNS servers rarely had answers to their own equipment hostnames.)
Sometimes ISPs re-jig their servers, and put them on other IPs, but don't bother to update their DHCP servers, or you're still on an old lease and hadn't found out about the new ones, yet. Or, they have several DNS servers and dole out different ones to different clients as they connect, and some of the DNS servers don't work too well. With dial-up, hanging up and re-connecting would often work past that malarkey, but changing your IP (and other assigned addresses) is harder to do with broadband, where you usually get the same IP each connection.
I gave up on my ISP's DNS servers many years ago, and ran my own DNS server for the last three ISPs that I've been with. It saved me a lot of pain. Since I run the DNS and DHCP servers on a computer, rather than the router, it made it very easy for me to do things exactly the way that I wanted.
This is one potential problem with using a non-ISP DNS server, in that some ISPs only put the data for their own POP and IMAP mail servers, for example, into their own DNS server. Or have different IPs to give to internally connected to clients to outside users. If you don't use their data to try connecting to thing, things fail to work in peculiar ways.
These days, I run my own DNS server, and have the router as the forwarder for other queries (which will automatically use my ISP's current DNS server). As a forwarder, it answers queries the usual servers don't know about. Adding a second DNS server to the computer's configuration (DHCP or NetworkManager), doesn't quite work the same way, there's a long timeout before the second DNS server is used, and only if the first one doesn't respond. If the first one does respond, even if it doesn't have an answer, it has responded, and the second one will not be consulted.