[FWTools] problem connecting to postgis from mapserver fwtools 1.12 postgis 1.20 postgres 8.1.6

Dave Potts dave.potts at pinan.co.uk
Thu Jan 11 20:24:46 EST 2007


 I get the following error attempting to connect to localhost on a windoz xp machine

    "msDrawMap(): Image handling error. Failed to draw layer named 'castles'.
    msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
    connect string 'host=localhost user=dave password=*******
    dbname=castle'.Error reported was 'unknown host name: localhost'.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"

    My connection string is 
    Connection "host=localhost user=dave passwd=foobar dbname=castle"
    
    The postgis database log file does'nt record any connection attempts, so I think the problem is local to mapserver
    The tool kit is fwtools 1.12, postgres 8.1.6.

    
    A nslookup on localhost return the expected address of 127.0.0.1
    
    I have tried staring a postgres instance on 10.1.1.8, chaging the connection string, it gave the same type of error.
    
    Which version of postgis/postgres is fwtoolsbin/mapserver linked against ?
    
    I have tried disabling by firewall, anti virus stuff
    
    I can connect directly to the database by doing something like telnet localhost 5432, I can connection, therefore its possible to connect to the database directly.
    
    I have tried running mapserver on an maci Mini, no problems noted.
    
    Any suggestion ???
    
    regards
    
    
    Dave.
    
    
    
    
    

- Done.



------------------------------------------------------------------------

Subject:
fwtools mapservr /postgis connection problems.
From:
Dave Potts <dave.potts at pinan.co.uk>
Date:
Fri, 12 Jan 2007 01:06:12 +0000

To:
fwtools-request at lists.maptools.org


I am getting an error attempt to connect to a postgis database on 
windows xp

The error is

"msDrawMap(): Image handling error. Failed to draw layer named 'castles'.
msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
connect string 'host=localhost user=dave password=*******
dbname=castle'.Error reported was 'unknown host name: localhost'.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"

By connection string is
Connection "host=localhost user=dave passwd=foobar dbname=castle"

The postgis database log file does'nt record any connection attempts, so 
I think the problem is local to mapserver
The tool kit is fwtools 1.13, postgres 8.1.6.

A nslookup on localhost return the expected address of 127.0.0.1

I have tried staring a postgres instance on 10.1.1.8, chaging the 
connection string, it gave the same type of error.

Which version of postgis/postgres is fwtoolsbin/mapserver linked against ?

I have tried disabling by firewall, anti virus stuff

I can connect directly to the database by doing something like telnet 
localhost 5432, I can connection, therefore its possible to connect to 
the database directly.

I have tried running mapserver on an maci Mini, no problems noted.

Any suggestion ???

regards


Dave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dave.potts.vcf
Type: text/x-vcard
Size: 85 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/fwtools/attachments/20070112/c2d3de0c/dave.potts.vcf


More information about the FWTools mailing list