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

[Question]: QGIS Server plugins installation and error 500 in LWC about the plugin #4462

Open
1 task done
cfsgarcia opened this issue May 23, 2024 · 5 comments
Open
1 task done
Labels
feedback question stale This ticket might be closed soon

Comments

@cfsgarcia
Copy link

What is the question? (in English)

Hello, I installed qGIS Server and lizmap server plugin on NGINX, it's working ok. qGIS Server returns getcapabilities etc.
I subsequently installed Lizmap Web Client 3.7.6 on NGINX; I configured "QGIS server URL*" in Lizmap configuration page accordingly with http://localhost:8081/qgisserver

I did enable the plugin as described in the doc, in /etc/qgis-server/env I added
QGIS_SERVER_LIZMAP_REVEAL_SETTINGS=1
QGIS_PLUGINPATH="/var/www/qgis-server/plugins"

However in Lizmap, Server information panel I get an error: QGIS Server returns an HTTP error about the Lizmap plugin: 500.

When I try to reach to the Lizmap API with curl http://localhost:8081/qgisserver/lizmap/server.json, it returns Internal Server Error.
This attempt leaves some log in /var/log/qgis/qgisserver.log, see below. It seems to suggests it can communicate with the API.

Any idea what is going wrong??
Many thanks

Versions, safeguards, check summary etc

GIS server: QGIS FCGI server - QGIS version 3.34.6-Prizren
Web server: NGINX & PHP 8.2
Lizmap Web Client: 3.7.6
Plugins:
lizmap_server v2.9.1
wfsOutputExtension v1.8.0
atlasprint v3.3.2

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.

Operating system

Ubuntu 22.04.2 LTS

Browsers

Chrome

Browsers version

124.0.6367.208 (Official Build) (64-bit)

Relevant log output

15:37:55 INFO Server[30844]: ******************** New request ***************
15:37:55 INFO Server[30844]: Request URL: http://localhost:8081/qgisserver/lizmap/server.json
15:37:55 INFO Server[30844]: Environment:
15:37:55 INFO Server[30844]: ------------------------------------------------
15:37:55 INFO Server[30844]: SERVER_NAME: localhost
15:37:55 INFO Server[30844]: REQUEST_URI: /qgisserver/lizmap/server.json
15:37:55 INFO Server[30844]: SCRIPT_NAME: /qgisserver/lizmap/server.json
15:37:55 INFO Server[30844]: REMOTE_ADDR: 172.xx.xx.xx
15:37:55 INFO Server[30844]: SERVER_PORT: 8081
15:37:55 INFO Server[30844]: QUERY_STRING:
15:37:55 INFO Server[30844]: REMOTE_USER:
15:37:55 INFO Server[30844]: CONTENT_TYPE:
15:37:55 INFO Server[30844]: REQUEST_METHOD: GET
15:37:55 INFO Server[30844]: SERVER_PROTOCOL: HTTP/1.1
15:37:55 INFO WfsOutputExtension[30844]: requestReady ran in 0.0s
15:37:55 INFO Lizmap[30844]: Request headers provided
15:37:55 INFO Lizmap[30844]: No lizmap user groups in request headers
15:37:55 WARNING [30844]: HelloFilter.requestReady
15:37:55 INFO Server[30844]: TEST_NEW_PARAM:ParamsFilter
15:37:55 INFO Server[30844]: Trying URL path: '/qgisserver/lizmap/server.json' for '/lizmap'
15:37:55 INFO Server[30844]: API Lizmap accepts the URL path '/qgisserver/lizmap/server.json'
15:37:55 INFO Server[30844]: Checking API path /server.json for server.json
15:37:55 INFO Server[30844]: API Lizmap: found handler server
15:37:55 CRITICAL Server[30844]: Service CADASTRE is not registered
15:37:55 INFO WfsOutputExtension[30844]: responseComplete ran in 0.0s
15:37:55 CRITICAL Server[30844]: 'NoneType' object has no attribute 'upper'
@cfsgarcia
Copy link
Author

Problem resolved.
I have just installed 'cadastre' plugin on the server and it did the trick.

As it is, 'cadastre' is required to make Lizmap API work.

@nworr nworr closed this as completed May 23, 2024
@Gustry Gustry reopened this May 24, 2024
@Gustry
Copy link
Member

Gustry commented May 24, 2024

I'm not sure what was your issue, but "Cadastre" is not required by Lizmap.
I'm running LWC without "cadastre" installed.

