473,395 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

pg_hba.conf problem

I'm trying to set up the cyrus imap server using PostgreSQL as the
authentication backend.

Currently, the issue I'm having is that I'm unable to connect via psql
on the loopback address (127.0.0.1).

I believe I have the pg_hba.conf file correct, though I've tried a
number of variations other than what I've included below. After each
change to pg_hba.conf, I bounce postgresql (stop start), but still get
a FATAL error re: missing entries for 127.0.0.1.

I'm stumped. I'm probably missing something simple, but I've looked at
a number of samples on usenet and in the PostgreSQL doco, but I haven't
been able to clear this up.

pg_hba.conf
===========

local all all ident sameuser
host all all 127.0.0.1/32 password

command and error
=================

[root@netfinity root]# psql mail -U mail -W -h 127.0.0.1 <
/var/www/html/web-cyradm-0.5.3-1/scripts/create_pgsql.sql
Password: *********
psql: FATAL: No pg_hba.conf entry for host 127.0.0.1, user mail,
database mail

[root@netfinity root]#
Any ideas?

-David

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #1
6 16654
David Nedrow writes:
pg_hba.conf
===========

local all all ident sameuser
host all all 127.0.0.1/32 password

command and error
=================

[root@netfinity root]# psql mail -U mail -W -h 127.0.0.1 <
/var/www/html/web-cyradm-0.5.3-1/scripts/create_pgsql.sql
Password: *********
psql: FATAL: No pg_hba.conf entry for host 127.0.0.1, user mail,
database mail


The syntax x.x.x.x/y is only supported in 7.4, but you appear to be using
something older than 7.4.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2
Peter,

Note that I've also tried the following straight for the original
pg_hba.conf file itself. No luck.

# TYPE DATABASE USER IP-ADDRESS IP-MASK
METHOD

host all all 127.0.0.1 255.255.255.255
password

On Nov 30, 2003, at 14:05, Peter Eisentraut wrote:
David Nedrow writes:
pg_hba.conf
===========

local all all ident sameuser
host all all 127.0.0.1/32 password

command and error
=================

[root@netfinity root]# psql mail -U mail -W -h 127.0.0.1 <
/var/www/html/web-cyradm-0.5.3-1/scripts/create_pgsql.sql
Password: *********
psql: FATAL: No pg_hba.conf entry for host 127.0.0.1, user mail,
database mail


The syntax x.x.x.x/y is only supported in 7.4, but you appear to be
using
something older than 7.4.

--
Peter Eisentraut pe*****@gmx.net

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #3
On Sun, Nov 30, 2003 at 06:10:08PM -0500, David Nedrow wrote:
Note that I've also tried the following straight for the original
pg_hba.conf file itself. No luck.

host all all 127.0.0.1 255.255.255.255
password


Huh, did you cause the postmaster to reload the pg_hba.conf file after
changing it? You should send it SIGHUP (kill -HUP) or use pg_ctl reload.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Crear es tan difícil como ser libre" (Elsa Triolet)

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #4
Alvaro,

Thanks for the reply. I previously did both of those, as well as
shutting postmaster down altogether and restarting. Still no luck.

I'm sure postmaster is seeing the file, since I can break "local"
support by changing that line. <G>

-David

On Nov 30, 2003, at 18:32, Alvaro Herrera wrote:
On Sun, Nov 30, 2003 at 06:10:08PM -0500, David Nedrow wrote:
Note that I've also tried the following straight for the original
pg_hba.conf file itself. No luck.

host all all 127.0.0.1 255.255.255.255
password


Huh, did you cause the postmaster to reload the pg_hba.conf file after
changing it? You should send it SIGHUP (kill -HUP) or use pg_ctl
reload.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Crear es tan difícil como ser libre" (Elsa Triolet)

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #5
Alvaro Herrera <al******@dcc.uchile.cl> writes:
On Sun, Nov 30, 2003 at 06:10:08PM -0500, David Nedrow wrote:
Note that I've also tried the following straight for the original
pg_hba.conf file itself. No luck.
Huh, did you cause the postmaster to reload the pg_hba.conf file after
changing it? You should send it SIGHUP (kill -HUP) or use pg_ctl reload.


He said he was using full postmaster restarts, which certainly ought to
do the trick.

The only other idea I can think of is he's editing the wrong pg_hba.conf
file; we've seen a couple of people make that mistake. (David, the
right pg_hba.conf file is the one in the $PGDATA directory. If you
don't see a postmaster.pid file in the same directory that appears and
disappears when you start and stop the postmaster, then you're in the
wrong directory ...)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #6
On Nov 30, 2003, at 21:01, Tom Lane wrote:
The only other idea I can think of is he's editing the wrong
pg_hba.conf
file; we've seen a couple of people make that mistake. (David, the
right pg_hba.conf file is the one in the $PGDATA directory. If you
don't see a postmaster.pid file in the same directory that appears and
disappears when you start and stop the postmaster, then you're in the
wrong directory ...)

Ta-Da!

That was it. For some reason, I had an old pgsql/data tree laying
around that I was futzing with. Looking for postmaster.pid did the
trick.

What I can't figure out is how I was breaking "local" access by editing
the non-local file. Maybe I was just too tired after 18 hours of
debugging Mozilla stuff. <G>

Thanks for the help.

-David
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Angel Todorov | last post by:
Hello, sometimes I get a strange error from postgresql when I try to connect using ssl to the server: LOG: parse_hba: invalid syntax in pg_hba.conf file at line 46, token "hostssl" FATAL: ...
3
by: Seum-Lim Gan | last post by:
Hi, In 7.4, I noticed there is this ::1 and ffff: (x8 of them) for IPv6. I looked at the documentation and there is nothing that says what the ::1 is for. Commenting out that line will...
2
by: Liza | last post by:
Hi, I've just setup postgreSQL on my Fedora Core1 box. I installed postgresql from rpm files. When I try to connect to the postgresql server in pgmanage, or through an ODBC from other windows...
3
by: Si Chen | last post by:
Hello. It seems that every time I make a change to pg_hba.conf, I have to restart the database server for the new authentication to take effect. Is there a way to have the server use the new...
5
by: Raymond O'Donnell | last post by:
Hello all, I've installed the new Win32 version of 8.0-beta1, running as a service. When I connect to it using pgAdmin III and attempt to list databases, I get an error: 'Column "datpath" does...
2
by: leo | last post by:
When i echo the $catid, it returns null. $catid is there, confirmed by command prompt and "select table from database". Is php needed to set anything or security issue such that $HTTP_GET_VAR...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.