I get a error msg when i try to connect to the DB

Started by Rajaram Jover 18 years ago7 messagesgeneral
Jump to latest
#1Rajaram J
rajarj@hotmail.com

Hi

I have installed PostGRESql 7.4.17 and when i try to connect to the db i get the msg

psql: FATAL: no pg_hba.conf entry for host "???", user "sfmdb", database "LOGDB", SSL off

My pg_hba.conf entry is as below

# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD

# Disable default configuration

local all all trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255 trust
# IPv6-style local connections:
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

can you please guide me on what the problem might be.

Regards

Rajaram

#2Brad Nicholson
bnichols@ca.afilias.info
In reply to: Rajaram J (#1)
Re: I get a error msg when i try to connect to the DB

On Thu, 2007-08-16 at 21:16 +0530, Rajaram J wrote:

Hi

I have installed PostGRESql 7.4.17 and when i try to connect to the db
i get the msg

psql: FATAL: no pg_hba.conf entry for host "???", user "sfmdb",
database "LOGDB", SSL off

You are allowing local, non TCP/IP connctions, and connections through
the loop back, but you are not allowing remote conncetions. You need an
entry of some form that is

host all all ??? 255.255.255.255 trust

btw, trust is usually bad, you should use some form of authentication.

My pg_hba.conf entry is as below

# TYPE DATABASE USER IP-ADDRESS IP-MASK
METHOD

# Disable default configuration

local all all
trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255
trust
# IPv6-style local connections:
host all all ::1
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

can you please guide me on what the problem might be.

Regards

Rajaram

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.

#3Rajaram J
rajarj@hotmail.com
In reply to: Rajaram J (#1)
Re: I get a error msg when i try to connect to the DB

Hi

I tred this option but still i get the same message. Any more options that i
can try.

Regards
Rajaram J
----- Original Message -----
From: "Brad Nicholson" <bnichols@ca.afilias.info>
To: "Rajaram J" <rajarj@hotmail.com>
Cc: <pgsql-general@postgresql.org>
Sent: Thursday, August 16, 2007 9:35 PM
Subject: Re: [GENERAL] I get a error msg when i try to connect to the DB

Show quoted text

On Thu, 2007-08-16 at 21:16 +0530, Rajaram J wrote:

Hi

I have installed PostGRESql 7.4.17 and when i try to connect to the db
i get the msg

psql: FATAL: no pg_hba.conf entry for host "???", user "sfmdb",
database "LOGDB", SSL off

You are allowing local, non TCP/IP connctions, and connections through
the loop back, but you are not allowing remote conncetions. You need an
entry of some form that is

host all all ??? 255.255.255.255 trust

btw, trust is usually bad, you should use some form of authentication.

My pg_hba.conf entry is as below

# TYPE DATABASE USER IP-ADDRESS IP-MASK
METHOD

# Disable default configuration

local all all
trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255
trust
# IPv6-style local connections:
host all all ::1
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

can you please guide me on what the problem might be.

Regards

Rajaram

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.

#4Rajaram J
rajarj@hotmail.com
In reply to: Brad Nicholson (#2)
Re: I get a error msg when i try to connect to the DB

<html><div style='background-color:'><P>Hi<BR><BR>Sorry I forgot to give the pg_hba.conf detail</P>
<P>Error message - </P>
<P>============== removing existing temp installation&nbsp;&nbsp;&nbsp; ==============<BR>============== creating temporary installation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==============<BR>============== initializing database system&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==============<BR>============== starting postmaster&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==============<BR>running on port 65432 with pid 8227<BR>============== creating database "regression"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==============<BR>createdb: could not connect to database template1: FATAL:&nbsp; missing or erroneous pg_hba.conf file<BR>HINT:&nbsp; See server log for details.<BR>pg_regress: createdb failed<BR><BR>Present pg_hba.conf entries -</P>
<P># TYPE&nbsp; DATABASE&nbsp;&nbsp;&nbsp; USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IP-ADDRESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IP-MASK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; METHOD</P>
<P>local&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trust<BR>host all all ??? 255.255.255.255 trust<BR>host all all 0.0.0.0 0.0.0.0 trust</P>
<P># IPv4-style local connections:<BR>host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.255.255&nbsp;&nbsp; trust<BR># IPv6-style local connections:<BR>host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trust<BR></P>
<P>I'm stuck here and could not proceed any further can you please help.</P>
<DIV>
<P><FONT face=Arial size=2>Regards</FONT> </P><B><FONT size=2>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 100%">Rajaram J&nbsp; <IMG height=12 src="http://graphics.hotmail.com/emsmile.gif&quot; width=12></B></FONT><FONT face="Times New Roman" size=2></P></FONT></DIV></div><br clear=all><hr>Live the life in style with MSN Lifestyle. <a href="http://g.msn.com/8HMAENIN/2731??PS=47575&quot; target="_top">Check out! </a> </html>

#5Andrej Ricnik-Bay
andrej.groups@gmail.com
In reply to: Rajaram J (#3)
Re: I get a error msg when i try to connect to the DB

On 8/18/07, Rajaram J <rajarj@hotmail.com> wrote:

Hi

I tred this option but still i get the same message. Any more options that i
can try.

And after that change you restarted the postmaster?

Regards
Rajaram J

Cheers,
Andrej

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

#6Rajaram J
rajarj@hotmail.com
In reply to: Rajaram J (#1)
Re: I get a error msg when i try to connect to the DB

Hi

Yes I restarted postmaster after that but the problem still persists.

Regards
Rajaram

----- Original Message -----
From: "Andrej Ricnik-Bay" <andrej.groups@gmail.com>
To: "Rajaram J" <rajarj@hotmail.com>
Cc: <pgsql-general@postgresql.org>
Sent: Saturday, August 18, 2007 4:01 AM
Subject: Re: [GENERAL] I get a error msg when i try to connect to the DB

Show quoted text

On 8/18/07, Rajaram J <rajarj@hotmail.com> wrote:

Hi

I tred this option but still i get the same message. Any more options
that i
can try.

And after that change you restarted the postmaster?

Regards
Rajaram J

Cheers,
Andrej

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes
concise.

http://www.american.edu/econ/notes/htmlmail.htm

#7Andrej Ricnik-Bay
andrej.groups@gmail.com
In reply to: Rajaram J (#6)
Re: I get a error msg when i try to connect to the DB

On 8/18/07, Rajaram J <rajarj@hotmail.com> wrote:

Hi

Yes I restarted postmaster after that but the problem still persists.

OK, Only looked at your file just now. Those ???? are
meant to be the IP of your client. You weren't meant
to put questionmarks into the file.

Regards
Rajaram

Cheers,
Andrej