[postgis-users]CONNECTION to database thru Mapserver

Doug_Newcomb at fws.gov Doug_Newcomb at fws.gov
Mon Mar 14 12:26:19 PST 2005


Wokar,
Check your postgresql.conf file to see if you are allowing tcp/ip
connections and your pg_hba.conf file to see if you are allowing
connections from 132.205.108.60

Doug

Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------

The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of Interior.
I left my signature file in /dev/null


|---------+--------------------------------------------->
|         |           w m <wokar1 at yahoo.com>            |
|         |           Sent by:                          |
|         |           postgis-users-bounces at postgis.refr|
|         |           actions.net                       |
|         |                                             |
|         |                                             |
|         |           03/14/2005 02:12 PM               |
|         |           Please respond to PostGIS Users   |
|         |           Discussion                        |
|         |                                             |
|---------+--------------------------------------------->
  >---------------------------------------------------------------------------------------------|
  |                                                                                             |
  |        To:      PostGIS Users Discussion <postgis-users at postgis.refractions.net>            |
  |        cc:                                                                                  |
  |        Subject: Re: [postgis-users]CONNECTION to database thru Mapserver                    |
  >---------------------------------------------------------------------------------------------|




Thanks for your reply. when I changed my STAUS to Default it gives me the
following error:

msDrawMap(): Image handling error. Failed to draw layer named 'Hotspots'.
msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
connect string 'user=project password=test dbname=Montreal
host=132.205.108.60'.
Error reported was 'could not connect to server: Connection refused Is the
server running on host "132.205.108.60" and accepting TCP/IP connections on
port 5432? '.
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 post master
(7) you forgot to specify a 'host=...' if the postmaster is on a different
machine
(8) you made a typo
My server is running, what I am not sure is (4) and (5). Can you please
explain me how can I check the above. Also the user name and password is
the user name and password for the database right?



pram at pramcentral.com wrote:

 ----- Original Message -----
 From: "w m"
 To: "PostGIS Users Discussion"
 Subject: Re: [postgis-users]CONNECTION to database thru Mapserver
 Date: Mon, 14 Mar 2005 09:02:56 -0800 (PST)

 >
 > Thank You for your response.
 > i made the changes that you suggested but i still have no luck in
 > displaying the points on the map. I'm not sure if a connection is
 > being established to the database or not...how can i know that??
 > and instead of local host i also tried to insert the ip address of
 > my server but it still didnt work nor did i get any errors.
 > any help would be appreciated greately
 > thank you
 > wokar
 >
 > LAYER
 > CONNECTIONTYPE postgis
 > NAME "Spots" # my table name
 > CONNECTION "user=test password=test dbname=MyDataBase host=localhost"
 > DATA "the_geom FROM Spots" # the_geom column from table Spots
 > STATUS ON
 > TYPE POINT
 > CLASS
 > COLOR 0 0 0
 > OUTLINECOLOR 0 0 0
 > SIZE 2
 > END
 > END
 >
 Have you tried with STATUS DEFAULT instead of STATUS ON

 -Prashanth
 --
 HTMLX.com
 Mapserver, Mapscript, PHP Hosting


 _______________________________________________
 postgis-users mailing list
 postgis-users at postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com _______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users












More information about the postgis-users mailing list