Thread: Missing or erroneus pg_hba.conf file
Hello!
My server is working with pgsql 7.4.2 and Unix Solaris 8. Well, when a try a connection from my PC to the server, using pgAdminIII, I get the message above. This is my pg_hba.conf file:
local all all trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255 trust
host all all 172.17.0.0 255.255.0.0 trust
My PC IP address is something like 172.17.9.9 and local connections ("psql template1") are working fine. But if I comment the line below I can connect using pgAIII and locally too. After change pg_hba.conf I've used "pg_ctl reload".
#host all all 127.0.0.1 255.255.255.255 trust
My major problem is that in this last situation (with the line above commented) I can't use the pg73jdbc3.jar driver to connect to database (locally). The message is "no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "ppcdr_db", SSL off". If I remove the comment, the "Missing or erroneus pg_hba.conf file" returns.
Can you help me?
Thank you!
SANDRO
-------------------------------------------------------------------------------------------------- O conteúdo desta mensagem é de uso restrito e confidencial, sendo o seu sigilo protegido por lei. Estas informações não podem ser divulgadas sem prévia autorização escrita. Se você não é o destinatário desta mensagem, ou o responsável pela sua entrega, apague-a imediatamente e avise ao remetente, respondendo a esta mensagem. Alertamos que esta mensagem transitou por rede pública de comunicação,estando, portanto, sujeita aos riscos inerentes a essa forma de comunicação. A CLARO não se responsabiliza por conclusões, opiniões, ou outras informações nesta mensagem que não se relacionem com sua linha de negócios. -------------------------------------------------------------------------------------------------- |
Sandro Ribeiro - Claro RS - <Sandro.Ribeiro@claro.com.br> wrote: > > > Hello! > > My server is working with pgsql 7.4.2 and Unix Solaris 8. Well, when a try a > connection from my PC to the server, using pgAdminIII, I get the message > above. This is my pg_hba.conf file: > > local all all trust > # IPv4-style local connections: > host all all 127.0.0.1 255.255.255.255 trust > host all all 172.17.0.0 255.255.0.0 trust [snip] There is an issue, as yet not understood (last I knew), with some versions of (?) Solaris and IP-address-with-netmask configuration entries in pg_hba.conf. Try changing your two "host" lines to: # IPv4-style local connections: host all all 127.0.0.1/32 trust host all all 172.17.0.0/16 trust and see if that doesn't resolve your problem. Jim
Sandro Ribeiro - Claro RS - <Sandro.Ribeiro@claro.com.br> writes: > My server is working with pgsql 7.4.2 and Unix Solaris 8. > [ this pg_hba.conf line doesn't work: ] > host all all 127.0.0.1 255.255.255.255 trust We've seen some reports suggesting that Solaris has a problem with the all-ones netmask. You could probably get it to work either by loosening the netmask a little: host all all 127.0.0.1 255.255.255.0 trust or by using CIDR style: host all all 127.0.0.1/32 trust regards, tom lane