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:
spacewalk.git master: 3ba1b7276d6e9d7c39bacb67d69d13404bc3dc33
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21