Why does "yum update" command always fails with "Error: (104, 'Connection reset by peer')" error?
Environment
- Red Hat Enterprise Linux 5
- yum
Issue
After doing fresh installation of RHEL5, "yum update" command always fails with "Error: (104, 'Connection reset by peer')" error.
# yum update
Loaded plugins: rhnplugin, security
Error: (104, 'Connection reset by peer')
Telnet to xmlrpc.rhn.redhat.com 80 or 443 works fine.
Using HTTP instead of the default HTTPS on serverURL line in /etc/sysconfig/rhn/up2date or removing yum cache do not alleviate the issue.
Resolution
Disable Location Aware Updates from system profile on Red Hat Network as per below article, remove yum cache and re-run "yum update".
Root Cause
System fails to get proper repository information from Red Hat Network peer server.
/var/log/up2date files shows this symptom in the last few lines of the error.
File "/usr/lib/yum-plugins/rhnplugin.py", line 323, in _getFile
raise yum.Errors.RepoError(str(e))
yum.Errors.RepoError: (104, 'Connection reset by peer')
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
