Hi,
I would like to connect openser 1.2 to sqlite db with unixodbc. I have installed unixodbc et sqlite driver and i configure openser.cfg but it doesn't working. I seems the configuration wants user:password@ip but for sqlite there no need this. I have testing lot off configuration but it doesn't work.
My configuration and log :
File /etc/odbc.ini
[mysqlitedb] Description = SQLite Driver = SQLite Database = /tmp/mytest.db Timeout = 100000 StepAPI = No NoWCHAR = No LongNames = No
File /etc/odbcinst.ini
[SQLite] Description = SQLite ODBC Driver Driver = /usr/lib/odbc/libsqliteodbc.so Setup = /usr/lib/odbc/libsqliteodbc.so UsageCount = 1
File /etc/openser/openser.cfg
loadmodule "unixodbc.so" loadmodule "auth.so" loadmodule "auth_db.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") 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")
My log :
Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH_DB module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR:unixodbc:new_connection: failed to connect Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: register_udomain(): Can not open database connection Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: domain_fixup(): Error while registering domain Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 148 Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: INFO:mi_fifo:mi_destroy: process hasn't been created -> nothing to kill
Thank for your help. Sylvain
Sylvain Boily wrote:
Hi,
I would like to connect openser 1.2 to sqlite db with unixodbc. I have installed unixodbc et sqlite driver and i configure openser.cfg but it doesn't working. I seems the configuration wants user:password@ip but for sqlite there no need this. I have testing lot off configuration but it doesn't work.
My configuration and log :
File /etc/odbc.ini
[mysqlitedb] Description = SQLite Driver = SQLite Database = /tmp/mytest.db Timeout = 100000 StepAPI = No NoWCHAR = No LongNames = No
File /etc/odbcinst.ini
[SQLite] Description = SQLite ODBC Driver Driver = /usr/lib/odbc/libsqliteodbc.so Setup = /usr/lib/odbc/libsqliteodbc.so UsageCount = 1
File /etc/openser/openser.cfg
loadmodule "unixodbc.so" loadmodule "auth.so" loadmodule "auth_db.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") 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")
My log :
Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH_DB module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR:unixodbc:new_connection: failed to connect Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: register_udomain(): Can not open database connection Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: domain_fixup(): Error while registering domain Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 148 Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: INFO:mi_fifo:mi_destroy: process hasn't been created -> nothing to kill
Hi Sylvain!
It's may be a bug/feature when ODBC return SQL_SUCCESS_WITH_INFO which treat as error in current releases. It will be fixed in future releases I hope (see http://openser.org/pipermail/devel/2007-April/007070.html) Now you can try comment "goto err" line 147 (for 1.2.0 release) in odbc/my_con.c and reinstall module
Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH_DB module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR:unixodbc:new_connection: failed to connect Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: register_udomain(): Can not open database connection Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: domain_fixup(): Error while registering domain Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 148 Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: INFO:mi_fifo:mi_destroy: process hasn't been created -> nothing to kill
Hi Sylvain!
It's may be a bug/feature when ODBC return SQL_SUCCESS_WITH_INFO which treat as error in current releases. It will be fixed in future releases I hope (see http://openser.org/pipermail/devel/2007-April/007070.html) Now you can try comment "goto err" line 147 (for 1.2.0 release) in odbc/my_con.c and reinstall module
Hi victor,
Thanks you, i test this.
Sylvain
Hi Vistor,
the SQL_SUCCESS_WITH_INFO issue was fixed on devel version ~ one week ago. Also I just backported the fix to 1.2.0 and 1.1.x
Thanks and regards, bogdan
Victor Gamov wrote:
Sylvain Boily wrote:
Hi,
I would like to connect openser 1.2 to sqlite db with unixodbc. I have installed unixodbc et sqlite driver and i configure openser.cfg but it doesn't working. I seems the configuration wants user:password@ip but for sqlite there no need this. I have testing lot off configuration but it doesn't work.
My configuration and log :
File /etc/odbc.ini [mysqlitedb] Description = SQLite Driver = SQLite Database = /tmp/mytest.db Timeout = 100000 StepAPI = No NoWCHAR = No LongNames = No
File /etc/odbcinst.ini
[SQLite] Description = SQLite ODBC Driver Driver = /usr/lib/odbc/libsqliteodbc.so Setup = /usr/lib/odbc/libsqliteodbc.so UsageCount = 1
File /etc/openser/openser.cfg
loadmodule "unixodbc.so" loadmodule "auth.so" loadmodule "auth_db.so" modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") 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")
My log :
Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: AUTH module
- initializing Apr 21 13:33:25 sylvain-desktop
/usr/sbin/openser[24539]: AUTH_DB module - initializing Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR:unixodbc:new_connection: failed to connect Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: register_udomain(): Can not open database connection Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: domain_fixup(): Error while registering domain Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 148 Apr 21 13:33:25 sylvain-desktop /usr/sbin/openser[24539]: INFO:mi_fifo:mi_destroy: process hasn't been created -> nothing to kill
Hi Sylvain!
It's may be a bug/feature when ODBC return SQL_SUCCESS_WITH_INFO which treat as error in current releases. It will be fixed in future releases I hope (see http://openser.org/pipermail/devel/2007-April/007070.html) Now you can try comment "goto err" line 147 (for 1.2.0 release) in odbc/my_con.c and reinstall module