Hi, i found a message on openser-user mailing list: http://openser.org/pipermail/users/2007-April/010628.html
I'm trying to get working my openser with unixodbc+sqlite3, but i don't know why it fails with same errors..
i think is unixodbc openser's module, because with "isql -v mysqlitedb" i can access to my sqlite db...
someone can help me? :)
thanx
Fulvio
On Wednesday 21 November 2007, kionez wrote:
Hi, i found a message on openser-user mailing list: http://openser.org/pipermail/users/2007-April/010628.html
I'm trying to get working my openser with unixodbc+sqlite3, but i don't know why it fails with same errors..
i think is unixodbc openser's module, because with "isql -v mysqlitedb" i can access to my sqlite db...
someone can help me? :)
Hi Kionez,
try to increate the debug level in the openser config (debug=9), to get more hints about the error. You could post some relevant parts of this output to the list. Also look into the unixodbc log, if there is one. What version of openser ("openser -V") do you use?
Cheers,
Henning
#include <Henning Westerholt.h> // created 21/11/2007 19:06
try to increate the debug level in the openser config (debug=9), to get more hints about the error. You could post some relevant parts of this output to the list. Also look into the unixodbc log, if there is one. What version of openser ("openser -V") do you use?
version of softwares: openser: 1.2.2-notls (from debian and from source) sqlite: 3.4.2 (from debian) or 3.5.2 (from source) unixodbc: 2.2.11 (from debian) or 2.2.12 (from source) sqliteodbc: 0.76 (from source)
and here the relevant parts of configs:
- /etc/openser/openser.cfg
debug=9 log_stderror=yes fork=no
modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("usrloc|auth_db", "db_url","unixodbc://SQLite/mysqlitedb")
- /etc/odbcinst.ini
[ODBC] Trace = yes TraceFile = /tmp/unixodbc.log
[SQLite] Description = SQLite ODBC Driver Driver = /usr/local/lib/libsqlite3odbc.so Setup = /usr/local/lib/libsqlite3odbc.so
- /etc/odbc.ini
[mysqlitedb] Description = SQLite Driver = SQLite Database = /tmp/mytest.db Timeout = 20000
and now, the relevant part of output: # openser
0(0) db_init: Connection 'unixodbc://SQLite/mysqlitedb' not found in pool 0(0) DEBUG:unixodbc:build_conn_str: connection string is <DSN=mysqlitedb;PWD=;> 0(0) ERROR:unixodbc:new_connection: failed to connect 0(0) register_udomain(): Can not open database connection 0(0) domain_fixup(): Error while registering domain 0(0) ERROR: fix_actions: fixing failed (code=-1) at cfg line 144 ERROR: error -1 while trying to fix configuration
k.
#include <kionez.h> // created 22/11/2007 09:18
i forget the unixodbc log! :)
it seems that unixodbc module try to connect to my DSN with a password (but i don't configure anything in openser.cfg..) i try also to change my unixodbc:// connect string in something like:
unixodbc:///mysqlitedb unixodbc://user:pass@localhost/mysqlitedb unixodbc:///tmp/mytest.db unixodbc://user@SQLite/mysqlitedb
but without success... (if i connect to my sqlite db with isql -v mysqlitedb, it works... i think that unixodbc+sqliteodbc+sqlite are working.. the issue is in unixodbc module...)
- /tmp/unixodbc.log
[ODBC][31407][SQLAllocHandle.c][463] Exit:[SQL_SUCCESS] Output Handle = 0x823dc88 [ODBC][31407][SQLDriverConnect.c][678] Entry: Connection = 0x823dc88 Window Hdl = 0x1 Str In = [DSN=mysqlitedb;PWD=;][length = 20 (SQL_NTS)] Str Out = 0xbfd3c84a Str Out Max = 1024 Str Out Ptr = 0xbfd3cc4a Completion = 1 UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
[ODBC][31407][SQLDriverConnect.c][1258] Exit:[SQL_INVALID_HANDLE]
k.
On Thursday 22 November 2007, kionez wrote:
#include <kionez.h> // created 22/11/2007 09:18
i forget the unixodbc log! :)
it seems that unixodbc module try to connect to my DSN with a password (but i don't configure anything in openser.cfg..) i try also to change my unixodbc:// connect string in something like:
Hi Kionez,
i've improved the DSN generation in the unixodbc module. I've also found an additional bug in the connect function to the database. There was a invalid pointer specified.
I've tested it with sqlite3, works now. Please update from svn (in branch 1.2) and test. Alternativly you find the patch at:
http://openser.svn.sourceforge.net/openser/?rev=3195&view=rev
Cheers,
Henning