Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#598525: erlang-odbc: odbc:connect(ConnStr, Options) fails with timeout

36 views
Skip to first unread message

Christian Adams

unread,
Sep 29, 2010, 1:40:03 PM9/29/10
to
Package: erlang-odbc
Version: 1:14.a-dfsg-2
Severity: important

When I try to setup an odbc-connection to a local installed postgresql(8.4) database i get the following:

---- snip ----
Erlang R14A (erts-5.8) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.8 (abort with ^G)
1> odbc:start().
ok
2> odbc:connect("DSN=postgres;UID=username;PWD=passwd", [{scrolling_cursors, off}, {trace_driver, on}]).

=ERROR REPORT==== 29-Sep-2010::18:54:26 ===
** Generic server <0.39.0> terminating
** Last message in was {<0.32.0>,
{connect,[1,1,1,1,1,2,
"DSN=postgres;UID=username;PWD=passwd"],
on,on},
infinity}
** When Server state == {state,#Port<0.629>,
{<0.32.0>,#Ref<0.0.0.39>},
<0.32.0>,undefined,on,undefined,undefined,on,
connecting,undefined,0,
[#Port<0.627>,#Port<0.628>],
undefined,undefined}
** Reason for termination ==
** timeout
{error,connection_closed}

---- snap ----

/etc/odbcinst.ini:
---- snip ----
[PostgreSQL ANSI]
Description = PostgreSQL ODBC driver (ANSI version)
Driver = /usr/lib/odbc/psqlodbca.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 1
CommLog = 1
UsageCount = 1

[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver (Unicode version)
Driver = /usr/lib/odbc/psqlodbcw.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 1
CommLog = 1
UsageCount = 1
---- snap ----

/etc/odbc.ini:
---- snip ----
[postgres]
Description = PostgreSQL ANSI
Driver = PostgreSQL ANSI
Trace = Yes
TraceFile = /tmp/sql.log
Port = 5432
Servername = localhost
Database = template1
---- snap ----

neither /tmp/sql.log is found nor a SQL.LOG which should have been written with the option {trace_driver, on}.

Cheers, Christian Adams

-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (900, 'testing'), (750, 'testing'), (750, 'stable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages erlang-odbc depends on:
ii erlang-base-hipe 1:14.a-dfsg-2 Erlang/OTP HiPE enabled virtual ma
ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib
ii unixodbc 2.2.14p2-1 ODBC tools libraries

erlang-odbc recommends no packages.

Versions of packages erlang-odbc suggests:
ii erlang 1:14.a-dfsg-2 Concurrent, real-time, distributed
ii erlang-doc 1:14.a-dfsg-2 Erlang/OTP HTML/PDF documentation
ii erlang-manpages 1:14.a-dfsg-2 Erlang/OTP manual pages

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Sergei Golovan

unread,
Oct 12, 2010, 4:10:03 AM10/12/10
to
Hi Christian!

Sorry for a delay.

On Wed, Sep 29, 2010 at 9:17 PM, Christian Adams
<ad...@skavaer.homelinux.org> wrote:
>
> When I try to setup an odbc-connection to a local installed postgresql(8.4) database i get the following:
>
> ---- snip ----
> Erlang R14A (erts-5.8) [source] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
>
> Eshell V5.8  (abort with ^G)
> 1> odbc:start().
> ok
> 2> odbc:connect("DSN=postgres;UID=username;PWD=passwd", [{scrolling_cursors, off}, {trace_driver, on}]).
>
> =ERROR REPORT==== 29-Sep-2010::18:54:26 ===
> ** Generic server <0.39.0> terminating

I've tried to run it (though with unixodbc 2.2.11 and postgresql 8.3
from Lenny) and it seems to work fine.

Could you try to check if unixodbc works itself (using isql for example)?

Also, try to install the erlang-base package instead of
erlang-base-hipe (it tends to be more robust).

>
> Versions of packages erlang-odbc depends on:
> ii  erlang-base-hipe           1:14.a-dfsg-2 Erlang/OTP HiPE enabled virtual ma
> ii  libc6                      2.11.2-6      Embedded GNU C Library: Shared lib
> ii  unixodbc                   2.2.14p2-1    ODBC tools libraries

--
Sergei Golovan

Christian Adams

unread,
Oct 15, 2010, 3:30:02 PM10/15/10
to
Hi Sergei,

Am 12.10.2010 um 10:08 schrieb Sergei Golovan:

I've tried to run it (though with unixodbc 2.2.11 and postgresql 8.3
from Lenny) and it seems to work fine.

Could you try to check if unixodbc works itself (using isql for example)?

unixodbc itself works (tested with isql, odbctest, DataManager)
I also tested with a SQLite DSN with the same results ..

Also, try to install the erlang-base package instead of
erlang-base-hipe (it tends to be more robust).

installing erlang-base on this machine instead of erlang-base-hipe made
no difference at all ..
but I did the same tests on some other machines (a Powerbook G4 and a
freshly installed squeeze in a VirtualBox) and to my surprise it worked
like it should ..
you can close the bug as it looks like a false alarm .. but I now have a
question: do you have an idea how I could solve the problem on the
'faulty' machine?

Cheers, Christian Adams

Sergei Golovan

unread,
Oct 16, 2010, 4:40:01 AM10/16/10
to
On Fri, Oct 15, 2010 at 11:01 PM, Christian Adams
<ad...@skavaer.homelinux.org> wrote:
>  Hi Sergei,
>
> Am 12.10.2010 um 10:08 schrieb Sergei Golovan:
>
> I've tried to run it (though with unixodbc 2.2.11 and postgresql 8.3
> from Lenny) and it seems to work fine.

Using unixodbc 2.2.14p2-2 from sid works for me also.

>
> Could you try to check if unixodbc works itself (using isql for example)?
>
> unixodbc itself works (tested with isql, odbctest, DataManager)
> I also tested with a SQLite DSN with the same results ..

OK

>
> Also, try to install the erlang-base package instead of
> erlang-base-hipe (it tends to be more robust).
>
> installing erlang-base on this machine instead of erlang-base-hipe made no
> difference at all ..
> but I did the same tests on some other machines (a Powerbook G4 and a
> freshly installed squeeze in a VirtualBox) and to my surprise it worked like
> it should  ..
> you can close the bug as it looks like a false alarm .. but I now have a
> question: do you have an idea how I could solve the problem on the 'faulty'
> machine?

On connect Erlang ODBC application opens two TCP sockets (using IPv6 if
available or IPv4), runs odbcserver process and expects it to connect back to
both these sockets. If it fails to do that in 5 seconds it stops with
timeout error
(as in your case). So, there might be firewall issues.

Cheers!
--
Sergei Golovan

0 new messages