Bug 1451770 - Exception thrown while handling exception in /usr/share/rhn/osad/jabber_lib.py
Summary: Exception thrown while handling exception in /usr/share/rhn/osad/jabber_lib.py
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata sat58-nth
TreeView+ depends on / blocked
 
Reported: 2017-05-17 13:31 UTC by Lukáš Hellebrandt
Modified: 2018-02-05 13:57 UTC (History)
2 users (show)

Fixed In Version: osad-5.11.63-14-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-05 13:57:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0274 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2018-02-09 23:18:15 UTC

Description Lukáš Hellebrandt 2017-05-17 13:31:01 UTC
Description of problem:
Exception thrown while handling exception in /usr/share/rhn/osad/jabber_lib.py

How reproducible:
Deterministic

Steps to Reproduce:
Cause problems with SSL connection to DB, for example use reproducer from OP of bug 1451656

Actual results:
***
Starting osa-dispatcher: Spacewalk 13194 2017/05/17 15:25:56 +02:00: ('Error caught:',)

ERROR: unhandled exception occurred: (can't write str to text stream).
***

Expected results:
Exception handled correctly and without causing another exception

Comment 1 Lukáš Hellebrandt 2017-05-17 13:36:47 UTC
The issue is caused in line 164 of /usr/share/rhn/osad/jabber_lib.py by log_error(extract_traceback()), try commenting out exception catching at the end of /usr/sbin/osa-dispatcher:

Traceback (most recent call last):
  File "/usr/sbin/osa-dispatcher", line 37, in <module>
    sys.exit(mod.main() or 0)
  File "/usr/share/rhn/osad/osa_dispatcher.py", line 37, in main
    return Runner().main()
  File "/usr/share/rhn/osad/jabber_lib.py", line 164, in main
    log_error(extract_traceback())
  File "/usr/share/rhn/osad/jabber_lib.py", line 1531, in extract_traceback
    traceback.print_exc(None, sio)
  File "/usr/lib64/python2.6/traceback.py", line 233, in print_exc
    print_exception(etype, value, tb, limit, file)
  File "/usr/lib64/python2.6/traceback.py", line 124, in print_exception
    _print(file, 'Traceback (most recent call last):')
  File "/usr/lib64/python2.6/traceback.py", line 13, in _print
    file.write(str+terminator)
  File "/usr/lib64/python2.6/io.py", line 1515, in write
    s.__class__.__name__)
TypeError: can't write str to text stream

Comment 2 Tomáš Kašpárek 2017-10-09 10:08:29 UTC
spacewalk.git(master): 479863b4797bef88721b6f5d189b358c06113c94

Comment 7 Pavel Studeník 2018-01-24 13:48:01 UTC
Verified with osa-dispatcher-5.11.63-14.el6sat.noarch in our automation.

Comment 10 errata-xmlrpc 2018-02-05 13:57:18 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.

https://access.redhat.com/errata/RHBA-2018:0274


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