Bug 494813 - satellite-sync: 'ORA-12541: TNS:no listener\n', 'rhnsat', 'Connection_Connect(): server attach
Summary: satellite-sync: 'ORA-12541: TNS:no listener\n', 'rhnsat', 'Connection_Connect...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 530
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Jiri Kastner
URL:
Whiteboard:
Depends On:
Blocks: sat531-blockers
TreeView+ depends on / blocked
 
Reported: 2009-04-08 08:28 UTC by Michael Mráka
Modified: 2010-01-30 03:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-16 13:47:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1683 0 normal SHIPPED_LIVE satellite-sync bug fix update 2009-12-16 13:46:43 UTC

Description Michael Mráka 2009-04-08 08:28:44 UTC
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:

Comment 1 Brandon Perkins 2009-04-09 14:52:24 UTC
Cliff and I don't think this is new behavior.  So throwing to canfix.

Comment 2 Michael Mráka 2009-09-01 13:02:10 UTC
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?

Comment 3 Michael Mráka 2009-11-09 13:52:16 UTC
Satellite.git
commit 014e6f4223bfcc2174413f11a740ced9b5d07a13
    494813 - print meaninful error message instead of traceback when database is not running

Built spacewalk-backend-0.5.28-35.

Comment 4 Michael Mráka 2009-11-13 08:24:58 UTC
Package spacewalk-backend-0.5.28-35 was pushed to webQA. Moving ON_QA.

Comment 7 errata-xmlrpc 2009-12-16 13:47:03 UTC
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


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