From: Alisdair T. <ali...@ep...> - 2006-06-12 13:12:24
|
Hi, I've installed PyDB2 on an Opteron machine running Fedora Core 5 x64. The database is DB2 Express-C. When I try to connect from python I get the following error: alisdair@xxxx ~: python Python 2.4.2 (#1, Feb 12 2006, 03:45:41) [GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import DB2 >>> DB2.connect(dsn="onetest", uid="alisdair", pwd="xxxx") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib64/python2.4/site-packages/DB2.py", line 271, in __init__ self._db = _db2.connect(*args, **kwargs) _db2.DatabaseError: ('HY000', -1042, '[IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004\n') and in the db2diag.log I get some warnings of the form: 2006-06-09-17.13.52.251413+060 E220936G303 LEVEL: Warning (OS) PID : 3935 TID : 4069239712 PROC : java INSTANCE: db2inst1 NODE : 000 FUNCTION: DB2 UDB, oper system services, sqloclose, probe:110 CALLED : OS, -, unspecified_system_function OSERR: EBADF (9) and one error: 2006-06-12-13.54.22.605271+060 I265406E425 LEVEL: Error PID : 28127 TID : 47166186442352 FUNCTION: DB2 Common, Cryptography, cryptContextRealInit, probe:40 MESSAGE : ECF=0x90000403 Unexpected cryptographic error DATA #1 : Hex, 4 bytes 0x0 DATA #2 : Hex, 4 bytes 0x0 DATA #3 : Hex, 4 bytes 0x0 DATA #4 : String, 78 bytes /home/db2inst1/sqllib/lib/icc/icclib/libicclib.so: wrong ELF class: ELFCLASS32 This seems to indicate a 64/32 bit problem. I changed the lib and include paths in db2profile to lib64 and include64 and restarted the database. The warnings went away but not the error. (It surprised me that this made any difference since it is a 32-bit instance of the database). Any suggestions on how I can diagnose this, or things to try to get it working, would be much appreciated. Thanks, Alisdair | Alisdair Tullo :: epcc :: University of Edinburgh | | ---------------------- :: ali...@ep... | |
From: Yuval T. <yu...@ad...> - 2006-06-12 13:20:12
|
Alisdair Tullo wrote: > Hi, > > I've installed PyDB2 on an Opteron machine running Fedora Core 5 x64. The > database is DB2 Express-C. > > When I try to connect from python I get the following error: > > alisdair@xxxx ~: python > Python 2.4.2 (#1, Feb 12 2006, 03:45:41) > [GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>> import DB2 >>>> DB2.connect(dsn="onetest", uid="alisdair", pwd="xxxx") >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib64/python2.4/site-packages/DB2.py", line 271, in __init__ > self._db = _db2.connect(*args, **kwargs) > _db2.DatabaseError: ('HY000', -1042, '[IBM][CLI Driver] SQL1042C An > unexpected system error occurred. SQLSTATE=58004\n') > > and in the db2diag.log I get some warnings of the form: > > 2006-06-09-17.13.52.251413+060 E220936G303 LEVEL: Warning (OS) > PID : 3935 TID : 4069239712 PROC : java > INSTANCE: db2inst1 NODE : 000 > FUNCTION: DB2 UDB, oper system services, sqloclose, probe:110 > CALLED : OS, -, unspecified_system_function OSERR: EBADF (9) > > and one error: > > 2006-06-12-13.54.22.605271+060 I265406E425 LEVEL: Error > PID : 28127 TID : 47166186442352 > FUNCTION: DB2 Common, Cryptography, cryptContextRealInit, probe:40 > MESSAGE : ECF=0x90000403 Unexpected cryptographic error > DATA #1 : Hex, 4 bytes > 0x0 > DATA #2 : Hex, 4 bytes > 0x0 > DATA #3 : Hex, 4 bytes > 0x0 > DATA #4 : String, 78 bytes > /home/db2inst1/sqllib/lib/icc/icclib/libicclib.so: wrong ELF class: > ELFCLASS32 > > This seems to indicate a 64/32 bit problem. I changed the lib and include > paths in db2profile to lib64 and include64 and restarted the database. The > warnings went away but not the error. (It surprised me that this made any > difference since it is a 32-bit instance of the database). > > Any suggestions on how I can diagnose this, or things to try to get it > working, would be much appreciated. Is your module compiled for 32 or 64 bit ? |
From: Alisdair T. <ali...@ep...> - 2006-06-12 13:26:02
|
Hi, > Alisdair Tullo wrote: >> I've installed PyDB2 on an Opteron machine running Fedora Core 5 x64. The >> database is DB2 Express-C. .... On Mon, 12 Jun 2006, Yuval Turgeman wrote: > Is your module compiled for 32 or 64 bit ? I should have checked this first, apologies. When I compiled let setup.py do what it does by default. Looking at the output, it seems that gcc was given the -m64 option, so it will be a 64-bit binary. I'll try -m32 and report back. Cheers, Alisdair | Alisdair Tullo :: epcc :: University of Edinburgh | | ---------------------- :: ali...@ep... | |
From: Yuval T. <yu...@ad...> - 2006-06-12 13:32:36
|
Alisdair Tullo wrote: > When I compiled let setup.py do what it does by default. Looking at > the output, it seems that gcc was given the -m64 option, so it will be > a 64-bit binary. I'll try -m32 and report back. Use "file _db2.so" and paste back the output. :-) |
From: Alisdair T. <ali...@ep...> - 2006-06-12 13:40:44
|
On Mon, 12 Jun 2006, Yuval Turgeman wrote: > Use "file _db2.so" and paste back the output. :-) I just thought of that :) I can confirm that it is a 64-bit binary. I'm also in the process of finding out that I have a 64-bit Python and so building a 32-bit module for it won't work. I think my best bet will be to create a 64-bit DB instance. Thanks for your help, Alisdair | Alisdair Tullo :: epcc :: University of Edinburgh | | ---------------------- :: ali...@ep... | |
From: Yuval T. <yu...@ad...> - 2006-06-12 13:53:47
|
Alisdair Tullo wrote: > > On Mon, 12 Jun 2006, Yuval Turgeman wrote: >> Use "file _db2.so" and paste back the output. :-) > > I just thought of that :) I can confirm that it is a 64-bit binary. > > I'm also in the process of finding out that I have a 64-bit Python and > so building a 32-bit module for it won't work. I think my best bet > will be to create a 64-bit DB instance. Yep - you have to run everything (db instance, python, and pydb2) either in 32 or 64 bit mode. You can't mix them (db instance 32 bit and python 64 bit for example) |