mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2011-08-03, 15:46   #1
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

1039310 Posts
Default Any ODBC experts here?

I'm hitting problems with connecting to a PostgreSQL database through ODBC. Everything is running on a single 64-bit Fedora 15 system, so there's no worries about network configs, firewalls, etc. The ultimate aim is to get V3 ECMnet server running here but, with one exception, the ODBC mechanism isn't working. The exception is that the "isql" tester program works perfectly. None of iodbctest, iodbctestw and ecmserver make a successful connection. Non-ODBC connections using psql work perfectly.

Rogue has been helping me but his experience with ODBC lies in systems other than Fedora. Is there anyone else on the forum who may be able to give assistance?

I will, of course, provide as much information as I can on request, including a ssh-accessible account if necessary.

Thanks,
Paul
xilman is offline   Reply With Quote
Old 2011-08-03, 16:11   #2
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

100100100111112 Posts
Default

Quote:
Originally Posted by xilman View Post
I'm hitting problems with connecting to a PostgreSQL database through ODBC. Everything is running on a single 64-bit Fedora 15 system, so there's no worries about network configs, firewalls, etc.
I haven't dealt with ODBC for a very long time, but I do have some experience debugging network and server problems under Linux...

Some suggestions:

1. Do you have SELinux enabled? If so, in enforcing or permissive mode?

1.1. SELinux can cause problems beyond simple Firewall rules -- it can prevent software within a machine from working if it's doing "unusual" things.

2. If you can, have you tried having the server on one box, and the client on another?

2.1. tcpdump and/or Wireshark can be your best friend, letting you "sniff the wire".

3. What do (all) your logs tell you?

...for what that is worth.
chalsall is offline   Reply With Quote
Old 2011-08-03, 16:30   #3
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

22×3×503 Posts
Default

Quote:
Originally Posted by xilman View Post
I'm hitting problems with connecting to a PostgreSQL database through ODBC. Everything is running on a single 64-bit Fedora 15 system, so there's no worries about network configs, firewalls, etc. The ultimate aim is to get V3 ECMnet server running here but, with one exception, the ODBC mechanism isn't working. The exception is that the "isql" tester program works perfectly. None of iodbctest, iodbctestw and ecmserver make a successful connection. Non-ODBC connections using psql work perfectly.
Question, is isql using the odbc connection? Do you know how it is building the connection string?
rogue is offline   Reply With Quote
Old 2011-08-03, 16:34   #4
Chris Card
 
Chris Card's Avatar
 
Aug 2004

2028 Posts
Default

Quote:
Originally Posted by xilman View Post
I'm hitting problems with connecting to a PostgreSQL database through ODBC. Everything is running on a single 64-bit Fedora 15 system, so there's no worries about network configs, firewalls, etc. The ultimate aim is to get V3 ECMnet server running here but, with one exception, the ODBC mechanism isn't working. The exception is that the "isql" tester program works perfectly. None of iodbctest, iodbctestw and ecmserver make a successful connection. Non-ODBC connections using psql work perfectly.

Rogue has been helping me but his experience with ODBC lies in systems other than Fedora. Is there anyone else on the forum who may be able to give assistance?

I will, of course, provide as much information as I can on request, including a ssh-accessible account if necessary.

Thanks,
Paul
I've had ODBC working to mysql on Centos 5.4, which should be similar.

I second the suggestion of using tcpdump or wireshark to see what's going over the wire.

Also you could try running the odbc client under strace to see what it's trying to do - possibly there's a problem loading a shared library or something like that.

Chris
Chris Card is offline   Reply With Quote
Old 2011-08-03, 16:41   #5
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

22×3×503 Posts
Default

Quote:
Originally Posted by Chris Card View Post
I've had ODBC working to mysql on Centos 5.4, which should be similar.

I second the suggestion of using tcpdump or wireshark to see what's going over the wire.

Also you could try running the odbc client under strace to see what it's trying to do - possibly there's a problem loading a shared library or something like that.
Although MySQL is an option for Paul (one that I use as well), he prefers PostgreSQL. I have only had success using PostgreSQL connecting via a DSN. ODBC allows one to connect via a driver only, which works fine with MySQL, but not with PostgreSQL.
rogue is offline   Reply With Quote
Old 2011-08-03, 17:02   #6
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

3·55 Posts
Default

Quote:
Originally Posted by rogue View Post
Although MySQL is an option for Paul (one that I use as well), he prefers PostgreSQL. I have only had success using PostgreSQL connecting via a DSN. ODBC allows one to connect via a driver only, which works fine with MySQL, but not with PostgreSQL.
So this is where you have to tell your client "your preferred solution (PostgreSQL) isn't working. But this one (MySQL) is. Would you like me to implement a working solution for you, or would you like me to spend a great deal of time (and your money) debugging your preferred solution.

As an aside, I'll still bet a glass of ale that the problem is SELinux....
chalsall is offline   Reply With Quote
Old 2011-08-03, 17:09   #7
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

3·55 Posts
Default

Quote:
Originally Posted by Chris Card View Post
Also you could try running the odbc client under strace to see what it's trying to do - possibly there's a problem loading a shared library or something like that.
I second that suggestion.

Last fiddled with by chalsall on 2011-08-03 at 17:09
chalsall is offline   Reply With Quote
Old 2011-08-03, 17:49   #8
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

603610 Posts
Default

Quote:
Originally Posted by chalsall View Post
As an aside, I'll still bet a glass of ale that the problem is SELinux....
That is possible, but we don't know yet. I am able to run my software (ECMNet and PRPNet) against MySQL and PostgreSQL on both Windows and OS X.
rogue is offline   Reply With Quote
Old 2011-08-03, 18:00   #9
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

100100100111112 Posts
Default

Quote:
Originally Posted by rogue View Post
That is possible, but we don't know yet. I am able to run my software (ECMNet and PRPNet) against MySQL and PostgreSQL on both Windows and OS X.
rogue... Based on your above, just how much experience have you had in Linux?
chalsall is offline   Reply With Quote
Old 2011-08-03, 20:13   #10
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

22·3·503 Posts
Default

Quote:
Originally Posted by chalsall View Post
rogue... Based on your above, just how much experience have you had in Linux?
I haven't worked with ODBC drivers on Linux at all.

Note that many people run PRPNet on Linux using it with MySQL. Nobody has reported problems like this to me, although for those who have had problems, it always comes down to a missing library or permission or incorrect configuration.
rogue is offline   Reply With Quote
Old 2011-08-03, 20:22   #11
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

249F16 Posts
Default

Quote:
Originally Posted by rogue View Post
I haven't worked with ODBC drivers on Linux at all.

Note that many people run PRPNet on Linux using it with MySQL. Nobody has reported problems like this to me, although for those who have had problems, it always comes down to a missing library or permission or incorrect configuration.
So, then, I would suggest strongly that you take Chris Card's above advice, and run the client (and possibly the server) under strace.

If you can understand the output, it will tell you *exactly* where the client runs into problems.

(Although, if I might add, it might help you if you have a working solution under the same OS environment (but a different DB target), against which you can meta "diff" the results.)
chalsall is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring PRPNet ODBC on Linux amphoria Software 11 2020-01-14 14:23
Any Qt experts here? ET_ Programming 0 2011-08-15 10:52
Any Cocoa experts? Prime95 Programming 5 2010-05-26 00:57
Proxy server / apache experts? Prime95 Software 6 2002-10-02 16:24

All times are UTC. The time now is 12:56.

Wed Dec 2 12:56:33 UTC 2020 up 83 days, 10:07, 3 users, load averages: 4.23, 4.31, 4.35

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.