I just checked of the code of Lizmap server plugin, it does not harm, it's only checking if "Cadastre" is installed, that's all. It should be.

15:37:55 WARNING [30844]: HelloFilter.requestReady

What is this plugin ? Which plugins did you install ? This plugin is for demo purpose for instance. I would not install it.

As mentioned in QGIS-Plugin-Manager :
https://github.com/3liz/qgis-plugin-manager?tab=readme-ov-file#install-needed-plugins-only-mainly-on-qgis-server

Only install plugins on server your really need. They can alter, modify INPUTS or OUTPUT of QGIS Server.

Please uninstall unneeded plugins and let us know.

@Gustry Gustry changed the title [Question]: [Question]: QGIS Server plugins installation and error 500 in LWC about the plugin May 24, 2024
@cfsgarcia
Copy link
Author

cfsgarcia commented May 24, 2024

I only had the plugins listed above which are all 3Liz ones. It's this CRITICAL Server message pointing at cadastre that made me think it could help having it installed.

After installing cadastre, here my plugin directory is:

qgis-plugin-manager list
QGIS version : 3.34.6
List all plugins in the current working directory : /var/www/qgis-server/plugins
|atlasprint |atlasprint |3.3.2 |Server |3.10 | |3Liz |www-data : 0o757 |
|cadastre |cadastre |1.19.1 |Server,Processing|3.22 |3.99 |3Liz |www-data : 0o757 | |
|lizmap_server |Lizmap server |2.9.1 |Server |3.10 |3.99 |3Liz |www-data : 0o757 | |
|wfsOutputExtension|wfsOutputExtension|1.8.0 |Server |3.22 | |3Liz |www-data : 0o757 |

And here my qgissevrerlog is; no more Critical server message thrown:

GNU nano 6.2                                                                                                              /var/log/qgis/qgisserver.log                                                                                                                 M     09:16:54 INFO Server[47369]: ******************** New request ***************
09:16:54 INFO Server[47369]: Request URL: http://localhost:8081/qgisserver/lizmap/server.json
09:16:54 INFO Server[47369]: Environment:
09:16:54 INFO Server[47369]: ------------------------------------------------
09:16:54 INFO Server[47369]: SERVER_NAME: localhost
09:16:54 INFO Server[47369]: REQUEST_URI: /qgisserver/lizmap/server.json
09:16:54 INFO Server[47369]: SCRIPT_NAME: /qgisserver/lizmap/server.json
09:16:54 INFO Server[47369]: REMOTE_ADDR: 127.0.0.1
09:16:54 INFO Server[47369]: SERVER_PORT: 8081
09:16:54 INFO Server[47369]: QUERY_STRING:
09:16:54 INFO Server[47369]: REMOTE_USER:
09:16:54 INFO Server[47369]: CONTENT_TYPE:
09:16:54 INFO Server[47369]: REQUEST_METHOD: GET
09:16:54 INFO Server[47369]: SERVER_PROTOCOL: HTTP/1.1
09:16:54 WARNING Network[47369]: Network request https://bourbon.3liz.com/api/event timed out
09:16:54 INFO WfsOutputExtension[47369]: requestReady ran in 0.0s
09:16:54 INFO Lizmap[47369]: Request headers provided
09:16:54 INFO Lizmap[47369]: No lizmap user groups in request headers
09:16:54 INFO Server[47369]: Trying URL path: '/qgisserver/lizmap/server.json' for '/wfs3'
09:16:54 INFO Server[47369]: Trying URL path: '/qgisserver/lizmap/server.json' for '/'
09:16:54 INFO Server[47369]: Trying URL path: '/qgisserver/lizmap/server.json' for '/lizmap'
09:16:54 INFO Server[47369]: API Lizmap accepts the URL path '/qgisserver/lizmap/server.json'
09:16:54 INFO Server[47369]: Checking API path /server.json for server.json
09:16:54 INFO Server[47369]: API Lizmap: found handler server
09:16:54 INFO WfsOutputExtension[47369]: responseComplete ran in 0.0s
09:16:54 INFO Server[47369]: Request finished in 419 ms

@cfsgarcia
Copy link
Author

This is said, I have just deleted Cadastre plugin and restarted qgis server services and it's woking...
Not sure why it wasn't before.....

Copy link

This issue is missing some feedbacks. 👻
Please have a look to the discussion, thanks. 🦎

@github-actions github-actions bot added the stale This ticket might be closed soon label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback question stale This ticket might be closed soon
Projects
None yet
Development

No branches or pull requests

3 participants