[Qgis-user] Antw: Re: QGIS-Server GetMap-Request (3.6.0) does not work

Kai Behncke Kai.Behncke at ibbenbueren.de
Thu Apr 18 01:36:42 PDT 2019


Dear users, 

I now installed on SUSE SLES 15 QGIS 3.6.1 and with that it worked
immediately.

I use mapserv_qgis,fcgi in /usr/bin.


Apache-configuration looks like:

..

 ErrorLog /home/kai/qgis-server-error.log
  CustomLog /home/kai/qgis-server-access.log combined
  # Longer timeout for WPS... default = 40
  FcgidInitialEnv LC_ALL "en_US.UTF-8"
  FcgidInitialEnv PYTHONIOENCODING UTF-8
  FcgidInitialEnv  LANG "en_US.UTF-8"
  FcgidInitialEnv QGIS_DEBUG 0
   FcgidInitialEnv  QGIS_SERVER_LOG_LEVEL 0
   FcgidInitialEnv QGIS_SERVER_LOG_FILE "/home/kai/qgislog.log"
#   FcgidInitialEnv DISPLAY ":99"
    FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH "/home/kai/default/"
   FcgidInitialEnv QGIS_AUTH_PASSWORD_FILE
"/home/kai/default/qgis-auth.db"


 ScriptAlias /cgi-bin/ "/usr/bin/"

# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
 <IfModule mod_fcgid.c>


<Directory "/usr/bin/">
	 AllowOverride All
	  Options +ExecCGI -MultiViews +FollowSymLinks
	 AddHandler fcgid-script .fcgi
#	 FcgidInitialEnv QGIS_PROJECT_FILE "/home/kai/testprojekt.qgis"

	    <IfModule mod_access_compat.c>
			    Order allow,deny
			    Allow from all
	    </IfModule>
	  #Allow from all
	 #-MultiViews +FollowSymLinks Order allow,deny
	  #Allow from all
	  # -MultiViews +FollowSymLinks
	  # for apache2 > 2.4
	  Require all granted
   #   SetHandler fcgid-script
    #  AddHandler fcgid-script .fcgi
	 #Allow from all
</Directory>
</IfModule>

Best regards, Kai




Mit freundlichen Grüßen
Im Auftrag

Kai Behncke
Geoinformation
Tel.: +49 5451 931-7125

E-Mail: kai.behncke at ibbenbueren.de 

Rathaus II
Roncallistraße 3-5
1. Stock, Raum 105
49477 Ibbenbüren



>>> Alessandro Pasotti <apasotti at gmail.com> 16.04.2019 15:57 >>>

On Tue, Apr 16, 2019 at 3:51 PM Kai Behncke
<Kai.Behncke at ibbenbueren.de> wrote:


Dear users,

I try to set up a getMap Request to QGIS-Server 3.6.0 on a SUSE LTE
15-system.

The GetCapabilities-Request works well. 

And:


If I eg put a wrong layer in a getMap-request, the qgis server talks to
me:

<ServiceExceptionReport version="1.3.0"><ServiceException
code="LayerNotDefined">
Layer "xyz_4326" does not
exist</ServiceException></ServiceExceptionReport>

...so far so good.

but:


But if I send the (I think) correct request to qgis-server:

http://myserveraddress/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=7.62,52.22,7.82,52.31&
CRS=EPSG:4326&WIDTH=300&HEIGHT=300&LAYERS=adressen_4326&FORMAT=image/png&Map=/home/blabla/adressen.qgs


..the Apache-Server says:

Server-Error
Premature end of script headers: qgis_mapserv.fcgi 


This usually means that QGIS server crashed, hard to tell why.




in the qis-server log it looks not so bad:
15:39:57 INFO Server[10612]: Server initialized
15:39:57 INFO
/home/abuild/rpmbuild/BUILD/qgis-3.6.0/src/server/qgsserverplugins.cpp[10612]:
load library /usr/lib64/qgispython (3.6.0)
15:39:57 INFO
/home/abuild/rpmbuild/BUILD/qgis-3.6.0/src/server/qgsserverplugins.cpp[10612]:
Python support library loaded successfully.
15:39:57 INFO Server[10612]: No server python plugins are available
15:39:57 INFO Server[10612]: ******************** New request
***************
15:39:57 INFO Server[10612]: SERVER_NAME:
gisground2.ibbenbueren.intern
15:39:57 INFO Server[10612]: REQUEST_URI:
/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=7.62,52.22,7.82,52.31&CRS=EPSG:4326&WIDTH=300&HEIGHT=300&LAYERS=adressen_4326&FORMAT=image/jpeg&Map=/home/kai/adressen.qgs
15:39:57 INFO Server[10612]: REMOTE_ADDR: 10.45.30.117
15:39:57 INFO Server[10612]: HTTP_USER_AGENT: Mozilla/5.0 (Windows NT
6.1; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0
15:39:57 WARNING [10612]: formatString is: image/jpeg
15:39:57 INFO Server[10612]: BBOX:7.62,52.22,7.82,52.31
15:39:57 INFO Server[10612]: CRS:EPSG:4326
15:39:57 INFO Server[10612]: FORMAT:image/jpeg
15:39:57 INFO Server[10612]: HEIGHT:300
15:39:57 INFO Server[10612]: LAYERS:adressen_4326
15:39:57 INFO Server[10612]: MAP:/home/kai/adressen.qgs
15:39:57 INFO Server[10612]: REQUEST:GetMap
15:39:57 INFO Server[10612]: SERVICE:WMS
15:39:57 INFO Server[10612]: VERSION:1.3.0
15:39:57 INFO Server[10612]: WIDTH:300
15:39:57 INFO Server[10612]: WMS Request parameters:
15:39:57 INFO Server[10612]: - CRS : EPSG:4326
15:39:57 INFO Server[10612]: - WIDTH : 300
15:39:57 INFO Server[10612]: - HEIGHT : 300
15:39:57 INFO Server[10612]: - BBOX : 7.62,52.22,7.82,52.31
15:39:57 INFO Server[10612]: - LAYERS : adressen_4326
15:39:57 INFO Server[10612]: - FORMAT : image/jpeg
15:39:57 INFO Server[10612]: - VERSION : 1.3.0
15:39:57 INFO server[10612]: Parallel rendering deactivated


Has anybody an idea what is going wrong? Might it be a problem with the
output of an image?


No idea, sorry, you may try to increase logging level btw (see the docs
to know how).

You can also try to ssh into the machine and run qgis_server.fcgi
directly passing QUERY_STRING in the environement.

Hope that helps.





Thank you in advance, Kai



Mit freundlichen Grüßen
Im Auftrag

Kai Behncke
Geoinformation
Tel.: +49 5451 931-7125

E-Mail: kai.behncke at ibbenbueren.de 

Rathaus II
Roncallistraße 3-5
1. Stock, Raum 105
49477 Ibbenbüren



_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190418/bf08aa7c/attachment.html>


More information about the Qgis-user mailing list