RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 751292 - Bug in rhnplugin.conf RHEL 6.2
Summary: Bug in rhnplugin.conf RHEL 6.2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.2
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Jiří Mikulka
URL:
Whiteboard:
: 732763 (view as bug list)
Depends On: 595837 751294
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-04 08:42 UTC by Miroslav Suchý
Modified: 2018-11-14 10:15 UTC (History)
6 users (show)

Fixed In Version: rhn-client-tools-1.0.0-79.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 595837
Environment:
Last Closed: 2012-06-20 11:59:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0752 0 normal SHIPPED_LIVE rhn-client-tools and yum-rhn-plugin bug fix and enhancement update 2012-06-19 19:31:17 UTC

Description Miroslav Suchý 2011-11-04 08:42:35 UTC
+++ This bug was initially created as a clone of Bug #595837 +++

Description of problem:

When /etc/yum/pluginconf.d/rhnplugin.conf is set to:

[main]
enabled = 1
gpgcheck = 1


yum fails with the following:


]$ yum repolist
Loaded plugins: rhnplugin, security
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 253, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhnplugin.py", line 111, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 217, in getLoginInfo
    login()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 184, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 202, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 38, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.4/site-packages/rhn/rpclib.py", line 354, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.4/site-packages/rhn/transports.py", line 171, in request
    headers, fd = req.send_http(host, handler)
  File "/usr/lib/python2.4/site-packages/rhn/transports.py", line 704, in send_http
    headers=self.headers)
  File "/usr/lib64/python2.4/httplib.py", line 810, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request
    self.endheaders()
  File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
    self._send_output()
  File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.4/httplib.py", line 664, in send
    self.sock.sendall(str)
  File "/usr/lib/python2.4/site-packages/rhn/SSL.py", line 217, in write
    sent = self._connection.send(data)
OpenSSL.SSL.SysCallError: (104, 'Connection reset by peer')

Version-Release number of selected component (if applicable):



If rhnplugin.conf is disabled, yum works properly:

[main]
enabled = 0
gpgcheck = 1


How reproducible:
 
This is the case with RHEL 5.5 desktop and RHEL 5.5 server. 

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

--- Additional comment from msuchy on 2010-05-26 04:46:19 EDT ---

Do you have properly set up sslCACert and serverURL in:
 /etc/sysconfig/rhn/up2date
I assume you have set one of those incorectly. But yes, we can write some nice error message rather then this ugly traceback




Seee bug 595837 for fix.

Comment 2 Jan Pazdziora (Red Hat) 2011-11-24 11:00:30 UTC
We would really need some steps to reproduce in deterministic fashion.

On my RHEL 6.2 (to be), with

# rpm -q rhn-client-tools
rhn-client-tools-1.0.0-73.el6.noarch

I get

# yum repolist
Loaded plugins: rhnplugin
There was an error communicating with RHN.
RHN channel support will be disabled.
Error communicating with server. The message was:
Unable to connect to the host and port specified
repolist: 0

when I hack my /etc/hosts to have the serverUrl to point to system which does not listen on 443 at all (localhost httpd without mod_ssl installed), and I get

# yum repolist
Loaded plugins: rhnplugin


The SSL certificate failed verification.

when I change it to point to machine which runs SSL but has completely different certificate (like www.google.com).

Is the issue still present on RHEL 6.2, and if so, what is the way to reproduce it?

Comment 3 Miroslav Suchý 2011-11-24 15:04:59 UTC
I could not offer you Jan good reproducer. This error popup randomly as network error appeared during random part of code.
Probably best reproducer would be to set up on server firewall, which will cut off the client and start this firewall during package download.

Comment 4 Miroslav Suchý 2011-11-24 15:07:55 UTC
*** Bug 732763 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Suchý 2012-01-05 13:24:57 UTC
cherry picked to satellite.git as:
* 5019731 751292 - fix syntax error
* 39f4e16 751292 - add missing import 
* 8ea5af5 751292 - all up2date bugs now inherit from YumBaseError so yum/pup can catch them
* b9fc03c 751292 - properly handle two exceptions
* 96a770b 751292 - write nice error in case of "connection reset by peer" and xmlrpc protocol error

Comment 9 Miroslav Suchý 2012-02-13 13:09:29 UTC
added missing import in commit d7cd86bc72b7f46293fbd15b222d19a8d7fcc371

you can get more verbose output if you do 
raise SSL.SysCallError('foo bar')

Comment 13 errata-xmlrpc 2012-06-20 11:59:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0752.html


Note You need to log in before you can comment on or make changes to this bug.