Mapserver and Postgis
Frans Knibbe
frans at GEODAN.NL
Mon Nov 7 05:42:12 PST 2005
Hello Ezeqiuas,
I believe the second line is meant to give access to other computers on
the LAN. Do you have a class B network? Shouldn't the subnet mask on the
second line be 255.255.0.0? I use this line in my pg_hba.conf:
host all all 192.168.25.0/24 trust
We use a class C network..
Here you can see what the pg_hba.conf settings mean:
http://www.postgresql.org/docs/8.0/static/client-authentication.html
Regards,
Frans
Ezequias Rodrigues da Rocha wrote:
> My pg_hba.conf is here:
>
> host all all 10.0.0.0 255.0.0.0 password
> host all all 192.168.0.0 255.0.0.0 password
> host all all 127.0.0.1/32 trust
> host all all 200.249.133.135 255.255.255.255
> password
> # IPv6 local connections:
> host all all ::1/128 trust
> host all all 192.168.0.0 255.255.0 0 password
>
> What do you say about that ?
>
>
>
> Frans Knibbe wrote:
>
>> Hello Ezequias,
>>
>> Did you edit pg_hba.conf to allow non-local connections to your
>> database?
>>
>> Regards,
>>
>> Frans
>>
>> Ezequias Rodrigues da Rocha wrote:
>>
>>> Hi list,
>>>
>>> I am starting with mapserver, but have a very important error and I
>>> have no idea how to put it to work. I doesn't even know if I did it
>>> before but here is the problem:
>>>
>>> I am trying to access a postgis layer with the mapserver 4.4.2 and
>>> via browser the return of server was:
>>>
>>> msDrawMap(): Image handling error. Failed to draw layer named
>>> 'bairros'.
>>> msPOSTGISLayerOpen(): Query error. couldnt make connection to DB
>>> with connect string 'user=postgres password=post dbname=dbpotgis
>>> host=192.168.0.15 port=5432'.
>>> Error reported was 'could not create socket: Permission denied '.
>>> This error occured when trying to make a connection to the specified
>>> postgresql server.
>>> Most commonly this is caused by
>>> (1) incorrect connection string
>>> (2) you didnt specify a 'user=...' in your connection string
>>> (3) the postmaster (postgresql server) isnt running
>>> (4) you are not allowing TCP/IP connection to the postmaster
>>> (5) your postmaster is not running on the correct port - if its not
>>> on 5432 you must specify a 'port=...'
>>> (6) the security on your system does not allow the webserver
>>> (usually user 'nobody') to make socket connections to the postmaster
>>> (7) you forgot to specify a 'host=...' if the postmaster is on a
>>> different machine
>>> (8) you made a typo
>>>
>>>
>>> I hope someone could help me. Nobody did before.
>>>
>>> Sincerely
>>> Ezequias
>>>
>>>
>>
>>
>
More information about the MapServer-users
mailing list