Thread: No pg_hba.conf entry

No pg_hba.conf entry

From
"vivek K."
Date:
<div style="background-color:"><div><div>find your postgresql.conf file, look in there to make sure tcpip_socket<br />=
true.<br/><br />the directory that file is in should be the same as the $PGDATA that<br />your getting asked for, so
you'llbe able to do <br /><br />pg_ctl -D /path/to/database status<br /><br />Robert Treat  <br
/></div><div> </div></div><div>HelloAll,</div><div> Thanks to Robert. I have set the above things but SQL-ledger is
givingdifferent error this time like :</div><div>FATAL 1: No pg_hba.conf entry for host 192.168.168.56, user
sql-ledger,database template1</div><div> </div><div>  I am using the preinstalled Postgres DB that came along with the
defaultRH Linux Installation. I did not install externally.( so the path will be
/usr/bin./usr/lib)</div><div> </div><div>Ihave set the variables as suggested in the postgressql.conf file. But i am
nowgetting this error.</div><div>$ pg_ctl  -D  /usr/lib/pgsql start<br />postmaster successfully started<br
/>bash-2.05a$FATAL 1:  data directory /usr/lib/pgsql has group or world access; p<br />ermissions should be u=rwx
(0700) </div><div> </div><div>andalso</div><div>bash-2.05a$ initdb<br />The files belonging to this database system
willbe owned by user "postgres".<br />This user must also own the server process.</div><div>initdb: The directory
/usr/lib/pgsqlexists but is not empty.<br />If you want to create a new database system, either remove or empty<br
/>thedirectory /usr/lib/pgsql or run initdb with<br />an argument other than /usr/lib/pgsql.  </div><div> </div><div>I
haveset PGDATA =/usr/lib/pgsql and there is no directory by name data. Should i create a new Directory by name data and
initialisethis. Please advice.</div><div> </div><div>Thank and
regards,</div><div>Vivek</div><div> </div><div> </div><div> </div><div> </div></div><brclear="all" /><hr />Help STOP
SPAMwith <a href="http://g.msn.com/8HMEEN/2731">the new MSN 8 </a> and get 2 months FREE* 

Re: No pg_hba.conf entry

From
Robert Treat
Date:
On Fri, 2003-02-14 at 03:08, vivek K. wrote:
Hello All,
 Thanks to Robert. I have set the above things but SQL-ledger is giving
different error this time like :
FATAL 1: No pg_hba.conf entry for host 192.168.168.56, user sql-ledger,
database template1

If your using the standard Red Hat rpm, I believe your data file will be
in /var/lib/pgsql/data, which should also be you $PGDATA variable.

The error above indicates that the user sql-ledger doesn't have
authorization. You'll need to look in your pg_hba.conf file and add I
line like:

host all 192.168.168.56 255.255.255.255 trust

(Note, this isn't the tightest configuration; check the docs to see for
ways to adjust this once your up and running and ready for production)

  I am using the preinstalled Postgres DB that came along with the
default RH Linux Installation. I did not install externally.( so the
path will be /usr/bin./usr/lib)

I have set the variables as suggested in the postgressql.conf file. But
i am now getting this error.
$ pg_ctl  -D  /usr/lib/pgsql start
postmaster successfully started
bash-2.05a$ FATAL 1:  data directory /usr/lib/pgsql has group or world
access; p
ermissions should be u=rwx (0700)

ISTM you should be doing pg_ctl -D /var/lib/pgsql/data start. BTW, check
your ps output. You normally wont receive the error message at the
beginning of this email unless the server is already running.

and also
bash-2.05a$ initdb
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.
initdb: The directory /usr/lib/pgsql exists but is not empty.
If you want to create a new database system, either remove or empty
the directory /usr/lib/pgsql or run initdb with
an argument other than /usr/lib/pgsql.

I have set PGDATA =/usr/lib/pgsql and there is no directory by name
data. Should i create a new Directory by name data and initialise this.
Please advice.


Again, I think you need to set $PGDATA to /var/lib/pgsql/data It
wouldn't hurt to do an ls -al in that directory and see what you have,
I'm guessing you'll find all of the other components of your server.

And again, the first error message indicates that your server is already
up and running, so really you probably don't need to run an initdb.

Robert Treat



________________________________________________________________________
Help STOP SPAM with the new MSN 8  and get 2 months FREE*