Re: [GENERAL] jdbc pg_hba.conf error

2007-06-05 Thread Bhavana.Rakesh
Starting the postmaster with a "-i" option did the trick. / -i Allows clients to connect via TCP/IP (Internet domain) connections. Without this option, only local Unix domain socket connections are accepted. This option corre- sponds to setting tcpip_socke

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Ray Stell
On Thu, May 31, 2007 at 04:07:25PM -0400, Tom Lane wrote: > the kernel rejected the connection before looking for a listening process. or a host-based firewall might produce the same result. ---(end of broadcast)--- TIP 3: Have you checked our exten

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Tom Lane
"Bhavana.Rakesh" <[EMAIL PROTECTED]> writes: > Here's what happens when I specify the port number > [EMAIL PROTECTED] ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -d testing123 > psql: could not connect to server: Connection refused > Is the server running on host "127.0.0.1" and accepting >

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Alvaro Herrera
Bhavana.Rakesh escribió: > Hi, > Here's what happens when I specify the port number > > [EMAIL PROTECTED] ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -d testing123 > psql: could not connect to server: Connection refused >Is the server running on host "127.0.0.1" and accepting >TCP/IP

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Oliver Elphick
On Thu, 2007-05-31 at 09:38 -0400, Bhavana.Rakesh wrote: > Hi, > Here's what happens when I specify the port number > > [EMAIL PROTECTED] ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -d testing123 > psql: could not connect to server: Connection refused > Is the server running on host "127.0.0.

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread gonzales
W/out specifying a -h switch, postgres defaults to using a UNIX domain socket, meaning AF_UNIX and not AF_INET. There is a big difference. Using -h 127.0.0.1 is the localhost not necessarily 'local' from the context of postgres. W/out looking into the details, I think 'local' is referring to A

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Ray Stell
What does netstat -l tell us about that? On Thu, May 31, 2007 at 02:50:50PM +0100, Oliver Elphick wrote: > On Thu, 2007-05-31 at 09:38 -0400, Bhavana.Rakesh wrote: > > Hi, > > Here's what happens when I specify the port number > > > > [EMAIL PROTECTED] ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Bhavana.Rakesh
Hi, Here's what happens when I specify the port number [EMAIL PROTECTED] ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -d testing123 psql: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5000? I have the

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Ray Stell
What is listen_addresses set to in postgresql.conf? '*' corresponds to all available IP interfaces. Maybe you are not listening on localhost. On Thu, May 31, 2007 at 08:57:41AM -0400, Bhavana.Rakesh wrote: > Ok, > I confirmed that I'm editing the right pg_hba.conf file. I made sure > that th

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread chris smith
On 5/31/07, Bhavana.Rakesh <[EMAIL PROTECTED]> wrote: Ok, I confirmed that I'm editing the right pg_hba.conf file. I made sure that there are no other postmasters running. I made sure that there is a user called 'brakesh'. I restart the postmaster everytime I make any changes to pg_hba.conf

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Bhavana.Rakesh
Ok, I confirmed that I'm editing the right pg_hba.conf file. I made sure that there are no other postmasters running. I made sure that there is a user called 'brakesh'. I restart the postmaster everytime I make any changes to pg_hba.conf file. But still same results! [EMAIL PROTECTED] ~/d

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Tom Lane
Oliver Elphick <[EMAIL PROTECTED]> writes: > His original message (which I snipped) said he had: > # IPv4-style local connections: > hostall all 127.0.0.1 255.255.255.255 trust > hosttesting123 brakesh 127.0.0.1 255.255.255.255 trust > So it seems

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread gonzales
Did you ever "createuser brakesh" ??? Apologies about the he,she ;)... he + s = she, see you're greater of a person than a 'he.' Heehee. On Wed, 30 May 2007, Bhavana.Rakesh wrote: Yes, I have been restarting the postgres every time I make changes to the pg_hba.conf file. -Bhavana On a li

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
Yes, I have been restarting the postgres every time I make changes to the pg_hba.conf file. -Bhavana On a lighter note, it's a 'she' not 'he'. :) No offense taken. :)) [EMAIL PROTECTED] wrote: As super-user (postgres) you have to create the user in Postgres, then Grant access. In other word

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread gonzales
Did you grant access to your user? On Wed, 30 May 2007, Oliver Elphick wrote: On Wed, 2007-05-30 at 18:35 +0200, Martijn van Oosterhout wrote: On Wed, May 30, 2007 at 12:30:38PM -0400, Bhavana.Rakesh wrote: Oliver, When I do a : psql -p 5000 testing123 I can make a connec

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
I'm using version 7.4. The "hostnossl" is not helping either. My error is [EMAIL PROTECTED] ~]$ psql -U brakesh -h 127.0.0.1 -d testing123 psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "brakesh", database "testing123", SSL off The current pg_hba.conf file is as follows: # TY

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread gonzales
As super-user (postgres) you have to create the user in Postgres, then Grant access. In other words, if the pg_hba.conf file specifies a user who does not exist, "user brakesh does not exist" will cause a failure to connect as well. Every connection to a database, has to have a user associate

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
On Wed, 2007-05-30 at 13:00 -0400, [EMAIL PROTECTED] wrote: > Did you grant access to your user? If you mean grant access by an SQL GRANT, he hasn't got far enough to check that. The error specifically says "no pg_hba.conf entry". As far as I can see, his pg_hba.conf is OK. > > On Wed, 30 May

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
On Wed, 2007-05-30 at 18:35 +0200, Martijn van Oosterhout wrote: > On Wed, May 30, 2007 at 12:30:38PM -0400, Bhavana.Rakesh wrote: > > Oliver, > > > > When I do a : > >psql -p 5000 testing123 > > I can make a connection. However, when I do a > > > > psql -U brakesh -h 127

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
On Wed, 2007-05-30 at 12:30 -0400, Bhavana.Rakesh wrote: > Oliver, > > When I do a : > psql -p 5000 testing123 > I can make a connection. Since you aren't specifying a host (with -h), that command uses a Unix socket connection and only looks at lines in pg_hba.conf that begin

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Martijn van Oosterhout
On Wed, May 30, 2007 at 12:30:38PM -0400, Bhavana.Rakesh wrote: > Oliver, > > When I do a : >psql -p 5000 testing123 > I can make a connection. However, when I do a > > psql -U brakesh -h 127.0.0.1 -d testing123 > > I get the followign error: > > psql: FATAL: no pg_h

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
Oliver, When I do a : psql -p 5000 testing123 I can make a connection. However, when I do a psql -U brakesh -h 127.0.0.1 -d testing123 I get the followign error: psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "brakesh", database "testing123", SSL off

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
I used the example in the following URL http://www.postgresql.org/docs/7.3/static/client-authentication.html Thanks for the catch on "host" instead of "local". I made that change, and reloaded pgsql.. But I still get the same error. I can connect to the database using psql client, but my j

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
On Wed, 2007-05-30 at 11:47 -0400, Bhavana.Rakesh wrote: > Hello, > I'm still getting the error ... > Here is my updated version of pg_hba.conf file > __ > # > # TYPE DATABASEUSERIP-ADDRESSIP-MASK

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
Hello, I'm still getting the error [EMAIL PROTECTED] ~/db_connect]$ java db_connect_pgsql.class Checking if Driver is registered with DriverManager Registered the driver ok, making DB connection now Couldn't connect: print out a stack trace and exit. org.postgresql.util.PSQLException: A connect

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Richard Huxton
1. Please don't forget to cc: the list 2. Please don't top-quote Bhavana.Rakesh wrote: Does this mean the pg_hba.conf file has to be edited everytime a new database/schema is created? No, only when you want to change network access permissions for the installation as a whole. See the manuals

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Devrim GÜNDÜZ
Hello, On Wed, 2007-05-30 at 07:36 -0400, Bhavana.Rakesh wrote: > Here is my pg_.conf file Uncomment this line: #hostall all 127.0.0.1 255.255.255.255 trust and reload PostgreSQL. And make sure that you read this part of the manual: http://www.postgresql.org/docs/c

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Richard Huxton
Bhavana.Rakesh wrote: Hi, I'm a newbee to postgreSQL. Does anyone know what this error means. Couldn't connect: print out a stack trace and exit. org.postgresql.util.PSQLException: A connection error has occurred: org.postgres ql.util.PSQLException: FATA

[GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Bhavana.Rakesh
Hi, I'm a newbee to postgreSQL. Does anyone know what this error means. I'm trying to run the following java program. I have also included the java program and the pg_hba.conf file. java db_connect_pgsql.class Checking if Driver is registered with DriverManager Registered the driver ok,