DBAPIError: (Error) ibm_db_dbi::Error: SystemError('error return without exception set',)

670 views
Skip to first unread message

Ashish Gore

unread,
Aug 30, 2013, 10:47:17 AM8/30/13
to ibm...@googlegroups.com
Hi,
We are intermittently getting the error mentioned in the subject only for some queries. The same query works great when using the db2 cli. 

Question is: how do we troubleshoot this error? There is no specific error description and call stack just says DBAPIError with no error code etc.  We are using SQL Alchemy 0.7.8


:09:13 2013] [error]     usr = query.first()
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2156, in first
[Fri Aug 30 10:09:13 2013] [error]     ret = list(self[0:1])
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2023, in __getitem__
[Fri Aug 30 10:09:13 2013] [error]     return list(res)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2227, in __iter__
[Fri Aug 30 10:09:13 2013] [error]     return self._execute_and_instances(context)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
[Fri Aug 30 10:09:13 2013] [error]     result = conn.execute(querycontext.statement, self._params)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
[Fri Aug 30 10:09:13 2013] [error]     params)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
[Fri Aug 30 10:09:13 2013] [error]     compiled_sql, distilled_params
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
[Fri Aug 30 10:09:13 2013] [error]     context)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
[Fri Aug 30 10:09:13 2013] [error]     context)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
[Fri Aug 30 10:09:13 2013] [error]     cursor.execute(statement, parameters)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/ibm_db_dbi.py", line 1311, in execute
[Fri Aug 30 10:09:13 2013] [error]     self._prepare_helper(operation)
[Fri Aug 30 10:09:13 2013] [error]   File "/www/dtweb/current/lib/python2.7/site-packages/ibm_db_dbi.py", line 1182, in _prepare_helper
[Fri Aug 30 10:09:13 2013] [error]     raise self.messages[len(self.messages) - 1]
[Fri Aug 30 10:09:13 2013] [error] DBAPIError: (Error) ibm_db_dbi::Error: SystemError('error return without exception set',)

.... query follows

Rahul

unread,
Aug 31, 2013, 2:08:00 PM8/31/13
to ibm...@googlegroups.com
Could you please share the query and CLI trace for this issue, this will help us to understand the problem.

Please refer following link if you don't know how to take CLI traces http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.admin.trb.doc/doc/t0054958.html

Thanks,
Rahul

Ashish Gore

unread,
Sep 1, 2013, 7:05:02 PM9/1/13
to ibm...@googlegroups.com, Timothy Johnston
Hi Rahul,
Thanks for your response. I am not sure if we use db2cli.ini. Here's the ls output from the /cfg folder...


-r--r--r-- 1 db2inst1 db2iadm1   14 Aug 22 16:34 bldlevel
-rw-r--r-- 1 db2inst1 db2iadm1 1819 Aug 23 10:39 db2dsdriver.cfg
-rw-rw-r-- 1 db2inst1 db2iadm1 2540 May  9 14:29 db2fodc.profile
lrwxrwxrwx 1 root     db2iadm1   34 Aug 22 16:34 db2rtcl.lvl -> /opt/ibm/db2/V10.1/cfg/db2rtcl.lvl
lrwxrwxrwx 1 root     db2iadm1   41 Aug 22 16:34 DefHealthRules.reg -> /opt/ibm/db2/V10.1/cfg/DefHealthRules.reg
-rw-rw-r-- 1 db2inst1 db2iadm1 6980 May  9 14:29 IBMLDAPSecurity.ini.sample
-r--r--r-- 1 db2inst1 db2iadm1   56 May  9 14:29 ITLMready.properties

We are using db2dsdriver.cfg for connecting to puredata. Is there any way to turn on Tracing using the .cfg file? Alternately, is there any other way to turn on tracing?  

Rahul

unread,
Sep 2, 2013, 2:29:37 AM9/2/13
to ibm...@googlegroups.com, Timothy Johnston
Hi Ashish,
 You can enable CliTrace through db2trc command also, for more info you can go through http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.admin.trb.doc/doc/t0060829.html

Thanks,
Rahul

Ashish Gore

unread,
Sep 2, 2013, 12:56:40 PM9/2/13
to ibm...@googlegroups.com, Timothy Johnston
Hi Rahul,
I am getting the below error when I run db2trc 

db2trc: error while loading shared libraries: libca_api.so: cannot open shared object file: No such file or directory

Note I am able to run 'db2' command and execute queries. 

I did find an article related to this issue: http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg1IC89927  

but I was not able to access it. 

Thanks,
Ashish

Rahul

unread,
Sep 3, 2013, 2:09:53 AM9/3/13
to ibm...@googlegroups.com, Timothy Johnston
Hi Ashish,
 Please do the $ldd `which db2trc` to check missing libraries, and copy the missing libraries from DB2 server lib directory ( In your case it may be /opt/ibm/db2/V10.1/lib64) to client lib directory.

If there libraries doesn't available at DB2 Server lib directory also then there might be an issue with DB2 installation, So please uninstall and reinstall the DB2 .


Thanks,
Rahul
Reply all
Reply to author
Forward
0 new messages