Hello, I do not think someone ever tried to run Spacewalk with pg9.6. So, there can be a lot of issues.
The failed query is however defined in [1]. My guess is, the code could be triggered, when a client system runs rhn_check, but I could be wrong. Regards, -- Tomas Lestach Red Hat Satellite Engineering, Red Hat [1] https://github.com/spacewalkproject/spacewalk/blob/master/backend/server/handlers/xmlrpc/queue.py On Tue, Nov 15, 2016 at 1:24 PM, Devrim Gündüz <dev...@gunduz.org> wrote: > > Hi, > > Greetings first: I am a long term Red Hat / Fedora user, Fedora packager > and > PostgreSQL contributor. Currently managing PostgreSQL official YUM > repository, > along with several packages for Fedora and EPEL. > > Recently, I deployed Spacewalk on a CentOS 7.2 box, and used PostgreSQL > 9.6 in > the backend, along with the latest JDBC driver (For the archives, I > managed to > run Spacewalk using community PostgreSQL repositories with a few minor > hacks, > > Every day, a few times, getting a traceback email: > > ============================================================ > ================== > Extra information about this error: > SQL Error generated: ('ERROR: syntax error at or near "method"\nLINE 3: > ... sa.remaining_tries, at.label method,\n > ^\n', <connection > object at 0x7f0101b19180; dsn: 'password=xxxxxxxxxxxxx dbname=spacewalkdb > user=spacewalkuser', closed: 0>, '\n select sa.action_id > id, a.version,\n sa.remaining_tries, at.label > method,\n at.unlocked_only,\n > a.prerequisite\n from rhnServerAction sa,\n > rhnAction a,\n > rhnActionType at\n where sa.server_id = > %(server_id)s\n and sa.action_id = a.id\n > and a.action_type = at.id\n and > sa.status in (0, 1) -- Queued or picked up\n and > a.earliest_action <= current_timestamp -- Check earliest_action\n > and not exists (\n select 1\n > from rhnServerAction sap\n > where sap.server_id = %(server_id)s\n > and sap.action_id = a.prerequisite\n and > sap.status != 2 -- completed\n )\n > order by a.earliest_action, a.prerequisite nulls first, a.id\n ') > > Exception Handler Information > Traceback (most recent call last): > File "/usr/lib/python2.7/site-packages/spacewalk/server/apacheRequest.py", > line 135, in call_function > response = func(*params) > File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 327, in get > h.execute(server_id=self.server_id) > File "/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/sql_base.py", > line 151, in execute > return self._execute_wrapper(self._execute, *p, **kw) > File > "/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", > line 303, in _execute_wrapper > raise sql_base.SQLStatementPrepareError(self.dbh, e.pgerror, self.sql) > SQLStatementPrepareError: ('ERROR: syntax error at or near "method"\nLINE > 3: ... sa.remaining_tries, at.label method,\n > ^\n', <connection > object at 0x7f0101b19180; dsn: 'password=xxxxxxxxxxxxx dbname=spacewalkdb > user=spacewalkuser', closed: 0>, '\n select sa.action_id > id, a.version,\n sa.remaining_tries, at.label > method,\n at.unlocked_only,\n > a.prerequisite\n from rhnServerAction sa,\n > rhnAction a,\n > rhnActionType at\n where sa.server_id = > %(server_id)s\n and sa.action_id = a.id\n > and a.action_type = at.id\n and > sa.status in (0, 1) -- Queued or picked up\n and > a.earliest_action <= current_timestamp -- Check earliest_action\n > and not exists (\n select > 1\n from rhnServerAction sap\n > where sap.server_id = %(server_id)s\n > and sap.action_id = a.prerequisite\n and > sap.status != 2 -- completed\n )\n > order by a.earliest_action, a.prerequisite nulls first, a.id\n ') > > Local variables by frame > Frame _execute_wrapper in /usr/lib/python2.7/site- > packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 303 > function = <type 'instancemethod'> <bound method > Cursor._execute of <spacewalk.server.rhnSQL.driver_postgresql.Cursor > instance at 0x7f0101def758>> > e = <class 'psycopg2.ProgrammingError'> syntax > error at or near "method" > LINE 3: ... sa.remaining_tries, at.label method, > ^ > > self = <type 'instance'> > <spacewalk.server.rhnSQL.driver_postgresql.Cursor > instance at 0x7f0101def758> > value = <type 'int'> 1000010020 > p = <type 'tuple'> () > kw = <type 'dict'> {'server_id': 1000010020} > key = <type 'str'> server_id > params = <type 'str'> server_id: 1000010020 > > Frame execute in > /usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/sql_base.py > at line 151 > p = <type 'tuple'> () > self = <type 'instance'> > <spacewalk.server.rhnSQL.driver_postgresql.Cursor > instance at 0x7f0101def758> > kw = <type 'dict'> {'server_id': 1000010020} > > Frame get in /usr/share/rhn/server/handlers/xmlrpc/queue.py at line 327 > status = <type 'dict'> {'uname': ['Linux', > 'koji-sl6-x86-64-pg93', '2.6.32-642.4.2.el6.x86_64', '#1 SMP Tue Aug 23 > 11:15:56 CDT 2016', 'x86_64'], 'uptime': [4483833, 4428834]} > h = <type 'instance'> > <spacewalk.server.rhnSQL.driver_postgresql.Cursor > instance at 0x7f0101def758> > self = <type 'instance'> > <server.handlers.xmlrpc.queue.Queue instance at 0x7f0101dedab8> > ret = <type 'dict'> {} > version = <type 'int'> 2 > system_id = <type 'str'> <?xml version="1.0"?> > ============================================================ > ================== > > It looks like the SQL query is throwing errors somewhere. I think this is > related to PostgreSQL 9.6. If you can point me to the place that I can > look, I > will be more than happy to provide a patch. > > Thanks! > > Regards, > -- > Devrim GÜNDÜZ > EnterpriseDB: http://www.enterprisedb.com > PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer > Twitter: @DevrimGunduz , @DevrimGunduzTR > > _______________________________________________ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel >
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel