Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 3.6.0 the projects previously served in 3.5.8 are not visible #3367

Closed
1 task
Antoviscomi opened this issue Dec 12, 2022 · 58 comments
Closed
1 task

In 3.6.0 the projects previously served in 3.5.8 are not visible #3367

Antoviscomi opened this issue Dec 12, 2022 · 58 comments

Comments

@Antoviscomi
Copy link
Contributor

Antoviscomi commented Dec 12, 2022

What is the bug?

In 3.6.0 none of the projects previously served in 3.5.8 are displayed
in the log message lizmap come with the error --> Spatialite is not available, But I never get Spatialite on my server or Spatialite php module before now in previous config, and my installation is PostgreSQL based,
and the Administrator Dashboard iit works fine, so the connection to existing database it works

Steps to reproduce the issue

  1. update to 3.6.0
  2. set permissions tho 'user' www-data
  3. try to open a project previously served with the 3.5.8 version are not loaded in LWC 3.6.0
  4. on QGIS side all the configurations previously setted by Lizmap plugin appear to be deleted/unsetted
  5. when downgrade to 3.5.8 version all works fine
    see the screenshot for error message

Schermata del 2022-12-12 11-10-59

Versions

Versione di QGIS 3.28.1-Firenze Revisione codice QGIS fde3b8fbb8
Versione Qt 5.15.3
Versione Python 3.10.6
Versione GDAL/OGR 3.4.1
Versione PROJ 8.2.1
Versione database del Registro EPSG v10.041 (2021-12-03)
Versione GEOS 3.10.2-CAPI-1.16.0
Versione SQLite 3.37.2
Versione PDAL 2.3.0
Versione client PostgreSQL unknown
Versione SpatiaLite 5.0.1
Versione QWT 6.1.4
Versione QScintilla2 2.11.6
Versione SO Ubuntu 22.04.1 LTS
       
