<html><div style='background-color:'><DIV class=RTE>
<P>I have changed md5 for trust:</P>
<P>host    all         all         127.0.0.1/32          trust</P>
<P>and neither it works.</P>
<P>I have proven in the console ping localhost and ping 127.0.0.1 and the result is correct.</P>
<P>I am working with postgres 8.0 and with tomcat 5.0.28 in windows. I believe that the problem can tomcat being.</P>
<P>thanks to everybody<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>

<DIV></DIV>From:  <I>Paul Scott <pscott@uwc.ac.za></I><BR>Reply-To:  <I>PostGIS Users Discussion <postgis-users@postgis.refractions.net></I><BR>To:  <I>PostGIS Users Discussion <postgis-users@postgis.refractions.net></I><BR>Subject:  <I>Re: [postgis-users] Problem with mapserver-postgis</I><BR>Date:  <I>Mon, 17 Oct 2005 05:44:36 +0200</I><BR>>Change the bit that says md5 to trust and restart the server. That<BR>>should allow all ipv4 connections to the server from localhost.<BR>><BR>>--Paul<BR>><BR>>On Sun, 2005-10-16 at 19:57 +0000, Juan Barón wrote:<BR>> > I have in the file pg_hba.conf the following one it lines:<BR>> ><BR>> > host    all         all         
127.0.0.1/32          md5<BR>> ><BR>> > and I have proven to not putting the password in the connection string<BR>> > but the result is the same one, that is to say, it doesn't work and it<BR>> > shows the same message:<BR>> ><BR>> > msDrawMap(): Image handling error. Failed to draw layer named<BR>> > 'callejero'.<BR>> > msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with<BR>> > connect string 'user=postgres dbname=pruebapostgis'.<BR>> > Error reported was 'could not translate host name "localhost" to<BR>> > address: Unknown host '.<BR>> > This error occured when trying to make a connection to the specified<BR>> > postgresql server.<BR>> > Most commonly this is caused by<BR>> > (1) incorrect connection string<BR>> > (2) you 
didnt specify a 'user=...' in your connection string<BR>> > (3) the postmaster (postgresql server) isnt running<BR>> > (4) you are not allowing TCP/IP connection to the postmaster<BR>> > (5) your postmaster is not running on the correct port - if its not on<BR>> > 5432 you must specify a 'port=...'<BR>> > (6) the security on your system does not allow the webserver (usually<BR>> > user 'nobody') to make socket connections to the postmaster<BR>> > (7) you forgot to specify a 'host=...' if the postmaster is on a<BR>> > different machine<BR>> > (8) you made a typo<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> >         ______________________________________________________________<BR>> >         From:  Paul Scott 
<pscott@uwc.ac.za><BR>> >         Reply-To:  PostGIS Users Discussion<BR>> >         <postgis-users@postgis.refractions.net><BR>> >         To:  PostGIS Users Discussion<BR>> >         <postgis-users@postgis.refractions.net><BR>> >         Subject:  Re: [postgis-users] Problem with mapserver-postgis<BR>> >         Date:  Sun, 16 Oct 2005 21:11:49 +0200<BR>> >         >Have you checked your pg_hba.conf that the localhost or<BR>> >         127.0.0.1 entry<BR>> 
>         >is a trusted user? If not try setting the ident part to trust<BR>> >         and<BR>> >         >restart the server.<BR>> >         ><BR>> >         >--Paul<BR>> >         ><BR>> >         >On Sun, 2005-10-16 at 18:55 +0000, Juan Barón wrote:<BR>> >         > > I have pulled up postmaster with - i  and it continues<BR>> >         without working<BR>> >         > ><BR>> 
>         > ><BR>> >         > ><BR>> >         > ><BR>> >         > ><BR>> >         > ><BR>> >         ______________________________________________________________<BR>> >         > >         From:  Armin Burger <armin.burger@gmx.net><BR>> >         > >         Reply-To:  PostGIS Users Discussion<BR>> >         > 
>         <postgis-users@postgis.refractions.net><BR>> >         > >         To:  PostGIS Users Discussion<BR>> >         > >         <postgis-users@postgis.refractions.net><BR>> >         > >         Subject:  Re: [postgis-users] Problem with<BR>> >         mapserver-postgis<BR>> >         > >         Date:  Sun, 16 Oct 2005 12:57:56 +0200<BR>> 
>         > >         >Is postmaster started with the -i option (enable<BR>> >         TCP/IP<BR>> >         > >         >connections)?<BR>> >         > >         ><BR>> >         > >         >Armin<BR>> >         > >         ><BR>> >         > >         >Juan Barón wrote:<BR>> 
>         > >         >>Hi:<BR>> >         > >         >><BR>> >         > >         >>I have changed the connection string writing the<BR>> >         password:<BR>> >         > >         >><BR>> >         > >         >>CONNECTION "user=postgres password=postgres<BR>> >         > 
>         dbname=pruebapostgis<BR>> >         > >         >>host=localhost port=5432"<BR>> >         > >         >><BR>> >         > >         >>and I obtain the same result:<BR>> >         > >         >><BR>> >         > >         >>msDrawMap(): Image handling error. Failed to<BR>> >         draw layer<BR>> 
>         > >         named<BR>> >         > >         >>'callejero'.<BR>> >         > >         >>msPOSTGISLayerOpen(): Query error. couldnt make<BR>> >         connection<BR>> >         > >         to DB<BR>> >         > >         >>with connect string 'user=postgres<BR>> >         password=postgres<BR>> 
>         > >         >>dbname=pruebapostgis host=localhost port=5432'.<BR>> >         > >         >>Error reported was 'could not translate host<BR>> >         name<BR>> >         > >         "localhost" to<BR>> >         > >         >>address: Unknown host '.<BR>> >         > >         >>This error occured when trying to make a<BR>> 
>         connection to the<BR>> >         > >         >>specified postgresql server.<BR>> >         > >         >>Most commonly this is caused by<BR>> >         > >         >>(1) incorrect connection string<BR>> >         > >         >>(2) you didnt specify a 'user=...' in your<BR>> >         connection string<BR>> >         > 
>         >>(3) the postmaster (postgresql server) isnt<BR>> >         running<BR>> >         > >         >>(4) you are not allowing TCP/IP connection to<BR>> >         the postmaster<BR>> >         > >         >>(5) your postmaster is not running on the<BR>> >         correct port - if<BR>> >         > >         its not<BR>> >         > 
>         >>on 5432 you must specify a 'port=...'<BR>> >         > >         >>(6) the security on your system does not allow<BR>> >         the<BR>> >         > >         webserver<BR>> >         > >         >>(usually user 'nobody') to make socket<BR>> >         connections to the<BR>> >         > >         >>postmaster<BR>> 
>         > >         >>(7) you forgot to specify a 'host=...' if the<BR>> >         postmaster is<BR>> >         > >         on a<BR>> >         > >         >>different machine<BR>> >         > >         >>(8) you made a typo<BR>> >         > >         >><BR>> >         > 
>         >>I have also proven to connect me to the db from<BR>> >         the command<BR>> >         > >         prompt<BR>> >         > >         >>with the login information and I connect myself<BR>> >         well:<BR>> >         > >         >><BR>> >         > >         >>psql  pruebapostgis  -U postgres<BR>> 
>         > >         >><BR>> >         > >         >>somebody knows which is the problem, it seems<BR>> >         that it<BR>> >         > >         doesn't<BR>> >         > >         >>transfer localhost to an address, I have also<BR>> >         proven with<BR>> >         > >         127.0.0.1<BR>> 
>         > >         >>and neither it works<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> >         > ><BR>> 
>         >>------------------------------------------------------------------------<BR>> >         > >         >><BR>> >         > >         >>     From:  /Prashanth Ram <pram123@gmail.com>/<BR>> >         > >         >>     Reply-To:  /pram@pramcentral.com,PostGIS<BR>> >         Users<BR>> >         > >         Discussion<BR>> 
>         > >         >>     <postgis-users@postgis.refractions.net>/<BR>> >         > >         >>     To:  /PostGIS Users Discussion<BR>> >         > >         >><postgis-users@postgis.refractions.net>/<BR>> >         > >         >>     Subject:  /Re: [postgis-users] Problem with<BR>> >         > >         
mapserver-postgis/<BR>> >         > >         >>     Date:  /Sat, 15 Oct 2005 17:47:06 -0400/<BR>> >         > >         >><BR>> >         > >         >>     Juan:<BR>> >         > >         >>        Have you tried connecting to the db from<BR>> >         the command<BR>> >         > 
>         prompt<BR>> >         > >         >>with<BR>> >         > >         >>     the login information?<BR>> >         > >         >>       Also, the connection string is missing<BR>> >         the password<BR>> >         > >         >><BR>> >         > >         
>>     -Prashanth<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >>     --     HTMLX.com<BR>> >         > >         >>     Mapserver Hosting, Mapscript Hosting, PHP<BR>> >         Hosting<BR>> >         > >         
>>     PostgreSQL w/PostGIS extension enabled<BR>> >         Hosting<BR>> >         > >         >><BR>> >         > >         >>     On 10/15/05, *Juan Barón*<BR>> >         <jbarong@hotmail.com<BR>> >         > >         >>     <mailto:jbarong@hotmail.com>> wrote:<BR>> >         > >         >><BR>> 
>         > >         >>Hello list,<BR>> >         > >         >><BR>> >         > >         >>I am using mapserver 4.4.1 and postgresql 8.0<BR>> >         with postgis.<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> 
>         > >         >>         I have a layer in the map file:<BR>> >         > >         >><BR>> >         > >         >>         LAYER<BR>> >         > >         >>           CONNECTIONTYPE postgis<BR>> >         > >         
>>             NAME callejero<BR>> >         > >         >>             CONNECTION "user=postgres<BR>> >         dbname=pruebapostgis<BR>> >         > >         >>host=localhost<BR>> >         > >         >>         port=5432"<BR>> >         > >         
>>             DATA "the_geom from tablacallejero"<BR>> >         > >         >><BR>> >         > >         >>             STATUS DEFAULT<BR>> >         > >         >>             TYPE LINE<BR>> >         > >         >>             CLASS<BR>> 
>         > >         >>              COLOR 255 0 0<BR>> >         > >         >>             END<BR>> >         > >         >>         END<BR>> >         > >         >><BR>> >         > >         
>>         and when I execute the application, the<BR>> >         layer<BR>> >         > >         doesn't<BR>> >         > >         >>appear me         and the<BR>> >         > >         >>         result is a message for screen:<BR>> >         > >         >><BR>> >         > 
>         >>         msDrawMap(): Image handling error.<BR>> >         Failed to draw<BR>> >         > >         layer<BR>> >         > >         >>named<BR>> >         > >         >>         'callejero'.<BR>> >         > >         >><BR>> >         > 
>         >>         msPOSTGISLayerOpen(): Query error.<BR>> >         couldnt make<BR>> >         > >         connection<BR>> >         > >         >>to DB<BR>> >         > >         >>         with<BR>> >         > >         >>         connect string 'user=postgres<BR>> 
>         dbname=pruebapostgis<BR>> >         > >         >>host=localhost<BR>> >         > >         >>         port=5432'.<BR>> >         > >         >>         Error reported was 'could not translate<BR>> >         host name<BR>> >         > >         >>"localhost" to<BR>> >         > 
>         >>         address:<BR>> >         > >         >><BR>> >         > >         >>         Unknown host '.<BR>> >         > >         >>         This error occured when trying to make<BR>> >         a connection<BR>> >         > >         to the<BR>> 
>         > >         >>specified<BR>> >         > >         >>         postgresql server.<BR>> >         > >         >>         Most commonly this is caused by<BR>> >         > >         >>         (1) incorrect connection string<BR>> >         > >         
>>         (2) you didnt specify a 'user=...' in<BR>> >         your<BR>> >         > >         connection<BR>> >         > >         >>string<BR>> >         > >         >><BR>> >         > >         >>         (3) the postmaster (postgresql server)<BR>> >         isnt running<BR>> 
>         > >         >>         (4) you are not allowing TCP/IP<BR>> >         connection to the<BR>> >         > >         >>postmaster<BR>> >         > >         >>         (5) your postmaster is not running on<BR>> >         the correct<BR>> >         > >         port -<BR>> >         > 
>         >>if its<BR>> >         > >         >>         not on<BR>> >         > >         >>         5432 you must specify a 'port=...'<BR>> >         > >         >><BR>> >         > >         >>         (6) the security on your system does<BR>> >         not allow the<BR>> 
>         > >         >>webserver<BR>> >         > >         >>         (usually<BR>> >         > >         >>         user 'nobody') to make socket<BR>> >         connections to the<BR>> >         > >         >>postmaster<BR>> >         > >         
>>         (7) you forgot to specify a 'host=...'<BR>> >         if the<BR>> >         > >         postmaster<BR>> >         > >         >>is on a<BR>> >         > >         >>         different<BR>> >         > >         >>         machine<BR>> >         > 
>         >><BR>> >         > >         >>         (8) you made a typo<BR>> >         > >         >><BR>> >         > >         >>         I have proven to change localhost for<BR>> >         127.0.0.1<BR>> >         > >         >>         <http://127.0.0.1/>, but the result is<BR>> 
>         the<BR>> >         > >         >>         same one.<BR>> >         > >         >><BR>> >         > >         >>         postgresql this being executed, because<BR>> >         if I put<BR>> >         > >         netstat -<BR>> >         > 
>         >>na<BR>> >         > >         >>         appears:<BR>> >         > >         >><BR>> >         > >         >>         TCP 127.0.0.1:5432<BR>> >         > >         <http://127.0.0.1:5432/>  LISTENING<BR>> >         > >         >><BR>> 
>         > >         >>         I don't know which is the problem.<BR>> >         > >         >><BR>> >         > >         >>         Thank's<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         
>><BR>> >         > >         >><BR>> >         > >         >><BR>> >         _______________________________________________<BR>> >         > >         >>         postgis-users mailing list<BR>> >         > >         >>         postgis-users@postgis.refractions.net<BR>> >         > 
>         >><BR>> >         <mailto:postgis-users@postgis.refractions.net><BR>> >         > >         >><BR>> >         > ><BR>> >         >>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> 
>         > >         >><BR>> >         > >         >><BR>> >         > >         >><BR>> >         > >         >>     --     HTMLX.com<BR>> >         > >         >>     Mapserver Hosting, Mapscript Hosting, PHP<BR>> >         Hosting<BR>> >         > 
>         >>     PostgreSQL w/PostGIS extension enabled<BR>> >         Hosting<BR>> >         > >         >><BR>> >         > ><BR>> >         >>      >_______________________________________________<BR>> >         > >         >>      >postgis-users mailing list<BR>> >         > >         
>>      >postgis-users@postgis.refractions.net<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > ><BR>> >         >http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> >         > >         >><BR>> >         > >         >><BR>> >         > ><BR>> 
>         >>------------------------------------------------------------------------<BR>> >         > >         >><BR>> >         > >         >>_______________________________________________<BR>> >         > >         >>postgis-users mailing list<BR>> >         > >         >>postgis-users@postgis.refractions.net<BR>> >         > ><BR>> >         
>>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> >         > >         >_______________________________________________<BR>> >         > >         >postgis-users mailing list<BR>> >         > >         >postgis-users@postgis.refractions.net<BR>> >         > ><BR>> >         >http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> >         > > _______________________________________________<BR>> 
>         > > postgis-users mailing list<BR>> >         > > postgis-users@postgis.refractions.net<BR>> >         > ><BR>> >         http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> >         ><BR>> >         >_______________________________________________<BR>> >         >postgis-users mailing list<BR>> >         >postgis-users@postgis.refractions.net<BR>> >         
>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>> > _______________________________________________<BR>> > postgis-users mailing list<BR>> > postgis-users@postgis.refractions.net<BR>> > http://postgis.refractions.net/mailman/listinfo/postgis-users<BR>><BR>>_______________________________________________<BR>>postgis-users mailing list<BR>>postgis-users@postgis.refractions.net<BR>>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></FONT></BLOCKQUOTE></div></html>