[mapserver-users] PostGIS Connection Failure

Humberto Cereser Ibanez humberto at pastoraldacrianca.org.br
Wed Jun 25 11:23:53 PDT 2014


Hi Krishna,

On Wed, 2014-06-25 at 11:13 -0400, Krishna Priya Patury wrote:
> Thanks for responding. Would you please tell me how to check that?
> When I go to Network Proxy on the VM, "Direct Connection to internet"
> is selected.

I do not know the particularities of your Centos box (I use Debian), but
I'm hearing some issues about selinux that affect connections on this
O.S.

> 
> 
> Both Mapserver and Postgres on the same VM. Do you think something
> might still be blocking the port? I am able to open a psql connection
> just fine using the same port. What is even more confusing is a
> Mapserver application outside the VM is able to connect to the
> Database on the VM just fine. 

In this case, appears that do not have a blockage of the 5432 port on
your network.

But, probably there are more issues than the user difference that you
mentioned, when the connection is established by the psql or by the
application at localhost.
I suggest you to check:
1) The result of "netstat -a | grep postgres" command
2) The parameter listen_addresses from postgresql configuration file
3) The selinux' configuration

Best regards,

Humberto Cereser Ibanez
> 
> 
> 
> On Wed, Jun 25, 2014 at 10:18 AM, Humberto Cereser Ibanez
> <humberto at pastoraldacrianca.org.br> wrote:
>         Hi Krishna,
>         
>         On Tue, 2014-06-24 at 09:35 -0400, Krishna Priya Patury wrote:
>         > Just wanted to add, when I do a service iptables status, it
>         is says
>         > Firewall is not running.
>         >
>         >
>         > On Tue, Jun 24, 2014 at 9:30 AM, Krishna Priya Patury
>         > <krishna.patury at gmail.com> wrote:
>         >         Hi All,
>         >
>         >         Any other ideas?
>         >
>         >         The map server application installed outside of my
>         Centos VM
>         >         can connect to the Postgres database on the VM. I
>         can also
>         >         connect to the database both from within and outside
>         the VM
>         >         using psql.
>         >
>         >         I believe the Mapserver installation on my VM is
>         fine too as
>         >         my shp2img and running the mapserver through command
>         line work
>         >         just fine. The issue is only when I try to connect
>         to the
>         >         database through the application from my VM.
>         >         I do not see anything additional in the logs.
>         
>         
>         I think that the requisition from your application is not
>         achieving your
>         VM.
>         Is the request sent by your application pass through a proxy
>         that blocks
>         the 5432 port or there is a bridge over which the requests
>         flow
>         directly?
>         
>         >         I can see that the database logs are not updated
>         when I hit it
>         >         though the application within the VM, understandably
>         so with
>         >         the error message in the browser.
>         >
>         >         The only difference between running shp2img and the
>         >         application is perhaps the user? I was able to open
>         a
>         >         succesful connection through psql as an 'apache'
>         user as
>         >         well(User which is running the Apache server). So am
>         not sure
>         >         what is missing.
>         >
>         >         Thanks,
>         >         Krishna.
>         >
>         
>         Best regards,
>         
>         Humberto Cereser Ibanez
>         >
>         >
>         >         On Mon, Jun 23, 2014 at 5:24 PM, Krishna
>         >         <krishna.patury at gmail.com> wrote:
>         >                 Yes I can connect to Postgres using the same
>         >                 connection information through psql both
>         from within
>         >                 and outside my vm.
>         >
>         >                 Sent from my iPhone
>         >
>         >                 > On Jun 23, 2014, at 5:20 PM, Paul Ramsey
>         >                 <pramsey at cleverelephant.ca> wrote:
>         >                 >
>         >                 > Did you restart your postgresql after
>         making the
>         >                 changes to pg_hba and postgresql.conf? Can
>         you telnet
>         >                 to port 5432? Can you connect with psql?
>         Just ignore
>         >                 mapserver for now, you have a connection
>         issue.
>         >                 >
>         >                 > P.
>         >                 >
>         >                 >
>         >                 > --
>         >                 > http://postgis.net
>         >                 > http://cleverelephant.ca
>         >                 >
>         >                 >
>         >                 > On June 23, 2014 at 2:17:19 PM, Krishna
>         >                 (krishna.patury at gmail.com) wrote:
>         >                 >>> As I mentioned I have disabled the
>         firewall. Or so
>         >                 I think. When
>         >                 >> I login as 'root' and click firewall it
>         says
>         >                 disabled. Any way
>         >                 >> I can confirm/ test this?
>         >                 >
>         >
>         >
>         >
>         >
>         >
>         
>         > _______________________________________________
>         > mapserver-users mailing list
>         > mapserver-users at lists.osgeo.org
>         > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>         
>         
>         _______________________________________________
>         mapserver-users mailing list
>         mapserver-users at lists.osgeo.org
>         http://lists.osgeo.org/mailman/listinfo/mapserver-users
>         
> 
> 




More information about the mapserver-users mailing list