Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 524265

Summary: regression from postgres merge
Product: [Community] Spacewalk Reporter: Joshua Roys <roysjosh>
Component: ServerAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.6CC: josh.kayse
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-20 19:26:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 543511    

Description Joshua Roys 2009-09-18 15:32:52 UTC
Description of problem:
Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/config/rhn_config_management.py", line 157, in client_get_file
    return self._client_get_file(server_id, filename)
  File "/usr/share/rhn/server/handlers/config/rhn_config_management.py", line 199, in _client_get_file
    row = h.fetchone_dict()
  File "/usr/share/rhn/server/rhnSQL/sql_base.py", line 249, in fetchone_dict
    ret = ociDict(self.description, self._real_cursor.fetchone())
DatabaseError: column at array pos 0 fetched with error: 1406

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

How reproducible:
rhncfg-client diff produced the above

Additional info:
<prad> jsherrill, 4158b8b254e9fb1e3bc9ab4807a9b6701556a8bd is the commit which introduced that

Comment 1 Joshua Roys 2009-10-01 17:02:12 UTC
Googling the DatabaseError:... line returns results that appear to point to some kind of character encoding mismatch and subsequent mis-sizing of buffers.  Or something like that.  This led me to comment out our NLS_LANG setting in /etc/sysconfig/httpd (it was set to english.AL32UTF8) and our server.nls_lang in /etc/rhn/rhn.conf (same value).  I restarted httpd and the errors, which were trivially reproducible, seem to have disappeared for now.  Oddly enough, the error occurs on files which contain pure ASCII - here's a bit more of one of the tracebacks.

...
DatabaseError: column at array pos 0 fetched with error: 1406

Local variables by frame
Frame fetchone_dict in /usr/share/rhn/server/rhnSQL/sql_base.py at line 249
                       	self = <type 'instance'> <__builtin__.OracleCursor on <cx_Oracle.Connection to swuser@sw>>

Frame _client_get_file in /usr/share/rhn/server/handlers/config/rhn_config_management.py at line 199
                           h = <type 'instance'> <__builtin__.OracleCursor on <cx_Oracle.Connection to swuser@sw>>
                   server_id = <type 'int'> 1000010001
                       	self = <type 'instance'> <server.handlers.config.rhn_config_management.ConfigManagement instance at 0x2b3888e1b1b8>
                    filename = <type 'str'> /srv/tomcat6/webapps/ROOT/file_not_found.html

And /srv/tomcat6/webapps/ROOT/file_not_found.html simply contains:
# xxd /srv/tomcat6/webapps/ROOT/file_not_found.html
0000000: 5468 6520 7265 7175 6573 7465 6420 7265  The requested re
0000010: 736f 7572 6365 2069 7320 6e6f 7420 6176  source is not av
0000020: 6169 6c61 626c 652e 0a                   ailable..

Weird?

Comment 2 Joshua Roys 2009-12-03 16:52:50 UTC
cx_Oracle 4.4.1 may have fixed this for us.

Comment 3 Joshua Roys 2010-01-20 19:26:28 UTC
I'm going to close this out - I haven't seen this since upgrading cx_Oracle.

Comment 4 Joshua Roys 2010-01-20 20:15:28 UTC
*** Bug 520796 has been marked as a duplicate of this bug. ***