[QGIS-Developer] QGIS-Server 2.99: Apache Internal Server Error

Benedikt Bonath b.bonath at googlemail.com
Tue Jul 25 08:01:13 PDT 2017


Hi everybody,

I have some problems to run QGIS-Server 2.99.

I'm not sure where the problems exactly come from: mod_fcgid, QGIS-Server
or my own settings?
With the LTR-Version of QGIS-Server everything works just fine, so I guess
the issues are in my environment variables or the current QGIS-Server
itself.
Hopefully someone is able to answer this question.

The Systems I tried with are (both were clean before):
1.
Debian stretch
Own QGIS-master build AND nightly apt-packages
Apache (v2.4.25) with mod_fcgid (v2.3.9)

2.
Windows 7
Latest OSGeo4W QGIS-Dev Version
Apache 2.4.18 with mod_fcgid (v2.3.7)


----DEBIAN----

When I run the qgis_mapserv.fcgi directly in the command line, everything
is fine and I get the right response back.

##Direct Request
QUERY_STRING="SERVICE=WMS&VERSION=1.3.0&MAP=/usr/lib/
cgi-bin/test.qgs&REQUEST=GetProjectSettings" QGIS_SERVER_LOG_LEVEL="1"
QGIS_SERVER_LOG_FILE="/tmp/qgis_server.log" /usr/lib/cgi-bin/qgis_mapserv.
fcgi
(Btw: Another Problem is to store the response of a GetMap-Request in
*.png-File 'QUERY_STRING="......REQUEST=GetMap" ./qgis_mapserv.fcgi >
/tmp/test.png' because the first four lines are ASCII-Informations about
QGIS Server. Maybe someone knows a solutions for that as well?)

##With Apache
When I try the same request via Apache I get an "Internal Server Error"
Request:
http://localhost/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.
0&MAP=test.qgs&REQUEST=GetProjectSettings

apache-config:
FcgidIOTimeout 120
FcgidInitialEnv LC_ALL "en_US.UTF-8"
FcgidInitialEnv PYTHONIOENDCODING UTF-8
FcgidInitialEnv LANG "en_US.UTF-8"
FcgidInitialEnv QGIS_DEBUG 1
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0
FcgidInitialEnv QGIS_SERVER_LOG_FILE /tmp/qgisserver.log
DocumentRoot /usr/lib/cgi-bin
<Directory "/usr/lib/cgi-bin">
    AllowOverride All
    Options +ExecCGI -MultiViews +FollowSymLinks
    Require all granted
</Directory>

apache-error.log:
[Tue Jul 25 12:23:40.844231 2017] [fcgid:warn] [pid 10071:tid
139731590080256] (104)Connection reset by peer: [client ::1:50678]
mod_fcgid: error reading data from FastCGI server
[Tue Jul 25 12:23:40.844357 2017] [core:error] [pid 10071:tid
139731590080256] [client ::1:50678] End of script output before headers:
qgis_mapserv.fcgi
[Tue Jul 25 12:23:43.753848 2017] [fcgid:error] [pid 10070:tid
139731678270656] mod_fcgid: process /usr/lib/cgi-bin/qgis_mapserv.fcgi(10144)
exit(communication error), get unexpected signal 6

The same error I get on the Windows-Machine. The only difference is, that
I'm not able to run the qgis_mapserv.fcgi.exe directly there (=>
Qt5Core.dll error)


----WINDOWS----

##Direct - Request
Request directly to qgis_mapserv.fcgi.exe (works with LTR-Server) through
OSGeo4W-Shell:
set QUERY_STRING=SERVICE^=WMS^&VERSION^=1.3.0^&MAP^=test.qgs^
&REQUEST^=GetProjectSettings&set QGIS_SERVER_LOG_LEVEL=0&set
QGIS_SERVER_LOG_FILE=C:\OSGeo4W\qgisserver.txt&C:\OSGeo4W\apps\qgis-dev\bin\
qgis_mapserv.fcgi.exe

Error-Message:
Problemsignatur:
  Problemereignisname: APPCRASH
  Anwendungsname: qgis_mapserv.fcgi.exe
  Anwendungsversion: 0.0.0.0
  Anwendungszeitstempel: 5976b11e
  Fehlermodulname: Qt5Core.dll
  Fehlermodulversion: 5.7.1.0
  Fehlermodulzeitstempel: 583ffb6c
  Ausnahmecode: c0000005
  Ausnahmeoffset: 0016b14a
  Betriebsystemversion: 6.1.7601.2.1.0.256.4
  Gebietsschema-ID: 1031
  Zusatzinformation 1: 4c0d
  Zusatzinformation 2: 4c0d4d78887f76d971d5d00f1f20a433
  Zusatzinformation 3: 4c0d
  Zusatzinformation 4: 4c0d4d78887f76d971d5d00f1f20a433


##With Apache
qgis_mapserv.fcgi.exe - error:
[Tue Jul 25 11:52:46.657559 2017] [fcgid:warn] [pid 6948:tid 1500] (OS
109)Die Pipe wurde beendet.  : [client 192.168.20.128:65360] mod_fcgid: get
overlap result error
[Tue Jul 25 11:52:46.657559 2017] [core:error] [pid 6948:tid 1500] [client
192.168.20.128:65360] End of script output before headers:
qgis_mapserv.fcgi.exe

apache-connfig(windows): (I've tried some variations here, but that's my
"normal" setting)
FcgidInitialEnv PATH "C:\OSGeo4W\bin;C:\OSGeo4W\
apps\qgis-dev\bin;C:\OSGeo4W\apps\grass\grass-7.2.1\bin;C:\
OSGeo4W\apps\grass\grass-7.2.1\lib;C:\Windows\system32;C:\
Windows;C:\Windows\System32\Wbem"
FcgidInitialEnv QGIS_PREFIX_PATH "C:\OSGeo4W\apps\qgis-dev"
FcgidInitialEnv QT_PLUGIN_PATH "C:\OSGeo4W\apps\qgis-dev\
qtplugins;C:\OSGeo4W\apps\Qt5\plugins"
FcgidInitialEnv TEMP "C:\temp"
FcgidInitialEnv PYTHONHOME "C:\OSGeo4W\apps\Python36"
FcgidInitialEnv QGIS_SERVER_LOG_FILE "C:\OSGeo4W\qgisserver.txt"
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL "0"
FcgidInitialEnv PYTHONIOENCODING UTF-8
FcgidInitialEnv LC_ALL "en_US.UTF-8"
FcgidInitialEnv LANG "en_US.UTF-8"

<Directory "C:\OSGeo4W/apps/qgis-dev/bin/">
AddHandler fcgid-script .exe
    Options ExecCGI
AllowOverride all
Require all granted
</Directory>


I spent a lot of time already in "playing around" with the
configuration-files, but without any result.

Thanks,
Benedikt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170725/9570a946/attachment-0001.html>


More information about the QGIS-Developer mailing list