Bug 751292 - Bug in rhnplugin.conf RHEL 6.2
Bug in rhnplugin.conf RHEL 6.2
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
6.2
All Linux
low Severity medium
: rc
: ---
Assigned To: Miroslav Suchý
Jiří Mikulka
:
: 732763 (view as bug list)
Depends On: 595837 751294
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-04 04:42 EDT by Miroslav Suchý
Modified: 2014-10-06 09:46 EDT (History)
6 users (show)

See Also:
Fixed In Version: rhn-client-tools-1.0.0-79.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 595837
Environment:
Last Closed: 2012-06-20 07:59:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2011-11-04 04:42:35 EDT
+++ 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@redhat.com 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 2011-11-24 06:00:30 EST
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 10:04:59 EST
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 10:07:55 EST
*** Bug 732763 has been marked as a duplicate of this bug. ***
Comment 6 Miroslav Suchý 2012-01-05 08:24:57 EST
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 08:09:29 EST
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 07:59:48 EDT
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.