pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedDiverManager.getConnection hangs
3+ messages / 2 participants
[nested] [flat]
* DiverManager.getConnection hangs
@ 2007-03-15 21:06 Massimo Ferrari <massimo.ferrari@rcfmedia.net>
0 siblings, 1 reply; 3+ messages in thread
From: Massimo Ferrari @ 2007-03-15 21:06 UTC (permalink / raw)
To: pgsql-jdbc
Hello,
I have a problem on my Debian 31 box with PostgreSQL 8.1.
This code hangs on DriverManager.getConnection
No log message, nothing.
Any help appreciated!
Thank you
public class Test {
public static void main(String[] args)
throws Exception
{
Properties p = new Properties();
p.setProperty("user", "1234");
p.setProperty("password", "5678");
p.setProperty("loglevel", "org.postgresql.Driver.DEBUG");
Class.forName("org.postgresql.Driver").newInstance();
Connection conn =
DriverManager.getConnection("jdbc:postgresql://localhost:5432/dev", p);
}
}
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: DiverManager.getConnection hangs
@ 2007-03-15 22:04 Massimo Ferrari <massimo.ferrari@rcfmedia.net>
parent: Massimo Ferrari <massimo.ferrari@rcfmedia.net>
0 siblings, 1 reply; 3+ messages in thread
From: Massimo Ferrari @ 2007-03-15 22:04 UTC (permalink / raw)
To: pgsql-jdbc
Mhhh it was a firewall issue!
Just a pity that even if I turned the driver's loggin on, there was no
message.
Best,
Massimo
Massimo Ferrari wrote:
> Hello,
>
> I have a problem on my Debian 31 box with PostgreSQL 8.1.
> This code hangs on DriverManager.getConnection
> No log message, nothing.
>
> Any help appreciated!
>
> Thank you
>
> public class Test {
> public static void main(String[] args)
> throws Exception
> {
> Properties p = new Properties();
> p.setProperty("user", "1234");
> p.setProperty("password", "5678");
> p.setProperty("loglevel", "org.postgresql.Driver.DEBUG");
> Class.forName("org.postgresql.Driver").newInstance();
> Connection conn =
> DriverManager.getConnection("jdbc:postgresql://localhost:5432/dev", p);
> }
> }
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: DiverManager.getConnection hangs
@ 2007-03-15 23:03 Oliver Jowett <oliver@opencloud.com>
parent: Massimo Ferrari <massimo.ferrari@rcfmedia.net>
0 siblings, 0 replies; 3+ messages in thread
From: Oliver Jowett @ 2007-03-15 23:03 UTC (permalink / raw)
To: Massimo Ferrari <massimo.ferrari@rcfmedia.net>; +Cc: pgsql-jdbc
Massimo Ferrari wrote:
> Mhhh it was a firewall issue!
>
> Just a pity that even if I turned the driver's loggin on, there was no
> message.
If the firewall was completely dropping connections then it'll sit there
trying to connect and eventually timeout, but it may take some time.
You could set a connect timeout (there's a jdbc URL parameter for it) if
you want a faster failure.
-O
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-03-15 23:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 21:06 DiverManager.getConnection hangs Massimo Ferrari <massimo.ferrari@rcfmedia.net>
2007-03-15 22:04 ` Massimo Ferrari <massimo.ferrari@rcfmedia.net>
2007-03-15 23:03 ` Oliver Jowett <oliver@opencloud.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox