title: Error using YUM and DNF in Fedora 21
body: <p>I read  <a href="http://fedoramagazine.org/special-update-information-for-fedora-21-users-packagekit-errors/" rel="nofollow noreferrer">this article in fedoramagzine.org</a>  and followed the process. Since then I am unable to perform updates, installation etc from both yum and dnf. </p>
  
  <p>This is the error I get from DNF</p>
  
  <blockquote>
    <p>Abhinav@localhost ~$ sudo dnf update<br>
    [sudo] password for Abhinav:<br>
    Error: Failed to synchronize cache for repo 'fedora' from
    '<a href="https://mirrors.fedoraproject.org/metalink?repo=fedora-21&amp;arch=x86_64" rel="nofollow noreferrer">https://mirrors.fedoraproject.org/metalink?repo=fedora-21&amp;arch=x86_64</a>':
    Cannot prepare internal mirrorlist: Curl error: Timeout was reached
    for
    <a href="https://mirrors.fedoraproject.org/metalink?repo=fedora-21&amp;arch=x86_64" rel="nofollow noreferrer">https://mirrors.fedoraproject.org/metalink?repo=fedora-21&amp;arch=x86_64</a>
    [Connection timed out after 120002 milliseconds]</p>
  </blockquote>
  
  <p>and this is the error I get when using YUM</p>
  
  <blockquote>
    <p>Abhinav@localhost ~$ sudo yum update Loaded plugins: langpacks<br>
     One of the configured repositories failed (Fedora 21 - x86_64),  and
    yum doesn't have enough cached data to continue. At this point the
    only  safe thing yum can do is fail. There are a few ways to work
    "fix" this:</p>
  
  <pre><code> 1. Contact the upstream for the repository and get them to fix the problem.
  
   2. Reconfigure the baseurl/etc. for the repository, to point to a working
      upstream. This is most often useful if you are using a newer
      distribution release than is supported by the repository (and the
      packages for the previous distribution release still work).
  
   3. Disable the repository, so yum won't use it by default. Yum will then
      just ignore the repository until you permanently enable it again or use
      --enablerepo for temporary usage:
  
          yum-config-manager --disable fedora
  
   4. Configure the failing repository to be skipped, if it is unavailable.
      Note that yum will try to contact the repo. when it runs most commands,
      so will have to try and fail each time (and thus. yum will be be much
      slower). If it is a very temporary problem though, this is often a nice
      compromise:
  
          yum-config-manager --save --setopt=fedora.skip_if_unavailable=true
  </code></pre>
    
    <p>Cannot retrieve metalink for repository: fedora/21/x86_64. Please
    verify its path and try again</p>
  </blockquote>
  
  <p>I even emptied all the repos in <code>/etc/yum.repos.d</code> except for the original 3 repos you get when you install distro.</p>
  
  <p><strong>UPDATE ::</strong><br>
  <strong>@Etan Reisner</strong>  Here is the output of <code>rpm -qa nss\*</code></p>
  
  <pre><code> Abhinav@localhost ~$ rpm -qa nss\*
   nss-softokn-freebl-3.17.3-1.fc21.x86_64
   nss-util-devel-3.17.3-1.fc21.x86_64 nss-sysinit-3.17.3-2.fc21.x86_64
   nss-util-3.17.3-1.fc21.x86_64 nss-tools-3.17.3-2.fc21.x86_64
   nss-softokn-freebl-3.17.3-1.fc21.i686 nss-3.17.3-2.fc21.x86_64
   nss-softokn-freebl-devel-3.17.3-1.fc21.x86_64
   nss-mdns-0.10-15.fc21.x86_64 nss-mdns-0.10-15.fc21.i686
   nss-util-3.17.3-1.fc21.i686 nss-softokn-3.17.3-1.fc21.i686
   nss-devel-3.17.3-2.fc21.x86_64 nss-softokn-devel-3.17.3-1.fc21.x86_64
   nss-3.17.3-2.fc21.i686 nss-softokn-3.17.3-1.fc21.x86_64
  </code></pre>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>Formatted my laptop and re-installed Fedora 21. After 3 <code>sudo dnf updates</code>. I am stuck with this problem again.  This time i didn't follow the steps on the previous article.  </p>
  
  <p>On further google search I found <a href="https://fedorahosted.org/fedora-infrastructure/ticket/4517" rel="nofollow noreferrer">https://fedorahosted.org/fedora-infrastructure/ticket/4517</a> which talks about same error. It is closed but I can't find a proper solution again. </p>