Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client

Поиск
Список
Период
Сортировка
От Stefan Viljoen
Тема Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Дата
Msg-id 000b01d0c38e$be80f880$3b82e980$@verishare.co.za
обсуждение исходный текст
Ответ на Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client  ("Stefan Viljoen" <viljoens@verishare.co.za>)
Ответы Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client  ("Faith, Jeremy" <jfaith@tycoint.com>)
Список pgsql-odbc
Hi List

The plot thickens - I have now resorted to doing a tcpdump of the postgres
port and then trying to connect via isql.

The tcpdump command used was

---
tcpdump -vvvvv -x -X -s 65535 -i lo 'port 5432' -w post.pcap
---

This has revealed that in the post.pcap file (even just viewing the raw
packet data with vi in the terminal) that the REASON postgress keeps
rejecting isql login attempts is that isql apparently passes the database
name only partially, or corrupts it randomly...

E. g. I tried this five or six times and each time, the packets sent from
unixODBC / isql binary, specifies the string

asteriskcdrdb

which denotes the database name to postgress (and therefore is critical to
control login) as

&%%@%!db
*&#!@#drdb
!@&&%$idb

etc. and sometimes mixed / along with some other ASCII crud I cannot
duplicate here.

SSL is most definitely off so this cannot be encryption?

The STRANGE thing is I can spot the username (asteriskcdruser) in the packet
data and that is ALWAYS correct and uncorrupted, and is always passed as
"asteriskcdruser".

But the database name is -always- corrupted that is sent to port 5432 from
isql to login to postgress.

So if I do with isql

---
isql -v pgdb-cdr asteriskcdruser pword
---

In effect I try to login to postgress with

*&#!@#drdb

(as indicated by the packet data)  which is of course a database that does
not exist, nor is there a role that matches "asteriskcdruser" for such a
database.

From there the error

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

which is completely logical as I'm trying to log into non-existent databases
as passed over ODBC from isql, no?

Any thoughts? How can this be fixed?

ODBC connections on the same box over the lo interface to MySQL keep working
100% - wonder why unixODBC is corrupting the database name, but ONLY when
passing it to Psql-odbc?

Or am I completely barking up the wrong tree?

Thanks

Stefan



В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Stefan Viljoen"
Дата:
Сообщение: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Следующее
От: "Faith, Jeremy"
Дата:
Сообщение: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client