Bug report #18230

QGIS server 3.0 : service configuration error (service unknown or unsupported)

Added by Rémi Bonnefoi about 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:QGIS Server
Affected QGIS version:3.1(master) Regression?:Yes
Operating System:linux debian Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26121

Description

Hi all,

I upgraded yesterday from the 2.99 to the 3.0 version.

Since then, every request to the qgis server has a response saying :
<ServiceExceptionReport version="1.3.0">
<ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>
</ServiceExceptionReport>

while the response code is 200.

After some investigations, I think the problem comes from a bad management of PATH variables, some of them using a double "lib" in the path (for instant, according to the qgis server error log file, it is looking for the plugins in the /usr/lib/lib/qgis path, while it is in /usr/lib/qgis, and the qgispython library in /usr/lib/lib, while it is in the /usr/lib.

Here is a full copy/paste of my error log file :

[1783][15:33:22] Qgis Server Settings:
[1783][15:33:22] - QGIS_OPTIONS_PATH / '' (Override the default path for user configuration): '' (read from DEFAULT_VALUE)
[1783][15:33:22] - QGIS_SERVER_PARALLEL_RENDERING / '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering for WMS getMap request): 'false' (read from DEFAULT_VALUE)
[1783][15:33:22] - QGIS_SERVER_MAX_THREADS / '/qgis/max_threads' (Number of threads to use when parallel rendering is activated): '-1' (read from DEFAULT_VALUE)
[1783][15:33:22] - QGIS_SERVER_LOG_LEVEL / '' (Log level): '0' (read from ENVIRONMENT_VARIABLE)
[1783][15:33:22] - QGIS_SERVER_LOG_FILE / '' (Log file): '/var/log/qgis/qgisserver.log' (read from ENVIRONMENT_VARIABLE)
[1783][15:33:22] - QGIS_PROJECT_FILE / '' (QGIS project file): '/var/www/bremond/sig/bremond-server.qgs' (read from ENVIRONMENT_VARIABLE)
[1783][15:33:22] - MAX_CACHE_LAYERS / '' (Specify the maximum number of cached layers): '100' (read from DEFAULT_VALUE)
[1783][15:33:22] - QGIS_SERVER_CACHE_DIRECTORY / '/cache/directory' (Specify the cache directory): '//.local/share/QGIS/QGIS3/profiles/default/cache' (read from DEFAULT_VALUE)
[1783][15:33:22] - QGIS_SERVER_CACHE_SIZE / '/cache/size' (Specify the cache size): '52428800' (read from DEFAULT_VALUE)
[1783][15:33:22] Ini file used to initialize settings: /.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini
[1783][15:33:22] cacheDirectory: /.local/share/QGIS/QGIS3/profiles/default/cache/
[1783][15:33:22] maximumCacheSize: 52428800
[1783][15:33:22] No QGIS data provider plugins found in:
/usr/lib/lib/qgis/plugins
No vector layers can be loaded. Check your QGIS installation
[1783][15:33:22] Prefix PATH: /usr/lib
[1783][15:33:22] Plugin PATH: /usr/lib/lib/qgis/plugins
[1783][15:33:22] PkgData PATH: /usr/lib/share/qgis
[1783][15:33:22] User DB PATH: //.local/share/QGIS/QGIS3/profiles/default/qgis.db
[1783][15:33:22] Auth DB PATH: /var/www/bremond/sig/qgisserverdb/qgis-auth.db
[1783][15:33:22] SVG PATHS: /usr/lib/share/qgis/svg////.local/share/QGIS/QGIS3/profiles/default/svg/
[1783][15:33:22] No QGIS auth method plugins found in:
/usr/lib/lib/qgis/plugins
No authentication methods can be used. Check your QGIS installation
[1783][15:33:22] Server initialized
[1783][15:33:22] load library /usr/lib/lib/qgispython (3.1.0)
[1783][15:33:22] Couldn't load Python support library: Cannot load library /usr/lib/lib/qgispython: (/usr/lib/lib/libqgispython.so: cannot open shared object file: No such file or directory)
[1783][15:33:22] No server python plugins are available
[1783][15:33:22] ******************** New request ***************
[1783][15:33:22] REMOTE_ADDR: 81.220.137.231
[1783][15:33:22] HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
[1783][15:33:22] REQUEST:GetCapabilities
[1783][15:33:22] SERVICE:WMS
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Could not open CRS database /usr/lib/share/qgis/resources/srs.db
Error(14): unable to open database file
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider wms
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] Invalid data provider ogr
[1783][15:33:22] 38 bad layers dismissed:
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=HR.ORTHOIMAGERY.ORTHOPHOTOS&password=Groupe-bremond&styles=&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/geoportail/r/wms?VERSION%3D1.3.0%26&username=Apertura
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/png&layers=BDPARCELLAIRE-VECTEUR_WLD_BDD_WGS84G&password=Groupe-bremond&styles=&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/geoportail/v/wms?VERSION%3D1.3.0%26&username=Apertura
[1783][15:33:22] * ./IGN/ADE/COMMUNE.shp
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR10&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=GEOGRAPHICALGRIDSYSTEMS.1900TYPEMAPS&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * ./IGN/ADE/DEPARTEMENT.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_ETUDE_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_OA_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_PAE_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_PUP_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_RESERV_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_ZAC_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_ZAD_S_polygon.shp
[1783][15:33:22] * ./Nantes Metropole/DPLU_ZONE_S_polygon.shp
[1783][15:33:22] * ./IGN/ADE/EPCI.shp
[1783][15:33:22] * ./APUR/EPCI.shp
[1783][15:33:22] * ./IGN/ADE/EPCI.shp
[1783][15:33:22] * ./APUR/EPCI.shp
[1783][15:33:22] * ./APUR/ESPACE_BATI_PROJET.shp
[1783][15:33:22] * ./APUR/ESPACE_PUBLIC_OU_PRIVE_NON_BATI_PROJET.shp
[1783][15:33:22] * ./EPFIF/MAITRISE-5.kml
[1783][15:33:22] * ./SIGVille/NPNRU.shp
[1783][15:33:22] * crs=EPSG:3857&format&type=xyz&url=http://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0
[1783][15:33:22] * crs=EPSG:3857&format&type=xyz&url=http://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=ORTHOIMAGERY.ORTHOPHOTOS2000&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=ORTHOIMAGERY.ORTHOPHOTOS2010&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/png&layers=ORTHOIMAGERY.ORTHOPHOTOS.1950-1965&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * ./IAU/Projets_de_transport_de_la_Region_IledeFrance_inscrits_sur_la_CDGT_du_Sdrif_approuve_le_27_decembre_2013.shp
[1783][15:33:22] * ./SIGVille/QPV300m.shp
[1783][15:33:22] * ./SIGVille/QPV.shp
[1783][15:33:22] * contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/jpeg&layers=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN50.1950&password=Groupe-bremond&styles=normal&tileMatrixSet=PM&url=http://wxs.ign.fr/coccr5vavs7arn63wwht9wht/wmts?SERVICE%3DWMTS%26VERSION%3D1.0.0%26REQUEST%3DGetCapabilities&username=Apertura
[1783][15:33:22] * ./APUR/SECTEUR_OPERATIONNEL_PROJET.shp
[1783][15:33:22] * ./IGN/ADE/COMMUNE.shp
[1783][15:33:22] * ./STIF/emplacement-des-gares-idf-data-generalisee.shp
[1783][15:33:22] * ./IAU/Projets_damenagement_en_IledeFrance.shp
[1783][15:33:22] * ./STIF/projets_arrets_idf.shp
[1783][15:33:22] * ./STIF/traces-du-reseau-ferre-idf.shp
[1783][15:33:22] Can't open database: unable to open database file
[1783][15:33:22] Can't open database: unable to open database file
[1783][15:33:22] Can't open database: unable to open database file
[1783][15:33:22] Service WMS is not registered
[1783][15:33:22] Request finished in 220 ms

