localhost connects, same code on other host fails

Поиск
Список
Период
Сортировка
От Reshat Sabiq
Тема localhost connects, same code on other host fails
Дата
Msg-id 000101c2b15d$50795900$9c82d380@main
обсуждение исходный текст
Ответ на Re: passing variables  (hodges@xprt.net)
Ответы Re: localhost connects, same code on other host fails
Список pgsql-novice
Hi,

I have a Java web app that works just fine when deployed as localhost,
but gives a connection error:
IDENT authentication failed for user "myself"
and then throws an exception:
Connection could not be established.
when deploying the same app as a non-localhost (e.g., www.mydomain.com),
on the same server.

tcpip_socket is on. And we have this in pg_hba:
local        all                                           ident
sameuser
host         all         127.0.0.1     255.0.0.0           ident
sameuser
host         all        xxx.yy.zzz.vv  255.255.255.255    ident
sameuser
host         all         0.0.0.0       0.0.0.0             reject

where xxx.yy.zzz.vv stands for the IP in the DNS record with .tv
corporation.

In both cases, I'm connecting with the Linux network login and password,
so it probably is consistent with sameuser mode. That way I can connect
both from command line and from localhost-based app, but not as a
non-local-host.

P.S. It has to be something simple, like:
host         all        xxx.yy.zzz.vv  255.0.0.0    ident  sameuser
perhaps. I'd appreciate any feedback on this.

P.P.S. The connectivity so far is straight-forward: no datasources, or
jndi.

P.P.P.S. The localhost-based app is running as myself on port 8080,
whereas the non-localhost-based app is running as root on port 80. Do I
perhaps have to have to be in the sudoers list for postgres to connect
when the server runs as root? I'm not connecting to system DBs, however.
I'm only connecting to my DB.

Thanks,
r.



В списке pgsql-novice по дате отправления:

Предыдущее
От: hodges@xprt.net
Дата:
Сообщение: Re: passing variables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: localhost connects, same code on other host fails