# [SOLVED] invalid IP mask in pg_hba.conf

## plimpton

I'm trying to run a remote java program that issues database calls to postgresql but i get an error:

org.postgresql.util.PSQLException: FATAL: missing or erroneous pg_hba.conf file

so i check the log

eas-rivida data # tail -n 500 postgresql.log | grep pg_hba.conf

LOG:  invalid IP mask "trust" in file "/var/lib/postgresql/data/pg_hba.conf" line 74: Name or service not known

FATAL:  missing or erroneous pg_hba.conf file

Hmm, i've been screwing around trying to figure it out, here's the last section of the file:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only

local   all         all                               trust

# IPv4 local connections:

host    all         all         127.0.0.1/32          trust

host    all         all         66.65.134.235          trust

host    all         all         66.14.45.0/24          trust

# IPv6 local connections:

host    all         all         ::1/128               trust

the problem is the 66.65.134.235 line. No matter where i put the line on the file it doesn't like it. What am i missing?

UPDATE:

just tried changing the ip to 66.65.134.0/240 and now i get:

invalid entry in file "/var/lib/postgresql/data/pg_hba.conf" at line 74, token "66.65.134.0/240"

UPDATE2:

tried setting the subnet mask on the same line and that was it, i don't know why that particular ip needed it but whatever

----------