Associated revisions

Revision 1d7d51c8
Added by Alessandro Pasotti about 6 years ago

[bugfix][server] Fix prefix path for server

Fixes #18230 - service configuration error (service unknown or unsupported)

I though about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths after they were uncorrectly set by the application
init() code.

History

#1 Updated by Nicolas Liaudat about 6 years ago

Confirmed bad link to /usr/lib/lib/qgis/server (instead of /usr/lib/qgis/server)

/var/log/apache2/error.log
@Initializing server modules from "/usr/lib/lib/qgis/server"
"Checking /usr/lib/lib/qgis/server for native services modules"
Cannot open file ':/images/composer/missing_image.svg', because: No such file or directory@

I've test to symlink ...
cd /usr/lib
ln -s ../lib/ lib

I got following log :
/var/log/messages
Feb 28 11:01:52 ip-10-0-10-36 kernel: [ 371.964257] qgis_mapserv.fc[1316]: segfault at e0 ip 00007f2ec46e8a00 sp 00007ffec791cdd8 error 4 in libqgis_core.so.3.0.0[7f2ec4168000+ca5000]
/var/log/apache2/error.log
Initializing server modules from "/usr/lib/lib/qgis/server"
"Checking /usr/lib/lib/qgis/server for native services modules"
"Loading native module /usr/lib/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/lib/qgis/server/libwcs.so"
"Loading native module /usr/lib/lib/qgis/server/libwfs.so"
"Loading native module /usr/lib/lib/qgis/server/libwms.so"
QFSFileEngine::open: No file name specified
Loading a file that was saved with an older version of qgis (saved in 2.18.15, loaded in 3.0.0-Girona). Problems may occur.
QNetworkDiskCache::prepare() unable to open temporary file
QNetworkDiskCache::prepare() unable to open temporary file
QNetworkDiskCache::prepare() unable to open temporary file

