[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Spacewalk-list] osad problems postgresql?



tiesinga wrote:
Hi List,

My clients can not connect to osad. it looks like a sql problem.
Server centos 5.5
spacewalk nightly 1.4
database postgresql
Client os sl6.0

regards,
Eite Tiesinga


Error messages:

Exception reported from satellite.intra.astro.rug.nl
Time: Tue Feb 22 12:45:52 2011
Exception type spacewalk.server.rhnSQL.sql_base.SQLStatementPrepareError
Exception while handling function registration.register_osad
Request object information:
URI: /XMLRPC
Remote Host: pegasus04.intra.astro.rug.nl
Server Name: satellite.intra.astro.rug.nl:0
Headers passed in:
    Accept-Encoding: identity
    Content-Length: 2273
    Host: satellite
    content-type: text/xml
    user-agent: rhn.rpclib.py/$Revision$
    x-client-version: 1
    x-info: RPC Processor (C) Red Hat, Inc (version $Revision$)
    x-rhn-transport-capability: follow-redirects=3
x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
Extra information about this error:
SQL Error generated: ('syntax error at or near "autonomous_transaction" at character 21\n', 0, "\ndeclare\n pragma autonomous_transaction;\nbegin\n update rhnPushClient \n set name = %(name)s,\n shared_key = %(shared_key)s,\n state_id = %(state_id)s,\n next_action_time = NULL,\n last_ping_time = NULL\n where server_id = %(server_id)s;\n if sql%%rowcount = 1 then\n -- Entry successfully updated\n commit;\n return;\n end if;\n\n insert into rhnPushClient \n (id, server_id, name, shared_key, state_id)\n values (sequence_nextval('rhn_pclient_id_seq'), %(server_id)s, %(name)s, \n %(shared_key)s, %(state_id)s);\n commit;\nend;\n")

Exception Handler Information
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py", line 118, in call_function
    response = apply(func, params)
File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 1225, in register_osad
    server_timestamp, client_name, shared_key = \
File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnServer/server_class.py", line 832, in register_push_client
    ret = server_lib.update_push_client_registration(server_id)
File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnServer/server_lib.py", line 345, in update_push_client_registration
    shared_key=shared_key, state_id=state_id)
File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 163, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 268, in _execute_wrapper
    raise rhnSQL.SQLStatementPrepareError(0, str(e), self.sql)
SQLStatementPrepareError: ('syntax error at or near "autonomous_transaction" at character 21\n', 0, "\ndeclare\n pragma autonomous_transaction;\nbegin\n update rhnPushClient \n set name = %(name)s,\n shared_key = %(shared_key)s,\n state_id = %(state_id)s,\n next_action_time = NULL,\n last_ping_time = NULL\n where server_id = %(server_id)s;\n if sql%%rowcount = 1 then\n -- Entry successfully updated\n commit;\n return;\n end if;\n\n insert into rhnPushClient \n (id, server_id, name, shared_key, state_id)\n values (sequence_nextval('rhn_pclient_id_seq'), %(server_id)s, %(name)s, \n %(shared_key)s, %(state_id)s);\n commit;\nend;\n")

Local variables by frame
Frame _execute_wrapper in /usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 268 function = <type 'instancemethod'> <bound method Cursor._execute of <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance at 0x2ae332186098>> e = <type 'instance'> syntax error at or near "autonomous_transaction" at character 21

self = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance at 0x2ae332186098> value = <type 'str'> 1ad5064c939f3754c51f7a20dbd4001adbe75ecd
                       p = <type 'tuple'> ()
kw = <type 'dict'> {'state_id': 2, 'server_id': 1000010021, 'name': '271e13ae1dab0aaa', 'shared_key': '1ad5064c939f3754c51f7a20dbd4001adbe75ecd'}
                     key = <type 'str'> shared_key
params = <type 'str'> state_id: 2,server_id: 1000010021,name: 271e13ae1dab0aaa,shared_key: 1ad5064c939f3754c51f7a20dbd4001adbe75ecd

Frame execute in /usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/sql_base.py at line 163
                       p = <type 'tuple'> ()
self = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance at 0x2ae332186098> kw = <type 'dict'> {'state_id': 2, 'server_id': 1000010021, 'name': '271e13ae1dab0aaa', 'shared_key': '1ad5064c939f3754c51f7a20dbd4001adbe75ecd'}

Frame update_push_client_registration in /usr/lib/python2.4/site-packages/spacewalk/server/rhnServer/server_lib.py at line 345
               server_id = <type 'int'> 1000010021
h = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance at 0x2ae332186098>
             client_name = <type 'str'> 271e13ae1dab0aaa
