[Mapserver-users] connection string

Johan Duflost jduflost at ben.vub.ac.be
Thu Apr 1 04:24:43 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_0029_01C417DB.EE0D4420
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi all,

I installed mapserver in tomcat under windows and I need to connect to a =
postgis db on another host but the following error message is returned :

msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with =
connect string 'user=3Dpgmap password=3Dpgmap dbname=3Dgis host=3Dcanis =
port=3D5432'.=20
Error reported was 'unknown host name: canis '.=20
This error occured when trying to make a connection to the specified =
postgresql server.=20
Most commonly this is caused by=20
(1) incorrect connection string=20
(2) you didnt specify a 'user=3D...' in your connection string=20
(3) the postmaster (postgresql server) isnt running=20
(4) you are not allowing TCP/IP connection to the postmaster=20
(5) your postmaster is not running on the correct port - if its not on =
5432 you must specify a 'port=3D...'=20
(6) the security on your system does not allow the webserver (usually =
user 'nobody') to make socket connections to the postmaster=20
(7) you forgot to specify a 'host=3D...' if the postmaster is on a =
different machine
(8) you made a typo=20

I checked all these possibilities but all of them seem to be right. Is =
this a bug of mapserver on windows ?

Does anybody have an idea ?

Thanks in advance,

Johan Duflost

Johan Duflost
Analyst Programmer
Belgian Biodiversity Information Facility (BeBIF)
Universite Libre de Bruxelles (ULB)
Boulevard du Triomphe - campus de la plaine
B-1050 Bruxelles
http://gis.bebif.be

------=_NextPart_000_0029_01C417DB.EE0D4420
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I installed mapserver in tomcat under =
windows and I=20
need to connect to a postgis db on another host but the following error =
message=20
is returned :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>msPOSTGISLayerOpen(): Query error. couldnt make connection to DB =
with=20
connect string 'user=3Dpgmap password=3Dpgmap dbname=3Dgis host=3Dcanis =
port=3D5432'.=20
<BR>Error reported was 'unknown host name: canis '. <BR>This error =
occured when=20
trying to make a connection to the specified postgresql server. <BR>Most =

commonly this is caused by <BR>(1) incorrect connection string <BR>(2) =
you didnt=20
specify a 'user=3D...' in your connection string <BR>(3) the postmaster=20
(postgresql server) isnt running <BR>(4) you are not allowing TCP/IP =
connection=20
to the postmaster <BR>(5) your postmaster is not running on the correct =
port -=20
if its not on 5432 you must specify a 'port=3D...' <BR>(6) the security =
on your=20
system does not allow the webserver (usually user 'nobody') to make =
socket=20
connections to the postmaster <BR>(7) you forgot to specify a =
'host=3D...' if the=20
postmaster is on a different machine<BR>(8) you made a typo </DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I checked all these possibilities but =
all of them=20
seem to be right. Is this a bug of mapserver on windows ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does anybody have an idea =
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Johan Duflost</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Johan Duflost<BR>Analyst =
Programmer<BR>Belgian=20
Biodiversity Information Facility (BeBIF)<BR>Universite Libre de =
Bruxelles=20
(ULB)<BR>Boulevard du Triomphe - campus de la plaine<BR>B-1050 =
Bruxelles<BR><A=20
href=3D"http://gis.bebif.be">http://gis.bebif.be</A><BR></FONT></DIV></BO=
DY></HTML>

------=_NextPart_000_0029_01C417DB.EE0D4420--





More information about the mapserver-users mailing list