Thread: One machine connects, the other doesn't???

One machine connects, the other doesn't???

From
Jeff
Date:
Hi

I have postgresql 7.2.2-1 on "BACKEND".

If I use "Shop"(192.168.24.5) I can connect using the command:

psql mydatabase -h BACKEND -U ownerofmydatabase

I am asked for the password and upon giving it all is well.

BUT.

If I use "Office"(192.168.24.4) and I try the same thing:

psql mydatabase -h BACKEND -U ownerofmydatabase

I get:

psql: FATAL 1: No pg_hba.conf entry for host 192.168.24.4, user
ownerofmydatabase, database mydatabase

My pg_hba.conf file has two lines

local all trust
host all 192.168.24.0 255.255.255.0 password

Any ideas???

Jeff Roberts


Re: One machine connects, the other doesn't???

From
Date:
> Hi
>
> I have postgresql 7.2.2-1 on "BACKEND".

Although its not answer to your problem , but
you shud *really* upgrade your PostgreSQL version
to 7.2.4 version some serious bugs were fixed relating to possible
data loss.

Regards
Mallah.

>
> If I use "Shop"(192.168.24.5) I can connect using the command:
>
> psql mydatabase -h BACKEND -U ownerofmydatabase
>
> I am asked for the password and upon giving it all is well.
>
> BUT.
>
> If I use "Office"(192.168.24.4) and I try the same thing:
>
> psql mydatabase -h BACKEND -U ownerofmydatabase
>
> I get:
>
> psql: FATAL 1: No pg_hba.conf entry for host 192.168.24.4, user
> ownerofmydatabase, database mydatabase
>
> My pg_hba.conf file has two lines
>
> local all trust
> host all 192.168.24.0 255.255.255.0 password
>
> Any ideas???
>
> Jeff Roberts
>
>
> ---------------------------(end of broadcast)--------------------------- TIP 5: Have you
> checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html



-----------------------------------------
Over 1,00,000 exporters are waiting for your order! Click below to get
in touch with leading Indian exporters listed in the premier
trade directory Exporters Yellow Pages.
http://www.trade-india.com/dyn/gdh/eyp/



Re: One machine connects, the other doesn't???

From
Valentin Militaru
Date:
Try using the IP instead of backend.

Also, try a ping BACKEND from the second machine, see what it will tell you.

Bye
--
Valentin Militaru
Inginer de sistem

Re: One machine connects, the other doesn't???

From
Tom Lane
Date:
Jeff <jeffroberts@telus.net> writes:
> I get:

> psql: FATAL 1: No pg_hba.conf entry for host 192.168.24.4, user
> ownerofmydatabase, database mydatabase

> My pg_hba.conf file has two lines

> local all trust
> host all 192.168.24.0 255.255.255.0 password

Hm.  Are you sure you are looking at the right pg_hba.conf file?
Did you SIGHUP the postmaster after your latest change to pg_hba.conf?
Try looking in the postmaster log to see if it emits any complaints
about syntax problems in pg_hba.conf when you SIGHUP it and/or connect.

            regards, tom lane

Re: One machine connects, the other doesn't???

From
Jeff
Date:
Thanks Tom!

I was editing /usr/local/pgsql/data/pg_hba.conf when I should have been
editing /var/lib/pgsql/data/pg_hba.conf

Now everything works.

Jeff


Tom Lane wrote:
> Jeff <jeffroberts@telus.net> writes:
>
>>I get:
>
>
>>psql: FATAL 1: No pg_hba.conf entry for host 192.168.24.4, user
>>ownerofmydatabase, database mydatabase
>
>
>>My pg_hba.conf file has two lines
>
>
>>local all trust
>>host all 192.168.24.0 255.255.255.0 password
>
>
> Hm.  Are you sure you are looking at the right pg_hba.conf file?
> Did you SIGHUP the postmaster after your latest change to pg_hba.conf?
> Try looking in the postmaster log to see if it emits any complaints
> about syntax problems in pg_hba.conf when you SIGHUP it and/or connect.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>


Re: One machine connects, the other doesn't???

From
Jeff
Date:
Thanks Valentin

Ping BACKEND worked and -U 192.168.24.8 returned the same result but Tom
gave me a suggestion that solved it, I was editing the wrong pg_hba.conf
file. :-(

Jeff

Valentin Militaru wrote:
> Try using the IP instead of backend.
>
> Also, try a ping BACKEND from the second machine, see what it will tell you.
>
> Bye


Re: One machine connects, the other doesn't???

From
Jeff
Date:
Thanks Mallah

First I'll check to make sure it won't break my application and then
I'll have to learn how to back up my database and then perhaps I'll
start looking for the way to do an upgrade. Which means I'll be hanging
around for a while ;-)

Jeff


mallah@trade-india.com wrote:
>>Hi
>>
>>I have postgresql 7.2.2-1 on "BACKEND".
>
>
> Although its not answer to your problem , but
> you shud *really* upgrade your PostgreSQL version
> to 7.2.4 version some serious bugs were fixed relating to possible
> data loss.
>
> Regards
> Mallah.
>
>
>>If I use "Shop"(192.168.24.5) I can connect using the command:
>>
>>psql mydatabase -h BACKEND -U ownerofmydatabase
>>
>>I am asked for the password and upon giving it all is well.
>>
>>BUT.
>>
>>If I use "Office"(192.168.24.4) and I try the same thing:
>>
>>psql mydatabase -h BACKEND -U ownerofmydatabase
>>
>>I get:
>>
>>psql: FATAL 1: No pg_hba.conf entry for host 192.168.24.4, user
>>ownerofmydatabase, database mydatabase
>>
>>My pg_hba.conf file has two lines
>>
>>local all trust
>>host all 192.168.24.0 255.255.255.0 password
>>
>>Any ideas???
>>
>>Jeff Roberts
>>
>>
>>---------------------------(end of broadcast)--------------------------- TIP 5: Have you
>>checked our extensive FAQ?
>>
>>              http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>
>
> -----------------------------------------
> Over 1,00,000 exporters are waiting for your order! Click below to get
> in touch with leading Indian exporters listed in the premier
> trade directory Exporters Yellow Pages.
> http://www.trade-india.com/dyn/gdh/eyp/
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>