#2 Updated by Nicolas Liaudat about 6 years ago

That problem occurs only when upgrading from 2.14.

No problem on a fresh install

#3 Updated by Rémi Bonnefoi about 6 years ago

I upgraded from 2.99 and the problem occured.

I just tried an apt remove --purge qgis-server python-qgis and then reinstall, the problem is still there.

Could anyone help to solve this problem ?

Thanks,

Remi.

#4 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

Rémi Bonnefoi wrote:

I upgraded from 2.99 and the problem occured.

I just tried an apt remove --purge qgis-server python-qgis and then reinstall, the problem is still there.

Could anyone help to solve this problem ?

Thanks,

Remi.

How your GetMap/GetCapabilities/etc look like?

#5 Updated by Rémi Bonnefoi about 6 years ago

Hi Giovanni,

It is not a matter of request syntax, but of path setup.

I inferred to try an overwriting of the Prefix PATH in the Apache conf file of the QGIS Server file and it worked.

Here is the line I added in my qgis-server.conf in /etc/apache/sites-available :
FcgidInitialEnv QGIS_PREFIX_PATH /usr

The different services (WMS, WFS) are now well loaded and are effective.

It confirms it is only a matter of misconfiguration of the qgis-server default conf (use a /usr as a prefix PATH, or use a /usr/lib and remove the redondant lib path in all the pertinent suffixes used.

Regards,

Remi.

#6 Updated by Rémi Bonnefoi about 6 years ago

  • Status changed from Feedback to Open

In my opinion, the post should be left with open status, as there is something to correct in the default configuration / installation procedure, even if I found a kind of manual patch (the adding of the FcgidInitialEnv QGIS_PREFIX_PATH /usr command in the qgis-server apache site conf file).

#7 Updated by Alessandro Pasotti about 6 years ago

  • Assignee set to Alessandro Pasotti

#8 Updated by Alessandro Pasotti about 6 years ago

Temporary workaround:

Apache:

  1. FCGI:
    FcgidInitialEnv QGIS_PREFIX_PATH "/usr"
  1. CGI:
    SetEnv QGIS_PREFIX_PATH "/usr"

#9 Updated by Alessandro Pasotti about 6 years ago

  • Pull Request or Patch supplied changed from No to Yes

#10 Updated by Alessandro Pasotti about 6 years ago

  • Status changed from Open to In Progress

#11 Updated by Anonymous about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

#12 Updated by Alessandro Pasotti about 6 years ago

  • Resolution set to fixed/implemented

#13 Updated by Umberto Minora over 5 years ago

Sorry to jump in, I know this is an old bug, but I think it might be related to what I am experiencing.
I recently installed qgis server 3.4 from the Ubuntu repository on my Ubuntu server 18.04 bionic.
After following along the configuration explained in https://docs.qgis.org/2.18/en/docs/training_manual/qgis_server/install.html, I ended up having what seemed to be a working qgis server installation.
When I downloaded the demo from https://github.com/qgis/QGIS-Training-Data/tree/QGIS-Training-Data-v2.0/training_manual_data, I tried to make a GetCapabilities request to the world.qgs project, but I received the exception "Service unknown or unsupported".
My request looks like: curl http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS%26VERSION=1.3.0%26REQUEST=GetCapabilities%26map=/home/ubuntu/qgis/projects/qgis-server-tutorial-data/world.qgs.
My /var/log/apache2/error.log (last sentence may be relevant?):

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-www-data'
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.
Initializing server modules from "/usr/lib/qgis/server"

"Checking /usr/lib/qgis/server for native services modules"
"Loading native module /usr/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/qgis/server/libwcs.so"
"Loading native module /usr/lib/qgis/server/libwfs.so"
"Loading native module /usr/lib/qgis/server/libwms.so"
"Loading native module /usr/lib/qgis/server/libwmts.so"
Loading a file that was saved with an older version of qgis (saved in 0.0.0, loaded in 3.4.0-Madeira). Problems may occur.

And this is the /var/log/qgis/qgisserver.log (last sentence seems relevant here as well:

22:19:45 INFO Server4118: Qgis Server Settings:
22:19:45 INFO Server4118: - QGIS_OPTIONS_PATH / '' (Override the default path for user configuration): '' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_SERVER_PARALLEL_RENDERING / '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering for WMS getMap request): 'false' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_SERVER_MAX_THREADS / '/qgis/max_threads' (Number of threads to use when parallel rendering is activated): '-1' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_SERVER_LOG_LEVEL / '' (Log level): '0' (read from ENVIRONMENT_VARIABLE)
22:19:45 INFO Server4118: - QGIS_SERVER_LOG_FILE / '' (Log file): '/var/log/qgis/qgisserver.log' (read from ENVIRONMENT_VARIABLE)
22:19:45 INFO Server4118: - QGIS_SERVER_LOG_STDERR / '' (Activate/Deactivate logging to stderr): 'false' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_PROJECT_FILE / '' (QGIS project file): '' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - MAX_CACHE_LAYERS / '' (Specify the maximum number of cached layers): '100' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_SERVER_CACHE_DIRECTORY / '/cache/directory' (Specify the cache directory): '//.local/share/QGIS/QGIS3/profiles/default/cache' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: - QGIS_SERVER_CACHE_SIZE / '/cache/size' (Specify the cache size): '52428800' (read from DEFAULT_VALUE)
22:19:45 INFO Server4118: Ini file used to initialize settings: /.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini
22:19:45 INFO Server4118: cacheDirectory: /.local/share/QGIS/QGIS3/profiles/default/cache/
22:19:45 INFO Server4118: maximumCacheSize: 52428800
22:19:45 INFO Server4118: Prefix PATH: /usr
22:19:45 INFO Server4118: Plugin PATH: /usr/lib/qgis/plugins
22:19:45 INFO Server4118: PkgData PATH: /usr/share/qgis
22:19:45 INFO Server4118: User DB PATH: //.local/share/QGIS/QGIS3/profiles/default/qgis.db
22:19:45 INFO Server4118: Auth DB PATH: /home/ubuntu/qgis/qgisserverdb/qgis-auth.db
22:19:45 INFO Server4118: SVG PATHS: /usr/share/qgis/svg////.local/share/QGIS/22:19:45 WARNING [4118]: Adding service WCS 1.0.0
22:19:45 WARNING [4118]: Adding service WMTS 1.0.0
22:19:45 INFO Server4118: Server initialized
22:19:45 INFO ../../src/server/qgsserverplugins.cpp4118: load library /usr/lib/qgispython (3.4.0)
22:19:45 INFO ../../src/server/qgsserverplugins.cpp4118: Python support library loaded successfully.
22:19:45 INFO Server4118: No server python plugins are available
22:19:45 INFO Server4118: ************ New request *******
22:19:45 INFO Server4118: REMOTE_ADDR: 35.180.100.12
22:19:45 INFO Server4118: HTTP_USER_AGENT: curl/7.58.0
22:19:45 INFO Server4118: Using default configuration file path: /usr/lib/cgi-22:19:45 INFO Server4118: Request finished in 10 ms
20:57:59 INFO Server18275: Qgis Server Settings:
20:57:59 INFO Server18275: - QGIS_OPTIONS_PATH / '' (Override the default path for user configuration): '' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_SERVER_PARALLEL_RENDERING / '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering for WMS getMap request): 'false' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_SERVER_MAX_THREADS / '/qgis/max_threads' (Number of threads to use when parallel rendering is activated): '-1' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_SERVER_LOG_LEVEL / '' (Log level): '0' (read from ENVIRONMENT_VARIABLE)
20:57:59 INFO Server18275: - QGIS_SERVER_LOG_FILE / '' (Log file): '/var/log/qgis/qgisserver.log' (read from ENVIRONMENT_VARIABLE)
20:57:59 INFO Server18275: - QGIS_SERVER_LOG_STDERR / '' (Activate/Deactivate logging to stderr): 'false' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_PROJECT_FILE / '' (QGIS project file): '' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - MAX_CACHE_LAYERS / '' (Specify the maximum number of cached layers): '100' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_SERVER_CACHE_DIRECTORY / '/cache/directory' (Specify the cache directory): '//.local/share/QGIS/QGIS3/profiles/default/cache' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: - QGIS_SERVER_CACHE_SIZE / '/cache/size' (Specify the cache size): '52428800' (read from DEFAULT_VALUE)
20:57:59 INFO Server18275: Ini file used to initialize settings: /.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini
20:57:59 INFO Server18275: cacheDirectory: /.local/share/QGIS/QGIS3/profiles/default/cache/
20:57:59 INFO Server18275: maximumCacheSize: 52428800
QGIS3/profiles/default/svg/
14:38:47 WARNING [5868]: Adding service SampleService 1.0
14:38:47 WARNING [5868]: Adding service WCS 1.0.0
14:38:47 WARNING [5868]: Adding service WFS 1.1.0
14:38:47 WARNING [5868]: Adding service WMS 1.3.0
14:38:47 WARNING [5868]: Adding service WMTS 1.0.0
14:38:47 INFO Server5868: Server initialized
14:38:47 INFO ../../src/server/qgsserverplugins.cpp5868: load library /usr/lib/qgispython (3.4.0)
14:38:47 INFO ../../src/server/qgsserverplugins.cpp5868: Python support library loaded successfully.
14:38:47 INFO Server5868: No server python plugins are available
14:38:47 INFO Server5868: ************ New request *******
14:38:47 INFO Server5868: REMOTE_ADDR: 127.0.0.1
14:38:47 INFO Server5868: HTTP_USER_AGENT: curl/7.58.0
14:38:47 INFO Server5868: SERVICE:WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=/home/ubuntu/qgis/projects/qgis-server-tutorial-data/world.qgs
14:38:47 INFO Server5868: Using default configuration file path: /usr/lib/cgi-bin/admin.sld
14:38:47 WARNING [5868]: Service WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=/home/ubuntu/qgis/projects/qgis-server-tutorial-data/world.qgs is not registered
14:38:47 INFO Server5868: Request finished in 11 ms

#14 Updated by Umberto Minora over 5 years ago

Sorry, everything was ok with my config and QGIS SERVER.
Thanks to gis.stackoverflow comment to my question
<https://gis.stackexchange.com/questions/301305/qgis-server-3-service-service-unknown-or-unsupported?noredirect=1#comment485177_301305>
, I found out the problem was in the way I created my URL request and CURL.
Instead of doing curl
http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS%26VERSION=1.3.0%26REQUEST=GetCapabilities%26map=/home/ubuntu/qgis/projects/test_qgis/milano_test.qgs
I had to do curl
"http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=/home/ubuntu/qgis/projects/test_qgis/milano_test.qgs"
no 26 instead of x%x, and the entire URL within double quotes.

Also available in: Atom PDF