X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D8D6CD1B457 for ; Mon, 26 Jul 2004 13:16:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75479-02 for ; Mon, 26 Jul 2004 16:16:42 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 62A8CD1B1D0 for ; Mon, 26 Jul 2004 13:16:40 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i6QGGeqb004274 for ; Mon, 26 Jul 2004 16:16:40 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i6QGCneN003714 for pgsql-jdbc@postgresql.org; Mon, 26 Jul 2004 16:12:49 GMT From: dgr X-Newsgroups: comp.databases.postgresql.interfaces.jdbc Subject: SSL Connection Problems Date: Mon, 26 Jul 2004 18:13:50 +0200 Message-ID: X-Newsreader: Forte Agent 2.0/32.640 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 97 To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=NO_DNS_FOR_FROM X-Spam-Level: * X-Archive-Number: 200407/288 X-Sequence-Number: 10672 A good day, I am trying to connect to my postgresql database using SSL (I am using the Win32 development build from postgresql). I have followed the steps in: http://archives.postgresql.org/pgsql-jdbc/2003-08/msg00110.php and all seems to go fine. I edited the postgresql.conf and pg_hba.conf and added ?ssl to the connection url but it doesn't work. I can't even connect using pgAdmin. This is what I get from the java debug: --------------------------------------------------------------------------------------------------------- PostgreSQL 7.5devel JDBC3 with SSL (build 304) Trying to establish a protocol version 3 connection to localhost:5432 FE=> SSLRequest <=BE SSLOk converting regular socket connection to ssl FE=> StartupPacket(user=useronly, database=GIDS, client_encoding=UNICODE, DateStyle=ISO) SQLException: SQLState(08001) vendor code(451181827) org.postgresql.util.PSQLException: The connection attempt failed at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:120) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65) at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:106) at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:19) at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:15) at org.postgresql.Driver.connect(Driver.java:138) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at GIDS.DB.DBPool.newConnection(DBPool.java:133) at GIDS.DB.DBPool.getConnection(DBPool.java:87) at GIDS.DB.DBaseManager.getConnection(DBaseManager.java:170) at GIDS.DB.Querier.(Querier.java:57) at GIDS.LoginScreen.checkAdmin(LoginScreen.java:65) at GIDS.LoginScreen.(LoginScreen.java:46) at GIDS.LoginScreen.main(LoginScreen.java:217) Exception: org.postgresql.util.PSQLException: The connection attempt failed trying driver[className=org.postgresql.Driver,org.postgresql.Driver@1b3f8f6] connect jdbc:postgresql://localhost:5432/GIDS?ssl&loglevel=2 PostgreSQL 7.5devel JDBC3 with SSL (build 304) Trying to establish a protocol version 3 connection to localhost:5432 FE=> SSLRequest <=BE SSLOk converting regular socket connection to ssl FE=> StartupPacket(user=useronly, database=GIDS, client_encoding=UNICODE, DateStyle=ISO) SQLException: SQLState(08001) vendor code(451181827) org.postgresql.util.PSQLException: The connection attempt failed at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:120) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65) at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:106) at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:19) at org.postgresql.jdbc3.Jdbc3Connection.(Jdbc3Connection.java:15) at org.postgresql.Driver.connect(Driver.java:138) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at GIDS.DB.DBPool.newConnection(DBPool.java:133) at GIDS.DB.DBPool.getConnection(DBPool.java:87) at GIDS.DB.DBaseManager.getConnection(DBaseManager.java:170) at GIDS.DB.Querier.(Querier.java:57) at GIDS.LoginScreen.checkAdmin(LoginScreen.java:65) at GIDS.LoginScreen.(LoginScreen.java:46) at GIDS.LoginScreen.main(LoginScreen.java:217) Exception: org.postgresql.util.PSQLException: The connection attempt failed getConnection failed: org.postgresql.util.PSQLException: The connection attempt failed ----------------------------------------------------------------------------------------------------- I am connecting to the server from the same computer as where the server is running. Just local... The log of the server gives this: LOG: could not initialize SSL connection: SSL error code 336306371 Any ideas on what I'm doing wrong? Or guides that can explain me what exactly I have to do in order to get things working? Thanks in advance...