Bug report #20470

QGIS Server 3.4 on Windows: Error tranferring

Added by Louis Leguan over 5 years ago. Updated about 5 years ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:QGIS Server
Affected QGIS version:3.4.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28290

Description

Hey,
I have just installed OsGeoaW version 3.4 and I am not able to publish WMS.
The Layer itself in QGIS show the error: 'Capabilities request failed' (CapabilitiesError.png) and shows the error 'transferring http://...' (ErrorTransferring.png).

Within the properties of the QGIS Server, the initial test does not show any errors (QGISStart.png).

Also the url https://localhost/cgi-bin/qgis_mapserv? show 'object not found' (mapserv.fcgi.png).

Is this a problem of the new version?

CapabilitiesError.PNG (11.7 KB) Louis Leguan, 2018-11-12 05:15 PM

ErrorTransferring.PNG (19.1 KB) Louis Leguan, 2018-11-12 05:15 PM

mapserv.fcgi.PNG (41.6 KB) Louis Leguan, 2018-11-12 05:15 PM

QGISStart.PNG (82.4 KB) Louis Leguan, 2018-11-12 05:15 PM

error.log Magnifier (1.83 KB) Louis Leguan, 2019-02-04 09:25 AM

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

On Windows the URL is like

https://localhost/cgi-bin/qgis_mapserv.exe

but for 2.18 installations with osgeo4w also "cgi-bin" was not used, instead was something like

https://localhost/qgis-ltr/qgis_mapserv.exe

also probably you don't want to use "https" but "http".

#2 Updated by Giovanni Manghi over 5 years ago

  • Category changed from Web Services clients/WMS to QGIS Server

#3 Updated by Uroš Preložnik over 5 years ago

First you need to check your URL how you call QGIS Server and try with capabilities request. Like Giovanni wrote, on Windows URL is different.
On normal installation this should give you XML response (assuming you are running Apache on port 80):

http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

If you receive Page not Found (404), something is wrong with your Apache configuration. Repeat setup:

https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/getting_started.html#installation-on-windows

#4 Updated by Louis Leguan about 5 years ago

I am now able to request the capabilities of the Service in the Browser.
URL: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

However. When trying to add the WMS to QGIS (http://localhost/cgi-bin/qgis_mapserv.fcgi.exe), the connection is loaded showing the correct name of the instance. The Problem of the layers still occur. This means that the name of the layer is empty and when adding it to the map the very same error is shown:
'[Fehler: Error transferring
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0
&REQUEST=GetMap&BBOX=2686652.655435386114,1241070,2694050,1249254.345484995749&CRS=EPSG:2056&WIDTH=639
&HEIGHT=707&LAYERS=WMS_Test&STYLES=&FORMAT=image/png&DPI=192&MAP_RESOLUTION=192&FORMAT_OPTIONS=dpi:192
&TRANSPARENT=TRUE - server replied: Not Found; URL: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?
SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=2686652.655435386114,1241070,2694050,1249254.345484995749&
CRS=EPSG:2056&WIDTH=639&HEIGHT=707&LAYERS=WMS_Test&STYLES=&FORMAT=image/png&DPI=192&MAP_RESOLUT'

For the connection of the DB I have saved the password and user within the project.

#5 Updated by Giovanni Manghi about 5 years ago

Louis Leguan wrote:

I am now able to request the capabilities of the Service in the Browser.
URL: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

However. When trying to add the WMS to QGIS (http://localhost/cgi-bin/qgis_mapserv.fcgi.exe), the connection is loaded showing the correct name of the instance. The Problem of the layers still occur. This means that the name of the layer is empty and when adding it to the map the very same error is shown:
'[Fehler: Error transferring
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0
&REQUEST=GetMap&BBOX=2686652.655435386114,1241070,2694050,1249254.345484995749&CRS=EPSG:2056&WIDTH=639
&HEIGHT=707&LAYERS=WMS_Test&STYLES=&FORMAT=image/png&DPI=192&MAP_RESOLUTION=192&FORMAT_OPTIONS=dpi:192
&TRANSPARENT=TRUE - server replied: Not Found; URL: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?
SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=2686652.655435386114,1241070,2694050,1249254.345484995749&
CRS=EPSG:2056&WIDTH=639&HEIGHT=707&LAYERS=WMS_Test&STYLES=&FORMAT=image/png&DPI=192&MAP_RESOLUT'

aren't you missing the "map" parameter?

#6 Updated by Louis Leguan about 5 years ago

I have tried different URL's like: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?request=getcapabilities&service=WMS&version=1.1.1. The layer is still not shown and the same error occurs..
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?VERSION=1.3.0&map=C:/OSGeo4W/apps/qgis/bin/WMS_Test.qgs isn't working at all.
The map parameter is usually not included when adding a Geoservice I thought.

#7 Updated by Alessandro Pasotti about 5 years ago

  • Operating System set to Windows

#8 Updated by Giovanni Manghi about 5 years ago

The map parameter is usually not included when adding a Geoservice I thought.

not that is not completely true: unless your project file is exactly in the same folder where the qgis_mapserv.fcgi executable is then you must specify the map parameter map=/path/to/project.qgs

#9 Updated by Giovanni Manghi about 5 years ago

Giovanni Manghi wrote:

The map parameter is usually not included when adding a Geoservice I thought.

not that is not completely true: unless your project file is exactly in the same folder where the qgis_mapserv.fcgi executable is then you must specify the map parameter map=/path/to/project.qgs

anyway there is another ticket about qgis server 3.4.4 on Windows that states that the program is broken, so this ticket may just be duplicate of it.

#10 Updated by Louis Leguan about 5 years ago

I am not sure if the Bug #20873 corresponds to my problem as I am able to call the capabilities.
Also the error.log shows different entries.

Are these 'known' warnings in the log-file?

#11 Updated by Giovanni Manghi about 5 years ago

  • Subject changed from QGIS 3.4 WMS: Error tranferring to QGIS Server 3.4 on Windows: Error tranferring

Louis Leguan wrote:

I am not sure if the Bug #20873 corresponds to my problem as I am able to call the capabilities.
Also the error.log shows different entries.

Are these 'known' warnings in the log-file?

We tested QGIS Server on Windows a couple of days ago and is ok, see: https://issues.qgis.org/issues/20873#note-7

Also available in: Atom PDF