|Summary:||Bug in rhnplugin.conf RHEL 5.5|
|Product:||Red Hat Enterprise Linux 5||Reporter:||Jason <chinchek>|
|Component:||rhn-client-tools||Assignee:||Miroslav Suchý <msuchy>|
|Status:||CLOSED ERRATA||QA Contact:||Jiří Mikulka <jmikulka>|
|Version:||5.5||CC:||jhutar, jmikulka, mminar, msuchy|
|Fixed In Version:||rhn-client-tools-0.4.20-71||Doc Type:||Bug Fix|
Under certain circumstances, when network connection is reset by peer, libraries of rhn-client-tool produced traceback. Now it produce nice error message instead.
|:||751292 751294 (view as bug list)||Environment:|
|Last Closed:||2012-02-21 06:30:04 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||751760|
|Bug Blocks:||751292, 751294|
Description Jason 2010-05-25 18:25:16 UTC
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:
Comment 1 Miroslav Suchý 2010-05-26 08:46:19 UTC
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
Comment 2 Miroslav Suchý 2010-05-26 09:41:31 UTC
spacewalk.git as commit 94a5ae16d12e126fc26d6646c06400c9de6a9ec6 This fix does not write this ugly traceback, but will print nice error message.
Comment 3 Jason 2010-05-26 17:24:52 UTC
Yes, both are setup the same as my working RHEL 5.4 system in /etc/sysconfig/rhn/up2date: sslCACert=/usr/share/rhn/RHNS-CA-CERT serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC However, I compare the /usr/share/rhn/RHNS-CA-CERT that came with RHEL 5.4 and it was larger than the cert that came with my RHEL 5.5 server. I copied the /usr/share/rhn/RHNS-CA-CERT from my RHEL 5.4 server to my 5.5 system and now the plugin is working properly. It appears that some data is missing from the cert shipped with RHEL 5.5. --Jason
Comment 8 Miroslav Suchý 2011-10-25 08:34:04 UTC
cherrypicked to svn as rev. 208025.
Comment 11 Miroslav Suchý 2011-10-25 13:23:58 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Under certain circumstances, when network connection is reset by peer, libraries of rhn-client-tool produced traceback. Now it produce nice error message instead.
Comment 13 Miroslav Suchý 2011-11-01 15:11:27 UTC
One bug releated to this one is from bug 614389. Commited as rev. 208200.
Comment 14 Miroslav Suchý 2011-11-01 15:52:05 UTC
another commit 497663177760d7822ee8019367b92f998a77be96 cherrypicked as rev. 208204.
Comment 15 Miroslav Suchý 2011-11-01 16:12:51 UTC
regarding #12. This is completely different traceback and different part of code. and will be different fix. This do not go through rhncli.py, so we could not gracefuly exit with error message. We have to raise error which inherit from yum.Errors, so yum or pup can catch it and display to user (either in tui on in gui). Either way #12 is not going to be fixed in this BZ.
Comment 17 Miroslav Suchý 2011-11-02 15:16:12 UTC
spacewalk.git commit fb2a637c67605a11e3cccdfad2315895d5ad6878
Comment 18 Miroslav Suchý 2011-11-02 15:23:42 UTC
Backported to el5 as rev. 208228.
Comment 19 Jiří Mikulka 2011-11-03 08:27:35 UTC
Hi, while I was verifying this bug (with the latest rhn-client-tools package) I hit this traceback in /var/log/up2date: Traceback (most recent call last): File "/usr/sbin/rhn_register", line 82, in ? app.run() File "/usr/share/rhn/up2date_client/rhncli.py", line 85, in run except (SSL.SysCallError, socket.error), e: exceptions.NameError: global name 'socket' is not defined This is caused due to missing 'import socket' in '/usr/share/rhn/up2date_client/rhncli.py' (see spacewalk.git commits 94a5ae16d12e126fc26d6646c06400c9de6a9ec6, 497663177760d7822ee8019367b92f998a77be96). Easiest fix of this issue is to add 'import socket' in /usr/share/rhn/up2date_client/rhncli.py. Please check it. Thanks.
Comment 20 Miroslav Suchý 2011-11-03 10:01:17 UTC
Grr, you are right spacewalk.git 0a70c4bd80203789916df07d24b57f52a1f75b41 svn revision 208234.
Comment 21 Jiří Mikulka 2011-11-04 08:32:09 UTC
I verified this bug using the latest rhn-client-tools package (rhn-client-tools-0.4.20-71.el5) on RHEL Server 5.7 x86_64 (this bug was present also on previous releases of RHEL). Traceback is not shown anymore, but is properly handled by yum (see spacewalk.git fb2a637c67605a11e3cccdfad2315895d5ad6878). Yum should print some message or warning, but there is other mistake in yum (new bz will be created and added here), which causes, that neither message is printed and log is created for the traceback. Switching to VERIFIED (related yum bz will be added here).
Comment 23 errata-xmlrpc 2012-02-21 06:30:04 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-0250.html