Description of problem: satellite-sync should print some meaninful error message instead of traceback when database is not running (E.g. ERROR: Can't connect to satellite's database). Version-Release number of selected component (if applicable): Satellite-5.3.0-RHEL4-re20090403.2 spacewalk-backend-tools-0.5.28-3.el4sat How reproducible: always Steps to Reproduce: 1. rhn-satellite stop 2. satellite-sync -m . -c some-channel 3. Actual results: RHN 24170 2009/04/08 10:22:12 +02:00: ('Connection attempt failed', 12541, 'ORA-12541: T NS:no listener\n') 10:22:12 SQL ERROR during xml processing: (12541, 'ORA-12541: TNS:no listener\n', 'rhnsat', 'Connection_Connect(): server attach') 10:22:12 TRACEBACK: Exception reported from xen29.englab.brq.redhat.com Time: Wed Apr 8 10:22:12 2009 Exception type server.rhnSQL.sql_base.SQLConnectError Exception Handler Information Traceback (most recent call last): File "/usr/share/rhn/satellite_tools/satsync.py", line 2139, in processCommandline rhnSQL.initDB(CFG.DEFAULT_DB) File "/usr/share/rhn/server/rhnSQL/__init__.py", line 98, in initDB __init__DB(backend, host, port, username, password, database) File "/usr/share/rhn/server/rhnSQL/__init__.py", line 52, in __init__DB __DB.connect() File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 333, in connect raise apply(sql_base.SQLConnectError, err_args) SQLConnectError: (12541, 'ORA-12541: TNS:no listener\n', 'rhnsat', 'Connection_Connect(): server attach') Local variables by frame ... Expected results: reasonable error message Additional info:
Cliff and I don't think this is new behavior. So throwing to canfix.
Fixed in spacewalk commit dd2b5398a0e1c18ee497199867957610fb93d3fc 494813 - print meaninful error message instead of traceback when database is not running # satellite-sync -m. -l 14:49:56 ERROR: Can't connect to the database: (12154, 'ORA-12154: TNS:could not resolve the connect identifier specified\n', 'sat10g', 'Connection_Connect(): server attach') 14:49:56 ERROR: Is your database running?
Satellite.git commit 014e6f4223bfcc2174413f11a740ced9b5d07a13 494813 - print meaninful error message instead of traceback when database is not running Built spacewalk-backend-0.5.28-35.
Package spacewalk-backend-0.5.28-35 was pushed to webQA. Moving ON_QA.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1683.html