[mapserver-users] PostGIS Connection Failure

Carmen Delia Hernández Pérez cdhernandez at tenerife.es
Wed Apr 29 23:49:34 PDT 2015


Hello,

You not have why  disable SELINUX. you must allow Apache connects with Postgis. You can execute this command

sudo setsebool -P httpd_can_network_connect_db 1


Carmen D.
________________________________
De: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] En nombre de Mike McCann
Enviado el: miércoles, 29 de abril de 2015 16:07
Para: mapserver-users at lists.osgeo.org
Asunto: Re: [mapserver-users] PostGIS Connection Failure


On Wed, 6/25/14, Krishna Priya Patury <krishna.patury at gmail.com<http://lists.osgeo.org/mailman/listinfo/mapserver-users>> wrote:



> Subject: Re: [mapserver-users] PostGIS Connection Failure

> To: humberto at pastoraldacrianca.org.br<http://lists.osgeo.org/mailman/listinfo/mapserver-users>

> Cc: "mapserver-users at lists.osgeo.org<http://lists.osgeo.org/mailman/listinfo/mapserver-users>" <mapserver-users at lists.osgeo.org<http://lists.osgeo.org/mailman/listinfo/mapserver-users>>

> Date: Wednesday, June 25, 2014, 10:13 AM

>

> 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.

>

>

> 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.



This is really weird. Are you sure the application outside of your VM that works has the same connection string as the one that doesn't works ? Both applications (the one that works and the one that doesn´t) are using the same version of Mapserver ? Both applications (the one that works and the one that doesn´t) are hosted in the same machine/VM ?





Mtro. Carlos Ruiz
I encountered the same exact problem on 64-bit CentOS 6.5: mapserv is able to connect to the database except when executed by apache httpd.

I saw a note that SELinux may be the cause, so I tried:

          echo 0 > /selinux/enforce

and it fixed the problem.

What are the implications of applying this fix? Does it impact system security in unfavorable ways?

-Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150430/667e77f2/attachment.html>


More information about the mapserver-users mailing list