shared_key = <type 'str'> 1ad5064c939f3754c51f7a20dbd4001adbe75ecd
                state_id = <type 'int'> 2
row = <type 'instance'> {'id': 2, 'label': 'offline', 'modified': datetime.datetime(2011, 2, 2, 12, 1, 3, 893962, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33218e890>), 'name': 'offline', 'created': datetime.datetime(2011, 2, 2, 12, 1, 3, 893962, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33217f990>)} t = <type 'instance'> <spacewalk.server.rhnSQL.sql_table.Table> instance for table `rhnPushClientState' keyed on `label'

Frame register_push_client in /usr/lib/python2.4/site-packages/spacewalk/server/rhnServer/server_class.py at line 832
               server_id = <type 'int'> 1000010021
self = <class 'spacewalk.server.rhnServer.server_class.Server'> <Server Class at 47155286374416: {'self.cert': None, 'self.server': {'info': (None, 0), 'creator_id': (1, 0), 'provision_state_id': (None, 0), 'name': ('pegasus04', 0), 'created': (datetime.datetime(2011, 2, 21, 9, 49, 6, 732926, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33217f790>), 0), 'auto_update': ('Y', 0), 'running_kernel': ('2.6.32-71.el6.x86_64', 0), 'description': ('Initial Registration Parameters:\r\nOS: sl-release\r\nRelease: 6.0\r\nCPU Arch: x86_64', 0), 'org_id': (1, 0), 'modified': (datetime.datetime(2011, 2, 22, 10, 59, 9, 477398, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33217f7d0>), 0), 'server_arch_id': (1023, 0), 'secret': ('0c7b2bdf6ba390587808f86dc7f0468e', 0), 'last_boot': (1297438780, 0), 'digital_server_id': ('ID-1000010021', 0), 'release': ('6.0', 0), 'channels_changed': (datetime.datetime(2011, 2, 21, 0, 0, tzinfo=<psycopg2.tz.FixedOffsetTimezo! ne object at 0x2ae33217f1d0>), 0), 'auto_deliver': ('N', 0), 'os': ('sl-release', 0), 'id': (1000010021, 0), 'cobbler_id': (None, 0)}}>


Frame register_osad in /usr/share/rhn/server/handlers/xmlrpc/registration.py at line 1225 self = <type 'instance'> <server.handlers.xmlrpc.registration.Registration instance at 0x2ae33216c830>
                    args = <type 'dict'> {'client-timestamp': 1298375172}
               system_id = <type 'str'> <?xml version="1.0"?>
<params>
<param>
<value><struct>
<member>
<name>username</name>
<value><string>admin</string></value>
</member>
<member>
<name>operating_system</name>
<value><string>sl-release</string></value>
</member>
<member>
<name>description</name>
<value><string>Initial Registration Parameters:
OS: sl-release
Release: 6.0
CPU Arch: x86_64</string></value>
</member>
<member>
<name>checksum</name>
<value><string>63d875392a56e3639027441d350d4616</string></value>
</member>
<member>
<name>profile_name</name>
<value><string>pegasus04</string></value>
</member>
<member>
<name>system_id</name>
<value><string>ID-1000010021</string></value>
</member>
<member>
<name>architecture</name>
<value><string>x86_64</string></value>
</member>
<member>
<name>os_release</name>
<value><string>6.0</string></value>
</member>
<member>
<name>fields</name>
<value><array><data>
<value><string>system_id</string></value>
<value><string>os_release</string></value>
<value><string>operating_system</string></value>
<value><string>architecture</string></value>
<value><string>username</string></value>
<value><string>type</string></value>
</data></array></value>
</member>
<member>
<name>type</name>
<value><string>REAL</string></value>
</member>
</struct></value>
</param>
</params>

           jabber_server = <type 'str'> satellite.intra.astro.rug.nl
server = <class 'spacewalk.server.rhnServer.server_class.Server'> <Server Class at 47155286374416: {'self.cert': None, 'self.server': {'info': (None, 0), 'creator_id': (1, 0), 'provision_state_id': (None, 0), 'name': ('pegasus04', 0), 'created': (datetime.datetime(2011, 2, 21, 9, 49, 6, 732926, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33217f790>), 0), 'auto_update': ('Y', 0), 'running_kernel': ('2.6.32-71.el6.x86_64', 0), 'description': ('Initial Registration Parameters:\r\nOS: sl-release\r\nRelease: 6.0\r\nCPU Arch: x86_64', 0), 'org_id': (1, 0), 'modified': (datetime.datetime(2011, 2, 22, 10, 59, 9, 477398, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x2ae33217f7d0>), 0), 'server_arch_id': (1023, 0), 'secret': ('0c7b2bdf6ba390587808f86dc7f0468e', 0), 'last_boot': (1297438780, 0), 'digital_server_id': ('ID-1000010021', 0), 'release': ('6.0', 0), 'channels_changed': (datetime.datetime(2011, 2, 21, 0, 0, tzinfo=<psycopg2.tz.FixedOffsetTimezo! ne object at 0x2ae33217f1d0>), 0), 'auto_deliver': ('N', 0), 'os': ('sl-release', 0), 'id': (1000010021, 0), 'cobbler_id': (None, 0)}}>