Plugins Python attivi
postgisQueryBuilder 2.0.1
lizmap 3.9.8
DataPlotly 3.9.2
Cluster-Analysis-plugin-main 1.0.1
go2streetview 8.6
clusterpoints 5.1
dissect_dissolve_overlaps 0.3
pg_raster_import 3.1.0
corrector_vector 0.3.1
lizmap_server 1.2.1
HouseNumbering3 version 0.0.5
MultiJoin 1.0
quick_map_services 0.19.32
Qgis2threejs 2.7.1
postgis_geoprocessing 0.9
splitmultipart 1.0.0
qquake 1.4
DeepLearningTools 0.2.0
QuickOSM 2.1.1
shapetools 3.4.9
qProf 0.5.0
GeometryShapes 0.7
PostGISQueries 0.2
svir 3.15.1
QuickWKT 3.1
valuetool 3.0.15
plugin_reloader 0.9.2
otbprovider 2.12.99
grassprovider 2.12.99
MetaSearch 0.3.6
sagaprovider 2.12.99
processing 2.12.99
db_manager 0.1.20
Versione di QGIS 3.28.1-Firenze Revisione codice QGIS [fde3b8fbb8](https://github.com/qgis/QGIS/commit/fde3b8fbb8) Versione Qt 5.15.3 Versione Python 3.10.6 Versione GDAL/OGR 3.4.1 Versione PROJ 8.2.1 Versione database del Registro EPSG v10.041 (2021-12-03) Versione GEOS 3.10.2-CAPI-1.16.0 Versione SQLite 3.37.2 Versione PDAL 2.3.0 Versione client PostgreSQL unknown Versione SpatiaLite 5.0.1 Versione QWT 6.1.4 Versione QScintilla2 2.11.6 Versione SO Ubuntu 22.04.1 LTS

Plugins Python attivi
postgisQueryBuilder
2.0.1
lizmap
3.9.8
DataPlotly
3.9.2
Cluster-Analysis-plugin-main
1.0.1
go2streetview
8.6
clusterpoints
5.1
dissect_dissolve_overlaps
0.3
pg_raster_import
3.1.0
corrector_vector
0.3.1
lizmap_server
1.2.1
HouseNumbering3
version 0.0.5
MultiJoin
1.0
quick_map_services
0.19.32
Qgis2threejs
2.7.1
postgis_geoprocessing
0.9
splitmultipart
1.0.0
qquake
1.4
DeepLearningTools
0.2.0
QuickOSM
2.1.1
shapetools
3.4.9
qProf
0.5.0
GeometryShapes
0.7
PostGISQueries
0.2
svir
3.15.1
QuickWKT
3.1
valuetool
3.0.15
plugin_reloader
0.9.2
otbprovider
2.12.99
grassprovider
2.12.99
MetaSearch
0.3.6
sagaprovider
2.12.99
processing
2.12.99
db_manager
0.1.20

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

QGIS server version, only if the section above doesn't mention the QGIS Server version

3.28.1

Operating system

Ubuntu 22.04

Browsers

Chrome

Browsers version

Chrome 108.0.5359.94

Relevant log output

2022-12-12 10:06:05	127.0.0.1	error	Spatialite is not available
2022-12-12 10:25:29	127.0.0.1	notice	2022-12-12 10:25:29	[8]	jAuth::isConnected(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "cDaoRecord_lizmap_Jx_user_Jx_pgsql" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition	/var/www/lizmap/lizmap/vendor/jelix/jelix/lib/jelix/auth/jAuth.class.php	584

2022-12-12 10:25:29	127.0.0.1	notice	2022-12-12 10:25:29	[8]	jAuth::isConnected(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "cDaoRecord_lizmap_Jx_user_Jx_pgsql" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition	/var/www/lizmap/lizmap/vendor/jelix/jelix/lib/jelix/auth/jAuth.class.php	584

2022-12-12 10:26:04	127.0.0.1	error	Spatialite is not available
2022-12-12 10:26:19	160.97.xx.xxx	notice	2022-12-12 10:26:19	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 10:26:19	160.97.xx.xxx	notice	2022-12-12 10:26:19	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 10:26:19	160.97.xx.xxx	error	Spatialite is not available
2022-12-12 10:26:19	160.97.xx.xxx	error	Spatialite is not available
2022-12-12 10:26:19	160.97.xx.xxx	error	Spatialite is not available
2022-12-12 10:26:19	160.97.xx.xxx	error	Spatialite is not available
2022-12-12 10:26:19	160.97.xx.xxx	error	Spatialite is not available
@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

Please follow the ticket template which was provided, by right-clicking on your server https://docs.lizmap.com/current/en/publish/lizmap_plugin/information.html#request-for-support

Can you go :

  • in the page "server information", from the administration panel. It's the same result from your right-click on your server. Maybe you have some warning ? It's the message written in your screenshot.
  • in the new page "QGIS Project" from the administration panel, and check your missing project. They will be displayed here with some warning/error.

@Gustry Gustry pinned this issue Dec 12, 2022
@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

@Gustry here is the copied from the panel you suggest

Versions :

  • Lizmap Web Client : 3.6.0
  • Lizmap plugin : 3.9.8
  • QGIS Desktop : 3.28.1
  • QGIS Server and plugins unknown status because the login provided is not an administrator

@rldhont
Copy link
Collaborator

rldhont commented Dec 12, 2022

Is it lizmap plugin or lizmap server plugin ?

If it's not lizmap server plugin, I invite you to remove lizmap plugin and install lizmap server plugin.

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

lizmap plugin

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

and this is the QGIS project Panel from WLC
It seems no warnings appear in
Schermata del 2022-12-12 15-13-09

@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

QGIS Server and plugins unknown status because the login provided is not an administrator

Please, add your administrator login as described.
You are missing the 'Server information' page. (Informazioni del server). Can you share the screenshot ?

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

I have a single account registered on Lizmap as administrator and this is username "admin" Password "mypassword" so I don't know what's appened because the login works in LWC as in Lizmap Plugin

@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

  • Can you raise a ticket on the Lizmap plugin if you have an issue about the login/password.
  • Can you go in "Server information" webpage and share the screenshot ?

@Antoviscomi
Copy link
Contributor Author

Schermata del 2022-12-12 15-27-07

@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

Starting from Lizmap Web Client 3.6.0, you must have have this webpage working correctly before opening a project.

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

here is the new log

2022-12-12 15:23:21	127.0.0.1	notice	2022-12-12 15:23:21	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:23:21	127.0.0.1	notice	2022-12-12 15:23:21	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:06	127.0.0.1	notice	2022-12-12 15:26:06	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:06	127.0.0.1	notice	2022-12-12 15:26:06	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:06	127.0.0.1	error	Spatialite is not available
2022-12-12 15:26:08	127.0.0.1	notice	2022-12-12 15:26:08	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:08	127.0.0.1	notice	2022-12-12 15:26:08	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:09	127.0.0.1	notice	2022-12-12 15:26:09	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:09	127.0.0.1	notice	2022-12-12 15:26:09	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:10	127.0.0.1	notice	2022-12-12 15:26:10	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:10	127.0.0.1	notice	2022-12-12 15:26:10	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:11	127.0.0.1	notice	2022-12-12 15:26:11	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:13	127.0.0.1	notice	2022-12-12 15:26:13	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:13	127.0.0.1	notice	2022-12-12 15:26:13	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:49	127.0.0.1	notice	2022-12-12 15:26:49	[8]	Undefined index: metadata	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:49	127.0.0.1	notice	2022-12-12 15:26:49	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	62

2022-12-12 15:26:49	127.0.0.1	error	QGIS Server needs to be updated at least to version 3.10 for this version of Lizmap Web Client.
2022-12-12 15:26:49	127.0.0.1	notice	2022-12-12 15:26:49	[8]	Undefined index: plugins	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	53

2022-12-12 15:26:49	127.0.0.1	notice	2022-12-12 15:26:49	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	53

2022-12-12 15:26:49	127.0.0.1	notice	2022-12-12 15:26:49	[8]	Trying to access array offset on value of type null	/var/www/lizmap/lizmap/modules/lizmap/lib/Server/Server.php	53

2022-12-12 15:26:49	127.0.0.1	error	The lizmap_server plugin needs to be updated.

@Antoviscomi
Copy link
Contributor Author

so why the server information page doesn't works?

@Antoviscomi
Copy link
Contributor Author

this is my qgis-server version
qgis-server è già alla versione più recente (1:3.28.1+36jammy)

@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

Do you read the error message on your latest screenshot ?

It's an error warning you that you must have :

  • QGIS Server 3.10 minimum, which seems to be OK if you have QGIS server 3.28
  • You have installed "Lizmap server" plugin. A link to the documentation is provided your screenshot

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 12, 2022

right but,
my QGIS server version It's 3.28.1 and yes, I've installed and updated 'Lizmap server' plugin, so I don't know

@Antoviscomi
Copy link
Contributor Author

image

@Antoviscomi
Copy link
Contributor Author

There is a way to check or force the login like administrator?

@laurentj
Copy link
Collaborator

The plugin "Lizmap server" must not be installed into QGIS Desktop, but into QGIS Server.

@Antoviscomi
Copy link
Contributor Author

@laurentj right but how to? Sorry but I see this plugin only under QGIS desktop, and not a way to install it under Qgis server

@Gustry
Copy link
Member

Gustry commented Dec 12, 2022

Please read the documentation of QGIS Server :
https://docs.qgis.org/3.28/en/docs/server_manual/index.html

There is a dedicated chapter about plugins on QGIS Server.

And also on our documentation https://docs.lizmap.com/current/en/install/pre_requirements.html#qgis-server-plugins

@Antoviscomi
Copy link
Contributor Author

Hi @Gustry I've installed Lizmap server on server side by qgis-plugin-manager, restarted QGIS an reload apache2 but the response it's the same it seems my profile don't be recognized as administrator

Versions :

  • Lizmap Web Client : 3.5.8
  • Lizmap plugin : 3.9.8
  • QGIS Desktop : 3.28.1
  • QGIS Server and plugins unknown status because of the settings in QGIS Server, please review your server settings in the Lizmap Web Client administration interface, then in the "Server Information" panel.

here a screenshot of 3.5.8 version I downgraded to (because it's the only way to work for me)
Schermata del 2022-12-13 09-59-48

@Antoviscomi
Copy link
Contributor Author

Schermata del 2022-12-13 10-12-00

@rldhont
Copy link
Collaborator

rldhont commented Dec 13, 2022

@Antoviscomi you have to remove the lizmap directory. You have a conflict between the two.

@Antoviscomi
Copy link
Contributor Author

@rldhont same result
Schermata del 2022-12-13 10-19-48

@Gustry
Copy link
Member

Gustry commented Dec 13, 2022

Hi @Antoviscomi, I'm following this thread and I'm currently reviewing the documentation accordingly.

You should look your QGIS server log, especially when loading this web page. There should be some clues about the request which has been made to QGIS Server in the background. A request to lizmap/server.json.
Logs will tell you if the plugin is has been loaded etc. As you have a 500 error, I suspect QGIS server didn't load the plugin.
Is /var/www/qgis-server/plugins the correct folder for your QGIS Server configuration ?
You should also check log when QGIS is starting.

Did you add the environment variable about the Lizmap server plugin ?

Side note, you can remove "Lizmap" from your server list. It's not designed for server. Only install plugins designed for server on your server.

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 13, 2022

Hi @Gustry I've installed Lizmap server on server side by qgis-plugin-manager, restarted QGIS an reload apache2 but the response it's the same it seems my profile don't be recognized as administrator

Versions :

  • Lizmap Web Client : 3.5.8
  • Lizmap plugin : 3.9.8
  • QGIS Desktop : 3.28.1
  • QGIS Server and plugins unknown status because of the settings in QGIS Server, please review your server settings in the Lizmap Web Client administration interface, then in the "Server Information" panel.

here a screenshot of 3.5.8 version I downgraded to (because it's the only way to work for me) Schermata del 2022-12-13 09-59-48

Hi @Antoviscomi, I'm following this thread and I'm currently reviewing the documentation accordingly.

You should look your QGIS server log, especially when loading this web page. There should be some clues about the request which has been made to QGIS Server in the background. A request to lizmap/server.json. Logs will tell you if the plugin is has been loaded etc. As you have a 500 error, I suspect QGIS server didn't load the plugin. Is /var/www/qgis-server/plugins the correct folder for your QGIS Server configuration ? You should also check log when QGIS is starting.

Did you add the environment variable about the Lizmap server plugin ?

Side note, you can remove "Lizmap" from your server list. It's not designed for server. Only install plugins designed for server on your server.

Yes @Gustry take a look at this path, it seems the correct one
Schermata del 2022-12-13 10-19-48

but I dont know why my QGIS server log it's freezed at 2 October 2022

@Gustry
Copy link
Member

Gustry commented Dec 13, 2022

look at this path, it seems the correct one

No, the sentence "List all plugins in /var/www/qgis-server/plugins" is only showing plugins installed in the current working directory by default, except you have defined the environment variable QGIS_PLUGINPATH for qgis-plugin-manager. It doesn't check if your QGIS Server settings is pointing to this same folder.

@Gustry
Copy link
Member

Gustry commented Dec 15, 2022

Sorry, I'm answering quickly before a meeting. As long as you can see the plugin with qgis-plugin-manager list command, it's OK for Lizmap server.
Please check your rights on the folder and QGIS logs.

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 15, 2022

My rigths are -0775 it seems all good by installation configuration side,
I don't kow what's happen because of my QGIS error log it's clean from server.json calls today as yesterday

@Gustry
Copy link
Member

Gustry commented Dec 16, 2022

I don't kow what's happen because of my QGIS error log it's clean from server.json calls today as yesterday

So you mean it's working ?

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 16, 2022

@Gustry no, doesn't works, I have another machine on Windows 10 with the same configuration and 3.5.7 LWC but, both server information page on LWC and Login in Lizmap Plugin give me the same results (doesn't reading my account as administrator), but the projects working well in 3.5.7 as in 3.5.8. If I try to update LWC to 3.6.0 the maps are not visible

@Gustry
Copy link
Member

Gustry commented Dec 16, 2022

the projects working well in 3.5.7 as in 3.5.8. If I try to update LWC to 3.6.0 the maps are not visible

Yes ok, we are aware. It's a restriction from LWC 3.6.0.

Login in Lizmap Plugin give me the same results (doesn't reading my account as administrator)

This is a separate issue.

both server information page on LWC

You should have this page working. You must check QGIS Server logs and see if plugins are starting or not.
See https://docs.qgis.org/3.22/en/docs/server_manual/config.html#settings-summary there is a "Settings summary" showing you all settings read by QGIS Server when it's starting. Increase your debug level in QGIS.

@Antoviscomi
Copy link
Contributor Author

the projects working well in 3.5.7 as in 3.5.8. If I try to update LWC to 3.6.0 the maps are not visible

Yes ok, we are aware. It's a restriction from LWC 3.6.0.

Login in Lizmap Plugin give me the same results (doesn't reading my account as administrator)

This is a separate issue.

both server information page on LWC

You should have this page working. You must check QGIS Server logs and see if plugins are starting or not. See https://docs.qgis.org/3.22/en/docs/server_manual/config.html#settings-summary there is a "Settings summary" showing you all settings read by QGIS Server when it's starting. Increase your debug level in QGIS.

it come with this error

QFSFileEngine::open: No file name specified
ERROR: Auth db directory path could not be created
"Loading native module /usr/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/qgis/server/liblandingpage.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/libwfs3.so"
"Loading native module /usr/lib/qgis/server/libwms.so"
"Loading native module /usr/lib/qgis/server/libwmts.so"

@Antoviscomi
Copy link
Contributor Author

@Gustry , this is the error in error log,
16:22:44 CRITICAL Lizmap[165397]: Please read the documentation how to enable the Lizmap API on QGIS server side https://docs.lizmap.com/current/en/install/pre_requirements.html#lizmap-server-plugin An environment variable must be enabled to have Lizmap Web Client ≥ 3.5.

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 16, 2022

and these are the configurations

"Accept" :  "*/*"
"Host" :  "127.0.0.1"
"User-Agent" :  "Lizmap"
15:43:41 INFO Server[161792]: Using configuration file path from environment: /home/qgis/world.qgs
15:43:41 INFO Lizmap[161792]: Request headers provided
15:43:41 INFO Lizmap[161792]: No lizmap user groups in request headers
15:43:41 INFO Server[161792]: REQUEST:GetCapabilities
15:43:41 INFO Server[161792]: SERVICE:WMS
15:43:41 INFO Server[161792]: Using configuration file path from environment: /home/qgis/world.qgs
15:43:41 INFO Lizmap[161792]: Request headers provided
15:43:41 INFO Lizmap[161792]: No lizmap user groups in request headers
15:43:41 INFO Lizmap[161792]: Request headers provided
15:43:41 INFO Lizmap[161792]: No lizmap user groups in request headers
15:43:41 WARNING Server[161792]: Found WMS capabilities document in cache
15:43:41 INFO Server[161792]: Request finished in 1 ms
15:43:41 INFO Server[161792]: ******************** New request ***************
15:43:41 INFO Server[161792]: Request URL: http://127.0.0.1/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json
15:43:41 INFO Server[161792]: Environment:
15:43:41 INFO Server[161792]: ------------------------------------------------
15:43:41 INFO Server[161792]: SERVER_NAME: 127.0.0.1
15:43:41 INFO Server[161792]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi/lizmap/server.json
15:43:41 INFO Server[161792]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi
15:43:41 INFO Server[161792]: PATH_INFO: /lizmap/server.json
15:43:41 INFO Server[161792]: REMOTE_ADDR: 127.0.0.1
15:43:41 INFO Server[161792]: SERVER_PORT: 80
15:43:41 INFO Server[161792]: QUERY_STRING: 
15:43:41 INFO Server[161792]: REQUEST_METHOD: GET
15:43:41 INFO Server[161792]: QGIS_PROJECT_FILE: /home/qgis/world.qgs
15:43:41 INFO Server[161792]: SERVER_PROTOCOL: HTTP/1.1

------------------------------------------------
"Accept" :  "*/*"
"Host" :  "127.0.0.1"
"User-Agent" :  "Lizmap"
15:43:41 INFO Server[161792]: Using configuration file path from environment: /home/qgis/world.qgs
15:43:41 INFO Lizmap[161792]: Request headers provided
15:43:41 INFO Lizmap[161792]: No lizmap user groups in request headers
15:43:41 INFO Server[161792]: Using configuration file path from environment: /home/qgis/world.qgs
15:43:41 INFO Server[161792]: Trying URL path: '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' for '/'
15:43:41 INFO Server[161792]: Trying URL path: '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' for '/lizmap'
15:43:41 INFO Server[161792]: API Lizmap accepts the URL path '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' 
15:43:41 INFO Server[161792]: Checking API path /server.json for server.json 
15:43:41 INFO Server[161792]: API Lizmap: found handler server
15:43:41 CRITICAL Lizmap[161792]: Please read the documentation how to enable the Lizmap API on QGIS server side https://docs.lizmap.com/current/en/install/pre_requirements.html#lizmap-server-plugin An environment variable must be enabled to have Lizmap Web Client ≥ 3.5.
15:43:41 CRITICAL Lizmap[161792]: Lizmap request error Bad request error: Invalid request
15:43:41 WARNING Server[161792]: [{"code":"Bad request error","description":"Invalid request"}]
15:43:41 INFO Server[161792]: Request finished in 0 ms_

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 20, 2022

@Gustry
considering what I read in the QGIS error log, the plugin Lizmap server, via the call /cgi-bin/qgis_mapserv.fcgi/lizmap/server.json causes a critical error [{"code":"Bad request error"," description":"Invalid request"}]
but it seems correctly uploaded to my server, am I wrong?

please take a look to the error log

09:27:00 INFO Server[25962]: Adding service SampleService 1.0
09:27:00 INFO [25962]: Adding API Landing Page 
09:27:00 INFO Server[25962]: Adding service WCS 1.0.0
09:27:00 INFO Server[25962]: Adding service WFS 1.1.0
09:27:00 INFO Server[25962]: Adding service WFS 1.0.0
09:27:00 INFO [25962]: Adding API OGC WFS3 (Draft) 
09:27:00 INFO Server[25962]: Adding service WMS 1.3.0
09:27:00 INFO Server[25962]: Adding service WMS 1.1.1
09:27:00 INFO Server[25962]: Adding service WMTS 1.0.0
09:27:00 WARNING Server[25962]: Invalid cache strategy, expecting 'filesystem', 'periodic' or 'off'. Using 'filesystem' as default.
09:27:00 WARNING Server[25962]: Invalid cache strategy, expecting 'filesystem', 'periodic' or 'off'. Using 'filesystem' as default.
09:27:00 INFO Server[25962]: Initializing 'filesystem' cache strategy
09:27:00 INFO Server[25962]: Server initialized
09:27:00 INFO ./src/server/qgsserverplugins.cpp[25962]: load library /usr/lib/qgispython (3.28.2)
09:27:00 INFO ./src/server/qgsserverplugins.cpp[25962]: Python support library loaded successfully.
09:27:00 INFO Lizmap[25962]: Init server version "1.2.2"
09:27:00 INFO [25962]: Adding API Lizmap 1.2.2
09:27:00 INFO Lizmap[25962]: API "/lizmap" loaded with the server info handler
09:27:00 CRITICAL Lizmap[25962]: Please read the documentation how to enable the Lizmap API on QGIS server side https://docs.lizmap.com/current/en/install/pre_requirements.html#lizmap-server-plugin An environment variable must be enabled to have Lizmap Web Client ≥ 3.5.
09:27:00 INFO Server[25962]: Adding service EXPRESSION 1.0.0
09:27:00 INFO Lizmap[25962]: Service "expression" loaded
09:27:00 INFO Server[25962]: Adding service LIZMAP 1.0.0
09:27:00 INFO Lizmap[25962]: Service "lizmap" loaded
09:27:00 INFO Lizmap[25962]: LizmapFilter.init
09:27:00 INFO Lizmap[25962]: Filter "lizmap" loaded
09:27:00 INFO Lizmap[25962]: Access control "lizmap" loaded
09:27:00 INFO Lizmap[25962]: Filter "get feature info" loaded
09:27:00 INFO Server[25962]: Server plugin lizmap_server loaded!
09:27:00 INFO Server[25962]: Server python plugins loaded
09:27:00 INFO Server[25962]: ******************** New request ***************
09:27:00 INFO Server[25962]: Request URL: http://127.0.0.1/cgi-bin/qgis_mapserv.fcgi?service=WMS&request=GetCapabilities
09:27:00 INFO Server[25962]: Environment:
09:27:00 INFO Server[25962]: ------------------------------------------------
09:27:00 INFO Server[25962]: SERVER_NAME: 127.0.0.1
09:27:00 INFO Server[25962]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi?service=WMS&request=GetCapabilities
09:27:00 INFO Server[25962]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi
09:27:00 INFO Server[25962]: REMOTE_ADDR: 127.0.0.1
09:27:00 INFO Server[25962]: SERVER_PORT: 80
09:27:00 INFO Server[25962]: QUERY_STRING: service=WMS&request=GetCapabilities
09:27:00 INFO Server[25962]: REQUEST_METHOD: GET
09:27:00 INFO Server[25962]: SERVER_PROTOCOL: HTTP/1.1
09:27:00 INFO Server[25962]: Using default configuration file path: /usr/lib/cgi-bin/admin.sld
09:27:00 INFO Lizmap[25962]: Request headers provided
09:27:00 INFO Lizmap[25962]: No lizmap user groups in request headers
09:27:00 INFO Server[25962]: REQUEST:GetCapabilities
09:27:00 INFO Server[25962]: SERVICE:WMS
09:27:00 INFO Server[25962]: Using default configuration file path: /usr/lib/cgi-bin/admin.sld
09:27:00 INFO Lizmap[25962]: Request headers provided
09:27:00 INFO Lizmap[25962]: No lizmap user groups in request headers
09:27:00 INFO Lizmap[25962]: Request headers provided
09:27:00 INFO Lizmap[25962]: No lizmap user groups in request headers
09:27:00 WARNING Server[25962]: WMS capabilities document not found in cache
09:27:00 INFO Lizmap[25962]: Request headers provided
09:27:00 INFO Lizmap[25962]: No lizmap user groups in request headers
09:27:00 WARNING Server[25962]: Set WMS capabilities document in cache
09:27:00 INFO Server[25962]: Request finished in 7 ms
09:27:00 INFO Server[25962]: ******************** New request ***************
09:27:00 INFO Server[25962]: Request URL: http://127.0.0.1/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json
09:27:00 INFO Server[25962]: Environment:
09:27:00 INFO Server[25962]: ------------------------------------------------
09:27:00 INFO Server[25962]: SERVER_NAME: 127.0.0.1
09:27:00 INFO Server[25962]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi/lizmap/server.json
09:27:00 INFO Server[25962]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi
09:27:00 INFO Server[25962]: PATH_INFO: /lizmap/server.json
09:27:00 INFO Server[25962]: REMOTE_ADDR: 127.0.0.1
09:27:00 INFO Server[25962]: SERVER_PORT: 80
09:27:00 INFO Server[25962]: QUERY_STRING: 
09:27:00 INFO Server[25962]: REQUEST_METHOD: GET
09:27:00 INFO Server[25962]: SERVER_PROTOCOL: HTTP/1.1
09:27:00 INFO Server[25962]: Using default configuration file path: /usr/lib/cgi-bin/admin.sld
09:27:00 INFO Lizmap[25962]: Request headers provided
09:27:00 INFO Lizmap[25962]: No lizmap user groups in request headers
09:27:00 INFO Server[25962]: Using default configuration file path: /usr/lib/cgi-bin/admin.sld
09:27:00 INFO Server[25962]: Trying URL path: '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' for '/lizmap'
09:27:00 INFO Server[25962]: API Lizmap accepts the URL path '/cgi-bin/qgis_mapserv.fcgi/lizmap/server.json' 
09:27:00 INFO Server[25962]: Checking API path /server.json for server.json 
09:27:00 INFO Server[25962]: API Lizmap: found handler server
09:27:00 CRITICAL Lizmap[25962]: Please read the documentation how to enable the Lizmap API on QGIS server side https://docs.lizmap.com/current/en/install/pre_requirements.html#lizmap-server-plugin An environment variable must be enabled to have Lizmap Web Client ≥ 3.5.
09:27:00 CRITICAL Lizmap[25962]: Lizmap request error Bad request error: Invalid request
09:27:00 WARNING Server[25962]: [{"code":"Bad request error","description":"Invalid request"}]
09:27:00 INFO Server[25962]: Request finished in 0 ms

@Gustry
Copy link
Member

Gustry commented Dec 20, 2022

We can see from your logs that "QGIS Lizmap server plugin" is indeed installed and loaded by QGIS Server. But the Lizmap API is not enabled :

09:27:00 CRITICAL Lizmap[25962]: Please read the documentation how to enable the Lizmap API on QGIS server side https://docs.lizmap.com/current/en/install/pre_requirements.html#lizmap-server-plugin An environment variable must be enabled to have Lizmap Web Client ≥ 3.5.
09:27:00 CRITICAL Lizmap[25962]: Lizmap request error Bad request error: Invalid request

@Antoviscomi
Copy link
Contributor Author

@Gustry how to enable these API?
the Documentation it seems a little bit confused
many thanks

@nworr
Copy link
Contributor

nworr commented Dec 20, 2022

Can you try some change in your apache conf you describe above #3367 (comment)

not
SetEnv QGIS_SERVER_LIZMAP_REVEAL_SETTINGS=True
but
SetEnv QGIS_SERVER_LIZMAP_REVEAL_SETTINGS True

?

@Antoviscomi
Copy link
Contributor Author

3.

I Do It, but no results

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 20, 2022

@Gustry @nworr THERE IS THE SOLUTION!
the correct sintax to set the environmental variable It's

FcgidInitialEnv QGIS_SERVER_LIZMAP_REVEAL_SETTINGS True

so I close the Issue

@Gustry
Copy link
Member

Gustry commented Dec 20, 2022

I was going to ask you, are you sure that your environment variable are read by QGIS server.
They are many ways to add environment variables, we can't describe them all.

Thanks for the feedback.

@Antoviscomi
Copy link
Contributor Author

Schermata del 2022-12-20 10-34-41

@Antoviscomi
Copy link
Contributor Author

Antoviscomi commented Dec 20, 2022

I was going to ask you, are you sure that your environment variable are read by QGIS server. They are many ways to add environment variables, we can't describe them all.

Thanks for the feedback.

Many thanks for your help and for your excellent work @Gustry @rldhont @laurentj @nworr @slarosa

@josemvm josemvm unpinned this issue Feb 2, 2023
@Gustry Gustry pinned this issue Feb 8, 2023
@Gustry
Copy link
Member

Gustry commented Feb 8, 2023

@josemvm Please do not pin/unpin issues.

Pinned issues is for new comers on the issue tracker, to find quickly a ticket which has been already been solved by frequently asked questions, to avoid to ask the question again. This ticket is a common issue with the new release of 3.6.X

@josemvm
Copy link
Collaborator

josemvm commented Feb 8, 2023

@Gustry ok, sorry

@rldhont rldhont unpinned this issue Feb 16, 2023
@WarpNine88
Copy link

Thank you

@Gustry Gustry pinned this issue Feb 17, 2023
@rldhont rldhont unpinned this issue Feb 24, 2023
@Gustry Gustry pinned this issue Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants