Bug 917070 - Osa-dispatcher verbose in the log when it cannot connect to jabberd
Summary: Osa-dispatcher verbose in the log when it cannot connect to jabberd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space21
TreeView+ depends on / blocked
 
Reported: 2013-03-01 15:36 UTC by Jan Pazdziora (Red Hat)
Modified: 2014-03-04 13:08 UTC (History)
1 user (show)

Fixed In Version: osad-5.11.31-1
Clone Of:
Environment:
Last Closed: 2014-03-04 13:07:21 UTC
Embargoed:


Attachments (Terms of Use)

Comment 1 Jan Pazdziora (Red Hat) 2013-03-01 15:45:02 UTC
Description of problem:

When jabberd is not running and osa-dispatcher is started, it puts multiple messages to osa-dispatcher.log, one of them even containing traceback. We should just show nice error message, ideally once, ideally with perror description of the situation.

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

Spacewalk 1.8.

How reproducible:

Deterministic.

Steps to Reproduce:
1. Stop Spacewalk: spacewalk-service stop
2. Tail the log: tail -f /var/log/rhn/osa-dispatcher.log &
3. Start osa-dispatcher (but not jabberd)
  
Actual results:

# service osa-dispatcher restart
Shutting down osa-dispatcher: [FAILED]
Starting osa-dispatcher: RHN 30217 2013/03/01 10:31:37 -04:00: ('Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 252, in setup_connection\n    c = self._get_jabber_client(js)\n  File "/usr/share/rhn/osad/jabber_lib.py", line 309, in _get_jabber_client\n    c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 567, in connect\n    jabber.Client.connect(self)\n  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 488, in connect\n    raise socket.error("Unable to connect to the host and port specified")\nerror: Unable to connect to the host and port specified\n',)
[  OK  ]

and in the log

2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.__init__
2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.print_message('socket error',)
2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.print_message('Could not connect to jabber server', 'hostname.example.com')
2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.setup_connection('ERROR', 'Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 252, in setup_connection\n    c = self._get_jabber_client(js)\n  File "/usr/share/rhn/osad/jabber_lib.py", line 309, in _get_jabber_client\n    c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 567, in connect\n    jabber.Client.connect(self)\n  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 488, in connect\n    raise socket.error("Unable to connect to the host and port specified")\nerror: Unable to connect to the host and port specified\n')
2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.setup_connection('Could not connect to any jabber server',)
2013/03/01 10:31:47 -04:00 30217 0.0.0.0: osad/jabber_lib.main('Unable to connect to jabber servers, sleeping 10 seconds',)

Expected results:

One-line error on console, on-line error in the log.

Additional info:

Comment 2 Milan Zázrivec 2013-11-08 16:10:04 UTC
spacewalk.git master: 3ba1b7276d6e9d7c39bacb67d69d13404bc3dc33

Comment 3 Matej Kollar 2014-01-17 12:16:14 UTC
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.

Comment 4 Matej Kollar 2014-03-04 13:07:21 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 5 Matej Kollar 2014-03-04 13:08:46 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21


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