On Mon, Apr 20, 2020 at 9:07 AM Uros Preloznik <[email protected]> wrote: > > Hi, > > I found couple of minor issues in QGIS Server 3.10 and wanted to make some > test requests before posting issue, so it will be possible to replicate issue. > > So I build QGIS master and tried Development server, which I think is really > cool to try and test things. > > For building I used this parameters > cmake -DWITH_SERVER=true -DWITH_GEOREFERENCER=false -DWITH_GRASS7=false .. > > and then sudo make install
this is normally not required, you can install your build in your user space with no sudo. > > I can start development server. Output from start: > > uros@Mint19:~/dev/cpp/QGIS/build_master$ ./output/bin/qgis_mapserver I'm probably missing something but you are NOT launching the binary you have installed (globally as root) a few lines above. > qt5ct: using qt5ct plugin > QGIS Development Server listening on http://localhost:8000 > CTRL+C to exit > 08:58:28 INFO Server[26649]: Qgis Server Settings: > 08:58:28 INFO Server[26649]: - QGIS_OPTIONS_PATH / '' (Override the default > path for user configuration): '' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_PARALLEL_RENDERING / > '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering for WMS > getMap request): 'false' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_MAX_THREADS / > '/qgis/max_threads' (Number of threads to use when parallel rendering is > activated): '-1' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_LOG_LEVEL / '' (Log level): '0' > (read from ENVIRONMENT_VARIABLE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_LOG_FILE / '' (Log file): '' > (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_LOG_STDERR / '' > (Activate/Deactivate logging to stderr): '1' (read from ENVIRONMENT_VARIABLE) > 08:58:28 INFO Server[26649]: - QGIS_PROJECT_FILE / '' (QGIS project file): > '' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - MAX_CACHE_LAYERS / '' (Specify the maximum > number of cached layers): '100' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_CACHE_DIRECTORY / > '/cache/directory' (Specify the cache directory): > '/home/uros/.local/share/QGIS/QGIS3/profiles/default/cache' (read from > DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_CACHE_SIZE / '/cache/size' > (Specify the cache size): '52428800' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_SHOW_GROUP_SEPARATOR / > '/locale/showGroupSeparator' (Show group (thousands) separator): 'false' > (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE / > '/locale/userLocale' (Override system locale): 'en_US' (read from INI_FILE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_WMS_MAX_HEIGHT / > '/qgis/max_wms_height' (Maximum height for a WMS request. The lower one of > this and the project configuration is used.): '-1' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_WMS_MAX_WIDTH / > '/qgis/max_wms_width' (Maximum width for a WMS request. The most conservative > between this and the project one is used): '-1' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_API_RESOURCES_DIRECTORY / > '/qgis/server_api_resources_directory' (Base directory where HTML templates > and static assets (e.g. images, js and css files) are searched for): > '/home/uros/dev/cpp/QGIS/build-master/output/share/qgis/resources/server/api' > (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: - QGIS_SERVER_API_WFS3_MAX_LIMIT / > '/qgis/server_api_wfs3_max_limit' (Maximum value for "limit" in a features > request, defaults to 10000): '10000' (read from DEFAULT_VALUE) > 08:58:28 INFO Server[26649]: Ini file used to initialize settings: > /home/uros/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini > 08:58:28 INFO Server[26649]: cacheDirectory: > /home/uros/.local/share/QGIS/QGIS3/profiles/default/cache/ > 08:58:28 INFO Server[26649]: maximumCacheSize: 52428800 > 08:58:28 INFO Server[26649]: Prefix PATH: > /home/uros/dev/cpp/QGIS/build-master/output > 08:58:28 INFO Server[26649]: Plugin PATH: > /home/uros/dev/cpp/QGIS/build-master/output/lib/qgis/plugins > 08:58:28 INFO Server[26649]: PkgData PATH: > /home/uros/dev/cpp/QGIS/build-master/output/share/qgis > 08:58:28 INFO Server[26649]: User DB PATH: > /home/uros/.local/share/QGIS/QGIS3/profiles/default/qgis.db > 08:58:28 INFO Server[26649]: Auth DB PATH: > /home/uros/.local/share/QGIS/QGIS3/profiles/default/qgis-auth.db > 08:58:28 INFO Server[26649]: SVG PATHS: > /home/uros/dev/cpp/QGIS/build-master/output/share/qgis/svg/:/home/uros/.local/share/QGIS/QGIS3/profiles/default/svg/ > 08:58:28 WARNING No Authentication Methods[26649]: No QGIS auth method > plugins found in: > /home/uros/dev/cpp/QGIS/build-master/output/lib/qgis/plugins > No authentication methods can be used. Check your QGIS installation > 08:58:28 INFO Server[26649]: Server initialized > 08:58:28 INFO /home/uros/dev/cpp/QGIS/src/server/qgsserverplugins.cpp[26649]: > load library /home/uros/dev/cpp/QGIS/build-master/output/lib/qgispython > (3.13.0) > 08:58:28 WARNING [26649]: Couldn't load Python support library: Cannot load > library /home/uros/dev/cpp/QGIS/build-master/output/lib/qgispython: > (/home/uros/dev/cpp/QGIS/build-master/output/lib/libqgispython.so: cannot > open shared object file: No such file or directory) > 08:58:28 INFO Server[26649]: No server python plugins are available > > Problem is when I send some requests, like: > http://localhost:8000/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=/home/uros/dev/cpp/QGIS/tests/testdata/qgis_server_project/project.qgs > > Project is opened, but I get Service WMS is not registered. I know this is > case sensitive, but it's actually whatever I give in SERVICE parameter is not > registered. > > 08:59:34 INFO Server[26649]: > MAP:/home/uros/dev/cpp/QGIS/tests/testdata/qgis_server_project/project.qgs > 08:59:34 INFO Server[26649]: REQUEST:GetCapabilities > 08:59:34 INFO Server[26649]: SERVICE:WMS > 08:59:34 INFO Server[26649]: VERSION:1.3.0 > Logged warning: Loading a file that was saved with an older version of qgis > (saved in 3.2.0-Bonn, loaded in 3.13.0-Master). Problems may occur. > 08:59:35 WARNING [26649]: Service WMS is not registered > 08:59:35 WARNING Server[26649]: <ServiceExceptionReport > xmlns="http://www.opengis.net/ogc" version="1.3.0"> > <ServiceException code="Service configuration error">Service unknown or > unsupported</ServiceException> > </ServiceExceptionReport> > > Any ideas what's wrong, something with my build? There is definitely something wrong with your build (probably the paths), custom builds use custom paths and QGIS server needs to know from where to load its services (WMS, WFS etc.) and APIs (OAPIF/WFS3). The default path is /usr on Linux, but in your case I see that the prefix path is correctly set to /home/uros/dev/cpp/QGIS/build-master/output where you should find lib/qgis/server/libwms.so & C. But your configuration is totally broken: no auth plugins, no Python and no modules (you should see them listed in the server logs but they are not there), my output is for example: "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libdummy.so" ../src/server/services/DummyService/dummy.cpp:51 : (registerSelf) [1ms] SampleModule::registerSelf called ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Adding service SampleService 1.0 09:42:12 INFO Server[30406]: Adding service SampleService 1.0 "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libwcs.so" ../src/server/services/wcs/qgswcs.cpp:118 : (registerSelf) [1ms] WCSModule::registerSelf called ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Adding service WCS 1.0.0 09:42:12 INFO Server[30406]: Adding service WCS 1.0.0 "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libwfs.so" ../src/server/services/wfs/qgswfs.cpp:142 : (registerSelf) [2ms] WFSModule::registerSelf called ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Adding service WFS 1.1.0 09:42:12 INFO Server[30406]: Adding service WFS 1.1.0 "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libwfs3.so" ../src/core/qgsmessagelog.cpp:29 : (logMessage) [1ms] 2020-04-20T09:42:12 [1] Adding API OGC WFS3 (Draft) 09:42:12 WARNING [30406]: Adding API OGC WFS3 (Draft) "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libwms.so" ../src/server/services/wms/qgswms.cpp:178 : (registerSelf) [1ms] WMSModule::registerSelf called ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Adding service WMS 1.3.0 09:42:12 INFO Server[30406]: Adding service WMS 1.3.0 "Loading native module /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgis/server/libwmts.so" ../src/server/services/wmts/qgswmts.cpp:116 : (registerSelf) [1ms] WMTSModule::registerSelf called ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Adding service WMTS 1.0.0 09:42:12 INFO Server[30406]: Adding service WMTS 1.0.0 ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 Server[0] Server initialized 09:42:12 INFO Server[30406]: Server initialized ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2020-04-20T09:42:12 ../src/server/qgsserverplugins.cpp[0] load library /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgispython (3.13.0) 09:42:12 INFO ../src/server/qgsserverplugins.cpp[30406]: load library /home/xxxxx/dev/QGIS/build-local-qt5132-release_gdal3/output/lib/qgispython (3.13.0) ../src/core/qgsmessagelog.cpp:29 : (logMessage) [1ms] 2020-04-20T09:42:12 ../src/server/qgsserverplugins.cpp[0] Python support library loaded successfully. 09:42:12 INFO ../src/server/qgsserverplugins.cpp[30406]: Python support library loaded successfully. ../src/server/qgsserverplugins.cpp:74 : (initPlugins) [0ms] Python support library's instance() symbol resolved. ../src/server/qgsserverplugins.cpp:80 : (initPlugins) [308ms] Python support ENABLED :-) ../src/core/qgsmessagelog.cpp:29 : (logMessage) [8ms] 2020-04-20T09:42:13 Server[0] No server python plugins are available 09:42:13 INFO Server[30406]: No server python plugins are available You should check your paths. What I do is: - set CMAKE_PREFIX_PATH in cmake to the build directory - never make install, just make - prepare the environment by setting QGIS_PREFIX_PATH to the "output" directory under your build directory (so: ${CMAKE_PREFIX_PATH}/output) - run qgis binaries located in the ${QGIS_PREFIX_PATH}/bin directory from the script that sets the correct environment Hope this helps. -- Alessandro Pasotti w3: www.itopen.it _______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