Frame call_function in /usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py at line 164 e = <type 'instance'> ('syntax error at or near "autonomous_transaction" at character 21\n', 0, "\ndeclare\n pragma autonomous_transaction;\nbegin\n update rhnPushClient \n set name = %(name)s,\n shared_key = %(shared_key)s,\n state_id = %(state_id)s,\n next_action_time = NULL,\n last_ping_time = NULL\n where server_id = %(server_id)s;\n if sql%%rowcount = 1 then\n -- Entry successfully updated\n commit;\n return;\n end if;\n\n insert into rhnPushClient \n (id, server_id, name, shared_key, state_id)\n values (sequence_nextval('rhn_pclient_id_seq'), %(server_id)s, %(name)s, \n %(shared_key)s, %(state_id)s);\n commit;\nend;\n") self = <type 'instance'> <spacewalk.server.apacheRequest.apachePOST instance at 0x2ae33216cef0>
          force_rollback = <type 'int'> 1
params = <type 'tuple'> ('<?xml version="1.0"?>\n<params>\n<param>\n<value><struct>\n<member>\n<name>username</name>\n<value><string>admin</string></value>\n</member>\n<member>\n<name>operating_system</name>\n<value><string>sl-release</string></value>\n</member>\n<member>\n<name>description</name>\n<value><string>Initial Registration Parameters:\nOS: sl-release\nRelease: 6.0\nCPU Arch: x86_64</string></value>\n</member>\n<member>\n<name>checksum</name>\n<value><string>63d875392a56e3639027441d350d4616</string></value>\n</member>\n<member>\n<name>profile_name</name>\n<value><string>pegasus04</string></value>\n</member>\n<member>\n<name>system_id</name>\n<value><string>ID-1000010021</string></value>\n</member>\n<member>\n<name>architecture</name>\n<value><string>x86_64</string></value>\n</member>\n<member>\n<name>os_release</name>\n<value><string>6.0</string></value>\n</member>\n<member>\n<name>fields</name>\n<value><array><data>\n<value><string>system_id</string!

></value>\n<value><string>os_release</string></value>\n<value><string>operating_system</string></value>\n<value><string>architecture</string></value>\n<value><string>username</string></value>\n<value><string>type</string></value>\n</data></array></value>\n</member>\n<member>\n<name>type</name>\n<value><string>REAL</string></value>\n</member>\n</struct></value>\n</param>\n</params>\n', {'client-timestamp': 1298375172}) func = <type 'instancemethod'> <bound method Registration.register_osad of <server.handlers.xmlrpc.registration.Registration instance at 0x2ae33216c830>>
                  method = <type 'unicode'> registration.register_osad

Frame process in /usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py at line 471 fd = <type 'instance'> <cStringIO.StringO object at 0x2ae3298d47b0>
                   _body = <type 'str'> <?xml version='1.0'?>
<methodCall>
<methodName>registration.register_osad</methodName>
<params>
<param>
<value><string>&lt;?xml version="1.0"?&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;
&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;admin&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;operating_system&lt;/name&gt;
&lt;value&gt;&lt;string&gt;sl-release&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;description&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Initial Registration Parameters:
OS: sl-release
Release: 6.0
CPU Arch: x86_64&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;checksum&lt;/name&gt;
&lt;value&gt;&lt;string&gt;63d875392a56e3639027441d350d4616&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;profile_name&lt;/name&gt;
&lt;value&gt;&lt;string&gt;pegasus04&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;system_id&lt;/name&gt;
&lt;value&gt;&lt;string&gt;ID-1000010021&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;architecture&lt;/name&gt;
&lt;value&gt;&lt;string&gt;x86_64&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;os_release&lt;/name&gt;
&lt;value&gt;&lt;string&gt;6.0&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;fields&lt;/name&gt;
&lt;value&gt;&lt;array&gt;&lt;data&gt;
&lt;value&gt;&lt;string&gt;system_id&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;os_release&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;operating_system&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;architecture&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;username&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;type&lt;/string&gt;&lt;/value&gt;
&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;
&lt;name&gt;type&lt;/name&gt;
&lt;value&gt;&lt;string&gt;REAL&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
</string></value>
</param>
<param>
<value><struct>
<member>
<name>client-timestamp</name>
<value><int>1298375172</int></value>
</member>
</struct></value>
</param>
</params>
</methodCall>

params = <type 'tuple'> ('<?xml version="1.0"?>\n<params>\n<param>\n<value><struct>\n<member>\n<name>username</name>\n<value><string>admin</string></value>\n</member>\n<member>\n<name>operating_system</name>\n<value><string>sl-release</string></value>\n</member>\n<member>\n<name>description</name>\n<value><string>Initial Registration Parameters:\nOS: sl-release\nRelease: 6.0\nCPU Arch: x86_64</string></value>\n</member>\n<member>\n<name>checksum</name>\n<value><string>63d875392a56e3639027441d350d4616</string></value>\n</member>\n<member>\n<name>profile_name</name>\n<value><string>pegasus04</string></value>\n</member>\n<member>\n<name>system_id</name>\n<value><string>ID-1000010021</string></value>\n</member>\n<member>\n<name>architecture</name>\n<value><string>x86_64</string></value>\n</member>\n<member>\n<name>os_release</name>\n<value><string>6.0</string></value>\n</member>\n<member>\n<name>fields</name>\n<value><array><data>\n<value><string>system_id</string!

></value>\n<value><string>os_release</string></value>\n<value><string>operating_system</string></value>\n<value><string>architecture</string></value>\n<value><string>username</string></value>\n<value><string>type</string></value>\n</data></array></value>\n</member>\n<member>\n<name>type</name>\n<value><string>REAL</string></value>\n</member>\n</struct></value>\n</param>\n</params>\n', {'client-timestamp': 1298375172})
                  method = <type 'unicode'> registration.register_osad
self = <type 'instance'> <spacewalk.server.apacheRequest.apachePOST instance at 0x2ae33216cef0>

Frame handler in /usr/lib/python2.4/site-packages/spacewalk/server/apacheHandler.py at line 193 h = <type 'instance'> <spacewalk.server.rhnSQL.driver_postgresql.Cursor instance at 0x2ae33216c710> self = <type 'instance'> <spacewalk.server.apacheHandler.apacheHandler instance at 0x2ae32b5491b8> req = <type 'mp_request'> <mp_request object at 0x2ae329c3d050>
                     ret = <type 'int'> 0
templateStrings = <type 'dict'> {'email_account_info': '\nAccount Information:\n Your Spacewalk login: <login />\n Your Spacewalk email address: <email-address />', 'email_footer': '--the Spacewalk Team', 'hostname': 'satellite.intra.astro.rug.nl'}
                     row = <type 'NoneType'> None

Frame HandlerDispatch in /usr/lib64/python2.4/site-packages/mod_python/apache.py at line 299 req = <type 'mp_request'> <mp_request object at 0x2ae329c3d050> self = <type 'instance'> <mod_python.apache.CallBack instance at 0x2ae329c35b48> object = <type 'instancemethod'> <bound method apacheHandler.handler of <spacewalk.server.apacheHandler.apacheHandler instance at 0x2ae32b5491b8>> l = <type 'list'> ['spacewalk.server.apacheServer', 'Handler'] module = <type 'module'> <module 'spacewalk.server.apacheServer' from '/usr/lib/python2.4/site-packages/spacewalk/server/apacheServer.pyc'> hlist = <type 'mp_hlist'> {'handler:'spacewalk.server.apacheServer::Handler','directory':'/XMLRPC/','silent':0}
              object_str = <type 'str'> Handler
                   debug = <type 'int'> 0
             module_name = <type 'str'> spacewalk.server.apacheServer
config = <type 'mp_table'> {'PythonInterpreter': 'rhn.server'}
                     dir = <type 'str'> /XMLRPC/
                  result = <type 'int'> 500


Environment for PID=30157 on exception:
LANG = C
PATH = /sbin:/usr/sbin:/bin:/usr/bin
PWD = /
SHLVL = 2
TERM = xterm
_ = /usr/sbin/httpd


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list redhat com
https://www.redhat.com/mailman/listinfo/spacewalk-list

We would love if it you are able to contribute trying to fix this. osad/jabberd functionality is not something we list as working in a postgres based spacewalk instance. Currently rhnpush (the command line tool to upload packages into Spacewalk) does work - I just hope you did not get this confused.

More information on postgres based Spacewalk project and how folks can contribute (beyond testing & reporting bugs - which is appreciated) can be found here:

https://fedorahosted.org/spacewalk/wiki/PostgreSQL#Whenyouhiterror

Regards,
Cliff


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]