[Qgis-user] qgis server does not return any data from WFS

Luigi Pirelli luipir at gmail.com
Wed Nov 25 14:17:59 PST 2015


a compilation problem with Ubuntu Wily 64b more info here:

https://github.com/qgis/QGIS/commit/de602e7b2dd44c1845ea27685f84f8f885233879
Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************


On 25 November 2015 at 19:12, Jachym Cepicky <jachym.cepicky at gmail.com> wrote:
> Hmm, I can not compile :-(
> https://gist.github.com/luipir/dac9f2b67bb051e47767
>
>
>
> st 25. 11. 2015 v 14:50 odesílatel Andreas Neumann <a.neumann at carto.net>
> napsal:
>>
>> Hi Jachym,
>>
>> I believe this is a bug in the 2.12 release - or in the 2.12 ubuntu QGIS
>> package. Because 3 people reported it almost at the same time.
>>
>> I just compiled master on my server and WFS works fine. So it's most
>> likely fixed in master but would have to be backported to 2.12.x release and
>> 2.8.4 release.
>>
>> However, I don't know which commit fixed this issue.
>>
>>
>> Andreas
>>
>>
>> On 25.11.2015 14:37, Jachym Cepicky wrote:
>>
>> Andreas,
>>
>> thanks for clarification: I've not tedste GetPrint yet. Yes, GetMap works
>> (without DISPLAY set)
>>
>> about location of .qgs file - I just use it locally, try to get owslib to
>> work along with QGIS-WFS Server, so just for testing so far, but thanks for
>> reminding me
>>
>> Jachym
>>
>> st 25. 11. 2015 v 14:02 odesílatel Andreas Neumann <a.neumann at carto.net>
>> napsal:
>>>
>>> Hi Jachym,
>>>
>>> If WMS works (from the same project) and even GetPrint works, it
>>> shouldn't be the problem of the XServer or the DISPLAY variable.
>>>
>>> The XServer is required for printing as PDF (getPrint) and I believe also
>>> for rendering SVG symbols or patterns. X-Server (or an X-Server replacement,
>>> such XVNC) is required for QGIS Server - even if it is quite uncommon that
>>> an X-Server runs on a machine that also runs the Webserver.
>>>
>>> BTW: you should never put your .qgs project files in a path readable by
>>> the Webserver, but always outside. Just because you list /var/www/html -
>>> which is often the Server Root.
>>>
>>> .qgs files may contain sensitive information (such as db connections,
>>> passwords, etc.) and it shouldn't be downloadable from a web client.
>>>
>>>
>>> Andreas
>>>
>>>
>>> On 25.11.2015 13:48, Jachym Cepicky wrote:
>>>
>>> Hi Andreas: yes, it's 2.12,
>>>
>>> command line works:
>>>
>>> QGIS_PROJECT_FILE=/var/www/html/tmp/pokus/vrstva.qgs
>>> QUERY_STRING="SERVICE=WFS&REQUEST=GetFeature&TYPENAME=vrstva"
>>>
>>> /var/www/cgi-bin/qgis_mapserv.fcgi
>>>
>>> response as expected
>>>
>>> Is it possible, that it's related to DISPLAY variable? I've seen it in
>>> some documentation .. if set to :0 or :99 server returns ServerError
>>>
>>> Thanks
>>>
>>> Jachym
>>>
>>> st 25. 11. 2015 v 13:32 odesílatel Andreas Neumann <a.neumann at carto.net>
>>> napsal:
>>>>
>>>> Since your are now the third person who has the same problem, within the
>>>> couple of days, I suspect that there really is a bug in QGIS server in this
>>>> particular release.
>>>>
>>>> Is this on 2.12?
>>>>
>>>>
>>>> Andreas
>>>>
>>>>
>>>> On 25.11.2015 12:29, Jachym Cepicky wrote:
>>>>
>>>> hi Stefan,
>>>>
>>>> apache runs as www-data
>>>>
>>>> the file is accessible via http://localhost/tmp/pokus/vrstva.shp -  so I
>>>> assume, it is readable by www-data
>>>>
>>>> GetMap request as WMS works
>>>> GetFeatureType as WFS does not
>>>>
>>>> thanks
>>>>
>>>> Jachym
>>>>
>>>> st 25. 11. 2015 v 11:38 odesílatel Blumentrath, Stefan
>>>> <Stefan.Blumentrath at nina.no> napsal:
>>>>>
>>>>> Is /var/www/html/tmp/pokus/vrstva.shp readable for user “www-data”
>>>>> (which is the default user for accessing QGIS Server I assume)? Or is that
>>>>> the ‘apache user’ you referred to or did you configure apache to explicitly
>>>>> access through another user than ‘www-data’?
>>>>>
>>>>>
>>>>>
>>>>> Cheers
>>>>>
>>>>> Stefan
>>>>>
>>>>>
>>>>>
>>>>> From: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of
>>>>> Jachym Cepicky
>>>>> Sent: 25. november 2015 11:28
>>>>> To: qgis-user at lists.osgeo.org
>>>>> Subject: [Qgis-user] qgis server does not return any data from WFS
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> several days, I'm fighting QGIS server - on lightttpd now on Apache
>>>>> server with *same* result: WFS GetFeatureType request does not return any
>>>>> data.
>>>>>
>>>>>
>>>>>
>>>>> I created project, set all necessary metadat, coordinate systems, made
>>>>> sure data are in readable path etc...
>>>>>
>>>>>
>>>>>
>>>>> I've published the service using qgis_mapserver.fcgi - WMS works
>>>>> (GetCapabilitiers, GetMap, GetFeatureInfo), but WFS works just for
>>>>> GetCapabilitiers, GetFeatureType request returns just the first response
>>>>> element
>>>>>
>>>>>
>>>>>
>>>>> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"
>>>>> xmlns:ogc="h .....>
>>>>>
>>>>>
>>>>>
>>>>> and that's all - not even the closing tag. It seems, the server refuses
>>>>> to work in the middle of construction of the response :-(
>>>>>
>>>>>
>>>>>
>>>>> I have
>>>>>
>>>>>
>>>>>
>>>>>             FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH /var/www/qgis
>>>>>
>>>>>             FcgidInitialEnv QGIS_DEBUG 1
>>>>>
>>>>>             FcgidInitialEnv QGIS_SERVER_LOG_FILE  /tmp/qgis-server.log
>>>>>
>>>>>             FcgidInitialEnv QGIS_SERVER_LOG_LEVEL  1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> but  /tmp/qgis-server.log is empty (even created)
>>>>>
>>>>>
>>>>>
>>>>> In the apache error log, only following lines can be found:
>>>>>
>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>> environment variable.
>>>>>
>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>> environment variable.
>>>>>
>>>>> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
>>>>> environment variable.
>>>>>
>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>> environment variable.
>>>>>
>>>>> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
>>>>> environment variable.
>>>>>
>>>>> ERROR 4: Unable to open /var/www/html/tmp/pokus/vrstva.shp or
>>>>> /var/www/html/tmp/pokus/vrstva.SHP.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> BUT, accessing the file vrstva.shp from
>>>>> http://localhost/tmp/pokus/vrstva.shp works, apache user can read it and, as
>>>>> I already said: WMS GetMap and GetFeatureInfo works
>>>>>
>>>>>
>>>>>
>>>>> I've tested QGIS mapserver 2.12 and 2.8 on lightttpd as well as apache,
>>>>> with old projects as well as completely new with just one line in shapefile
>>>>> - same result all the time.  Ubuntu 15.10 btw.
>>>>>
>>>>>
>>>>>
>>>>> Any hint?
>>>>>
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>> Jachym
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>>
>>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list