Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6F4562E3229 for ; Thu, 6 Dec 2007 10:42:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 13344-08 for ; Thu, 6 Dec 2007 10:42:29 -0400 (AST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by postgresql.org (Postfix) with ESMTP id 7AA762E2EBB for ; Thu, 6 Dec 2007 10:42:34 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id f5so93611nfh for ; Thu, 06 Dec 2007 06:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=c0F2U2Rtu1+d6hwgSKZB7vmYkSh0rKfWG0Lp6t+GdNw=; b=BXWLy3HYUo4i75/NPOYJCTofbJW+eIyWQA6kWxdO09VPQaCz2/7+8Or5OJ1+EL80bC6cSxKNYS63tU5GRQepS0JGoHE4CqiG572bm/EAykEpPCMhQqcQJzlgxUiNVuxSruYM7tmRbDHtUYHvfsl+tM/0hxTdDXxEfvy8g82Ccnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=vm7c9/MzPVhViPEzkVumkrBxTwSwsWM4R2OfcaF3NoqkAUtGhqgrU0ZH4VBwbPNC430VlSobbGTcgwiZqeM5mg4MxLTGbY5jsA/jQtGXlCOvwIueoR5xpZh44brIofdGLG43RB++NEx4l3Bmle5XmwrqJb8OQQ9uxiMwpp2wTUg= Received: by 10.86.58.3 with SMTP id g3mr1116597fga.1196952152590; Thu, 06 Dec 2007 06:42:32 -0800 (PST) Received: by 10.86.86.19 with HTTP; Thu, 6 Dec 2007 06:42:32 -0800 (PST) Message-ID: <157342620712060642i69edd0b8l6d1c070e7ab8b3ab@mail.gmail.com> Date: Thu, 6 Dec 2007 09:42:32 -0500 From: "Sam Elsamman" To: pgsql-jdbc@postgresql.org Subject: Ident Connections With Tomcat and Postgresql MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 5a0950435aaf2b78 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/48 X-Sequence-Number: 17903 Has anyone had experience with IDENT authentication and JDBC with Tomcat 5.5 and Postresql 8.2 using postgresql-8.2-506.jdbc3? I set ident accross the board in pga_pg_hba.conf and restarted postgres I set up an Ident service and I am able to connect using Ident with su tomcat psql -h locahost tomcat_test But when I connect using JDBC under tomcat String loginUser = "tomcat"; String loginUrl = "jdbc:postgresql://127.0.0.1/tomcat_test"; try { Class.forName("org.postgresql.Driver"); dbcon = DriverManager.getConnection(loginUrl, loginUser, ""); } I get "Ident authentication failed for user tomcat" When I log at the postgres log I see: LOG: invalidly formatted response from Ident server: "47537 , 5432 : ERROR :NO-USER " FATAL: Ident authentication failed for user "tomcat" LOG: invalidly formatted response from Ident server: "47541 , 5432 : ERROR :NO-USER " I started Tomcat using jsvc and confirmed it is running as tomcat and confirmed via System.getProperty("user.name") I was running as tomcat. Also when I test ident standalone I get what appears to be good output [root@host3 ~]# telnet localhost 113 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 47568,5432 47568 , 5432 : USERID : Linux :tomcat Connection closed by foreign host. [root@host3 ~]# This is a weird one. Thanks in advance for any help on this.