pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bob VonMoss <bvonmoss@bigfoot.com>
To: pgsql-interfaces@postgresql.org, PostGreSQL General List <pgsql-general@postgresql.org>
Subject: Re: connecting: unix socket? Yes. TCPIP port? No. -i? Yes.
Date: Sun, 07 Feb 1999 23:21:28 -0600
Message-ID: <36BE7458.911B9EB5@bigfoot.com> (raw)
References: <20420.918327699@sss.pgh.pa.us>

Tom Lane wrote:

> Bob VonMoss <bvonmoss@bigfoot.com> writes:
> > [ can connect via unix socket, but not via TCP ]
>
> > The administrator says this is how postmaster is invoked:
> > /usr/local/pgsql/bin/postmaster -S -i -D /usr/local/pgsql/data -p 5432
>
> OK, that eliminates the "forgot -i" gotcha.
>
> James Thompson is almost certainly right that the problem is that
> Postgres' pg_hba.conf file is not set up to allow connections from
> whichever IP address you are connecting from.
>
> We heard about a similar problem recently which turned out to be
> due to use of "virtual server" IP addresses.

The pgsql administrator put a line in pg_hba.conf that looks like this,
where my_db is substituted for my database name:

host my_db 0.0.0.0 0.0.0.0 ident sameuser

I'm still getting the same 'User authentication failed' messages. Same thing
from JDBC. Do I need access to the 'template1' table also?

Here's a transcript of a session from the command line on the same machine
(with host, database and login id substituted):

bash$ psql my_db
Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: my_db

ubf99=> \z
Couldn't find any tables!
ubf99=> \q
bash$ psql -h my-isp.com -p 5432 -d my_db -u
Username: login-id
Password:

Connection to database 'my_db' failed.
User authentication failedbash$
bash$
bash$ psql -h my-isp.com -d my_db
Connection to database 'my_db' failed.
User authentication failedbash$
bash$ psql -h my-isp.com -u my_db
Username: login-id
Password:

Connection to database 'my_db' failed.
User authentication failedbash$


--
Bob VonMoss
mailto:bvonmoss@bigfoot.com
from Chicago, IL





view thread (9+ messages)  latest in thread

Message-ID: <36BE7458.911B9EB5@bigfoot.com>
Permalink:  ../36BE7458.911B9EB5@bigfoot.com/
Also on:    postgresql.org/message-id/36BE7458.911B9EB5@bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bvonmoss@bigfoot.com, pgsql-general@postgresql.org
  Subject: Re: connecting: unix socket? Yes. TCPIP port? No. -i? Yes.
  In-Reply-To: <36BE7458.911B9EB5@bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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