Re: FreeBSD 7-amd-64 broken-ness

From: Guy Rouillier <guyr-ml1(at)burntmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: FreeBSD 7-amd-64 broken-ness
Date: 2008-08-30 03:59:47
Message-ID: 48B8C5B3.20804@burntmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

marc+jdbc(at)milestonerdl(dot)com wrote:
> Tried getting PL/Java working, then went with the test code here:
> http://developer.apple.com/internet/opensource/postgres.html

First, I don't know why you mention PL/Java and that sample program in
the same sentence. They do two entirely different things: PL/Java is
used to write Java code that runs inside the database, e.g., stored
procedures. That sample program is a generic client application
connecting to a PostgreSQL database using JDBC. At any rate, looking at
the sample code, the parameters you provide below would require that you
to be running on the same box as the DB, and that the DB has been
configured to allow local access. Have you tried connecting to this
database using psql on the DB server to ensure that the DB is running
properly?

>
> Said code works on FreeBSD 6.3-i386
>
> Here is the brokeness on amd64
>
> $ java PgTest test liz liz
> Caught Exception:
> org.postgresql.util.PSQLException: The connection attempt failed.
> org.postgresql.util.PSQLException: The connection attempt failed.
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conne
> ctionFactoryImpl.java:137)
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactor
> y.java:66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Conn
> ection.java:124)
> at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Conn
> ection.java:30)
> at org.postgresql.jdbc3g.Jdbc3gConnection.<init>(Jdbc3gConnection.java:2
> 4)
> at org.postgresql.Driver.makeConnection(Driver.java:386)
> at org.postgresql.Driver.connect(Driver.java:260)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at PgTest.<init>(PgTest.java:26)
> at PgTest.main(PgTest.java:63)
> Caused by: java.net.SocketException: Invalid argument
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> at java.net.Socket.connect(Socket.java:520)
> at java.net.Socket.connect(Socket.java:470)
> at java.net.Socket.<init>(Socket.java:367)
> at java.net.Socket.<init>(Socket.java:180)
> at org.postgresql.core.PGStream.<init>(PGStream.java:62)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Conne
> ctionFactoryImpl.java:77)
> ... 10 more
>
>
> $ netstat -an | grep 5432
> tcp4 0 0 *.5432 *.* LISTEN
> tcp6 0 0 *.5432 *.* LISTEN
> tcp4 0 0 127.0.0.1.* 127.0.0.1.5432 CLOSED
> ffffff0084f357c0 stream 0 0 ffffff0057e729b0 0 0
> 0 /tmp/.s.PGSQL.5432
> $
>
>
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> postgres 37455 pgsql 4u IPv6 0xffffff0084af25b0 0t0 TCP *:postgresql (
> LISTEN)
> postgres 37455 pgsql 5u IPv4 0xffffff0084af0b60 0t0 TCP *:postgresql (
> LISTEN)
> postgres 37455 pgsql 7u IPv6 0xffffff00a52bd000 0t0 UDP localhost:6410
> 0->localhost:64100
> postgres 37457 pgsql 7u IPv6 0xffffff00a52bd000 0t0 UDP localhost:6410
> 0->localhost:64100
> postgres 37458 pgsql 7u IPv6 0xffffff00a52bd000 0t0 UDP localhost:6410
> 0->localhost:64100
>
>
> I do have a truss output at
> http://www.milestonerdl.com/jdbc/truss.html
>
>
>
>

--
Guy Rouillier

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2008-08-30 13:30:12 Need a developer contact
Previous Message Oliver Jowett 2008-08-30 03:57:58 Re: FreeBSD 7-amd-64 broken-ness