Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 04:27 PM
noreply@pgfoundry.org
 
Posts: n/a
Default [ psqlodbc-Bugs-1010368 ] connection problem with postgresql driver 8.03.0100 to postgresql 8.3.0

Bugs item #1010368, was opened at 2008-03-31 07:31
You can respond by visiting:
http://pgfoundry.org/tracker/?func=d...oup_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Sebastian Reitenbach (buzzdee)
>Assigned to: Hiroshi Inoue (hinoue)

Summary: connection problem with postgresql driver 8.03.0100 to postgresql 8.3.0

Initial Comment:
I compiled postgres odbc driver version 8.03.0100, but when I try to connect
to a 8.3.0 postgres database, then there connection/authentication problems
happen:

isql FIS MyUser MyPassword -v
[28000][unixODBC]Communication error during authentication;
Error while reading from the socket.
[ISQL]ERROR: Could not SQLConnect
dbuser@dbhost:~> isql FIS MyDatabase MyDatabase -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>

I can only connect to the database by a chance of 1/10. Also when I get
connected, then when I try entering a SQL statement, I get error messages
about not being connected anymore.

and below the postgres log from the tries:


LOG: connection authorized: user=MyUser database=MyDatabase
LOG: unexpected EOF on client connection
LOG: disconnection: session time: 0:00:00.002 user=MyUser
database=MyDatabase
host=192.168.15.106 port=52224
DEBUG: server process (PID 19939) exited with exit code 0
LOG: connection received: host=192.168.15.106 port=52225
DEBUG: forked new backend, pid=19941 socket=6
LOG: connection authorized: user=MyUser database=MyDatabase
LOG: unexpected EOF on client connection
LOG: disconnection: session time: 0:00:00.003 user=MyDatabase
database=MyDatabase
host=192.168.15.106 port=52225
DEBUG: server process (PID 19941) exited with exit code 0
LOG: connection received: host=192.168.15.106 port=52226
DEBUG: forked new backend, pid=19943 socket=6
LOG: connection authorized: user=MyUser database=MyDatabase
LOG: statement:
LOG: statement: select version()
LOG: statement: set DateStyle to 'ISO'
LOG: statement: set geqo to 'OFF'
LOG: statement: set extra_float_digits to 2
LOG: statement: select oid, typbasetype from pg_type where typname = 'lo'
LOG: statement: select pg_client_encoding()
ERROR: synt x error at or near " at character 1
LOG: could not send data to client: Broken pipe
LOG: unexpected EOF on client connection

This is the part of the configuration from my odbc.ini:
[FIS]
Description = PostgreSQL DB
Driver = PostgreSQL
commlog = yes
Database = MyDatabase
Host = localhost
Server = localhost
ServerName = pdtest106.pdtest.intern
Username = MyUser
Password = MyPassword
Port = 5430
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =

Actually, I have no idea, what the protocol version number means. The
version 6.4 was the one I found most of the time in the net. I also tried to
set it to 8.3, and 8.3.0, but with no difference. Any pointer to an
explanation would be great.

when I exchange the odbc driver file, with an older one, odbc drvier version
8.1.2, then I do not have connection/login problems at all.

----------------------------------------------------------------------

>Comment By: Hiroshi Inoue (hinoue)

Date: 2008-04-03 17:20

Message:
Please try the second patch.

regards,
Hiroshi Inoue

----------------------------------------------------------------------

Comment By: Sebastian Reitenbach (buzzdee)
Date: 2008-04-02 10:21

Message:
I just retried to compile against postgresql 8.3.1, but
with the same result. Note, for the test I did not used
your patch.

----------------------------------------------------------------------

Comment By: Sebastian Reitenbach (buzzdee)
Date: 2008-04-02 08:40

Message:
Forgot to mention, I compiled with and
without --disable-unicode --disable-openssl
but both versions show the same results.

----------------------------------------------------------------------

Comment By: Sebastian Reitenbach (buzzdee)
Date: 2008-04-02 08:32

Message:
Thanks for the patch, I just tested. It did not apply
cleanly:
/usr/local/src/psqlodbc-08.03.0100 # patch -p0
< ../psqlodbc.patch
patching file ./socket.c
Hunk #1 succeeded at 347 (offset -6 lines).
Hunk #2 FAILED at 519.
Hunk #3 FAILED at 529.
Hunk #4 succeeded at 811 (offset -6 lines).
Hunk #5 succeeded at 868 (offset -6 lines).
Hunk #6 succeeded at 947 (offset -6 lines).
2 out of 6 hunks FAILED -- saving rejects to
file ./socket.c.rej

However, after taking a look into the source and the patch
file, I changed the section to look like this:

#ifdef USE_SSL
/*
* The stuff for SSL.
*/
/* included in <openssl/ssl.h> */
#define SSL_ERROR_NONE 0
#define SSL_ERROR_SSL 1
#define SSL_ERROR_WANT_READ 2
#define SSL_ERROR_WANT_WRITE 3
#define SSL_ERROR_WANT_X509_LOOKUP 4
#define SSL_ERROR_SYSCALL 5 // look at error
stack/return value/errno
#define SSL_ERROR_ZERO_RETURN 6
#define SSL_ERROR_WANT_CONNECT 7
#define SSL_ERROR_WANT_ACCEPT 8
// */

However, the patch did not helped.
I still get these error messages:

isql MyDatabase -v
[28000][unixODBC]Communication error during
authentication;
Error while reading from the socket.
[ISQL]ERROR: Could not SQLConnect


The mylog_root21305.log is from above message.


isql MyDatabase -v
[S1000][unixODBC]The database does not exist on the server
or user authentication failed.
[ISQL]ERROR: Could not SQLConnect

The mylog_root21305.log is from above message.


----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2008-04-01 15:53

Message:
Please try the attached patch.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2008-03-31 10:23

Message:
Could you attach the Mylog output ?
You will be able to take the log (/tmp/mylog_xxxx.log) by adding the line
Debug = 1
to your odbc.ini.

regards,
Hiroshi Inoue


----------------------------------------------------------------------

You can respond by visiting:
http://pgfoundry.org/tracker/?func=d...oup_id=1000125

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145