#1 Fri 05 May 2023 10:45
- image95
- Participant assidu
- Date d'inscription: 6 Sep 2014
- Messages: 257
Lizmap/qgis server : Lire un projet avec couche postgis
Bonjour,
Sous debian et apache. Qgis server fonctionne. J'arrive par exple à voir le projet template world.qgs.
Une requete getcapabilities fonctionne aussi. Par contre, j'arrive pas pour le moment à voir mon projet avec une table postgis. Que ce soit avec qgis server et a fortiori lizmap.
Ci dessous je partage les logs qgis server. Je crains avoir plusieurs erreurs.
Concernant l'aspect postgis, j'avoue ne pas trop saisir ce qu'il faut faire comme paramétrage dans le projet qgis. J'ai trouvé un forum parlant de sauvegarde de la configuration en plain text. De quoi s'agit il exactement ? Comment faut il sauvegarder son id/mdp ? Dans la fenetre editer une connexion postgis. J'imagine que tout se paramétre dans la section Authentification ? Il y a 2 onglets. Un configuration et un "de base". Faut il mettre basic authentification ?
Je partage mes logs lizmap. Bien que je pense qu'il soient moins pertinents à ce stade que les logs qgis server.
Log lizmap :
Code:
2023-05-05 09:34:18 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171
Ci dessous mes logs qgis server :
Code:
10:29:43 INFO Server[778180]: ******************** New request *************** 10:29:43 INFO Server[778180]: Request URL: http://XXX.XXX.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-432786,4372992,3358959,7513746&SRS=EPSG:3857&WIDTH=665&HEIGHT=551&LAYERS=countries&FORMAT=image/jpeg 10:29:43 INFO Server[778180]: Environment: 10:29:43 INFO Server[778180]: ------------------------------------------------ 10:29:43 INFO Server[778180]: SERVER_NAME: XXX-XXXX.andra.fr 10:29:43 INFO Server[778180]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi?MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-432786,4372992,3358959,7513746&SRS=EPSG:3857&WIDTH=665&HEIGHT=551&LAYERS=countries&FORMAT=image/jpeg 10:29:43 INFO Server[778180]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi 10:29:43 INFO Server[778180]: REMOTE_ADDR: 172.21.20.97 10:29:43 INFO Server[778180]: SERVER_PORT: 80 10:29:43 INFO Server[778180]: QUERY_STRING: MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-432786,4372992,3358959,7513746&SRS=EPSG:3857&WIDTH=665&HEIGHT=551&LAYERS=countries&FORMAT=image/jpeg 10:29:43 INFO Server[778180]: REQUEST_METHOD: GET 10:29:43 INFO Server[778180]: QGIS_PROJECT_FILE: /home/qgis/projects/world.qgs 10:29:43 INFO Server[778180]: SERVER_PROTOCOL: HTTP/1.1 10:29:43 INFO Lizmap[778180]: Request headers provided 10:29:43 INFO Lizmap[778180]: No lizmap user groups in request headers 10:29:43 INFO Server[778180]: BBOX:-432786,4372992,3358959,7513746 10:29:43 INFO Server[778180]: FORMAT:image/jpeg 10:29:43 INFO Server[778180]: HEIGHT:551 10:29:43 INFO Server[778180]: LAYERS:countries 10:29:43 INFO Server[778180]: MAP:/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 10:29:43 INFO Server[778180]: REQUEST:GetMap 10:29:43 INFO Server[778180]: SERVICE:WMS 10:29:43 INFO Server[778180]: SRS:EPSG:3857 10:29:43 INFO Server[778180]: VERSION:1.3.0 10:29:43 INFO Server[778180]: WIDTH:665 10:30:13 WARNING PostGIS[778180]: Connection to database failed timeout expired 10:30:13 CRITICAL Server[778180]: Error, Layer(s) XXXXXX_Ouvrage_a_Realiser_Pt_8db55b4d_dd42_4d46_b5d1_1cffd2768ae1 not valid in project /home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 10:30:13 WARNING Server[778180]: <?xml version="1.0" encoding="UTF-8"?> <ServerException>Layer(s) not valid</ServerException> 10:30:14 INFO Server[778180]: Request finished in 30136 ms ~ ~ ~
Dernière modification par image95 (Fri 05 May 2023 10:48)
Hors ligne
#2 Fri 05 May 2023 14:40
- image95
- Participant assidu
- Date d'inscription: 6 Sep 2014
- Messages: 257
Re: Lizmap/qgis server : Lire un projet avec couche postgis
Suite à mon précédent message, je me permets de vous donner une mise à jour des logs qgis serveur. En effet, contrairement à mon précedent message, je me suis cette fois assuré que la connection au serveur ppostgresql fonctionne (avec l'outil pg_isready).
Concernant les logs du serveur qgis, on peut voir notamment « Échec de la connexion à la base de données fe_sendauth : aucun mot de passe fourni » Connaissez-vous la signification de ce message et comment corriger cette erreur ? De plus, que signifie l'erreur critique : Layer(s) not valid ?
Ci dessous : mes logs qgis serveur :
Code:
4:12:37 INFO Server[778180]: ******************** New request *************** 14:12:37 INFO Server[778180]: Request URL: http://xxx.xxx.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 14:12:37 INFO Server[778180]: Environment: 14:12:37 INFO Server[778180]: ------------------------------------------------ 14:12:37 INFO Server[778180]: SERVER_NAME: xxxx.xxxx.fr 14:12:37 INFO Server[778180]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi?MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 14:12:37 INFO Server[778180]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi 14:12:37 INFO Server[778180]: REMOTE_ADDR: 1xxx.xx.xx.xx 14:12:37 INFO Server[778180]: SERVER_PORT: 80 14:12:37 INFO Server[778180]: QUERY_STRING: MAP=/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 14:12:37 INFO Server[778180]: REQUEST_METHOD: GET 14:12:37 INFO Server[778180]: QGIS_PROJECT_FILE: /home/qgis/projects/world.qgs 14:12:37 INFO Server[778180]: SERVER_PROTOCOL: HTTP/1.1 14:12:37 INFO Lizmap[778180]: Request headers provided 14:12:37 INFO Lizmap[778180]: No lizmap user groups in request headers 14:12:37 INFO Server[778180]: MAP:/home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 14:12:37 WARNING PostGIS[778180]: Connection to database failed fe_sendauth: no password supplied 14:12:37 CRITICAL Server[778180]: Error, Layer(s) Ouvrage_a_Realiser_Pt_7249ce6e_1919_4704_8a1c_cce8299e331d not valid in project /home/data/ftp/template/qgis/lizmap_test/lizmap_test.qgs 14:12:37 WARNING Server[778180]: <?xml version="1.0" encoding="UTF-8"?> <ServerException>Layer(s) not valid</ServerException>
Hors ligne
#3 Tue 09 May 2023 12:17
- image95
- Participant assidu
- Date d'inscription: 6 Sep 2014
- Messages: 257
Re: Lizmap/qgis server : Lire un projet avec couche postgis
Bonjour,
Voici une actualisation des logs qis server et logs lizmap. Contrairement à avant, en plus de partager le fichier .qgs, je partage également le fichier .qgs.cfg La doc ne dit pas qu'il faut également mettre à disposition ce fichier cfg en plus du .qgs.
Messages lizmap :
Code:
An error occurred while loading the map. Required resources may be temporarily unavailable. Please try later. Return to home page.
Logs lizmap :
Code:
2023-05-09 12:04:18 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171 2023-05-09 12:04:18 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171 2023-05-09 12:05:04 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171 2023-05-09 12:05:04 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171 2023-05-09 12:05:24 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:05:25 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:05:28 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:05:28 172.21.20.97 error An error has been raised when loading WMS GetCapabilities: HTTP Code 400 2023-05-09 12:06:02 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:06:03 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:06:03 172.21.20.97 error An error has been raised when loading WMS GetCapabilities: HTTP Code 400 2023-05-09 12:06:06 172.21.20.97 error GetCapabilities result code: 500 2023-05-09 12:07:41 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171 2023-05-09 12:07:41 [8] Undefined index: repository /var/www/lizmap/lizmap-web-client-3.6.3/temp/lizmap/www/compiled/templates/modules/admin/server_information_html_t_15.php 171
Logs qgis server :
Code:
12:10:06 INFO Server[824190]: ******************** New request *************** 12:10:06 INFO Server[824190]: Request URL: http://XXX-XXXX.XXXX.fr/cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap_test%2Fzios.qgs&request=getcapabilities&service=WMS&version=1.3.0&Lizmap_User=admin&Lizmap_User_Groups=admins&Lizmap_Override_Filter=1 12:10:06 INFO Server[824190]: Environment: 12:10:06 INFO Server[824190]: ------------------------------------------------ 12:10:06 INFO Server[824190]: SERVER_NAME: XXXX-XXXXX.XXXXX.fr 12:10:06 INFO Server[824190]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap%5Ftest%2Fzios%2Eqgs&request=getcapabilities&service=WMS&version=1%2E3%2E0&Lizmap%5FUser=admin&Lizmap%5FUser%5FGroups=admins&Lizmap%5FOverride%5FFilter=1 12:10:06 INFO Server[824190]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi 12:10:06 INFO Server[824190]: REMOTE_ADDR: XXXXXX.XXXXX.XXXX.XXXXX 12:10:06 INFO Server[824190]: SERVER_PORT: 80 12:10:06 INFO Server[824190]: QUERY_STRING: map=%2Fhome%2Fdata%2Fftp%2Ftemplate%2Fqgis%2Flizmap%5Ftest%2Fzios%2Eqgs&request=getcapabilities&service=WMS&version=1%2E3%2E0&Lizmap%5FUser=admin&Lizmap%5FUser%5FGroups=admins&Lizmap%5FOverride%5FFilter=1 12:10:06 INFO Server[824190]: REQUEST_METHOD: GET 12:10:06 INFO Server[824190]: QGIS_PROJECT_FILE: /home/qgis/projects/world.qgs 12:10:06 INFO Server[824190]: SERVER_PROTOCOL: HTTP/1.1 12:10:06 INFO Lizmap[824190]: Request headers provided 12:10:06 INFO Lizmap[824190]: No lizmap user groups in request headers 12:10:06 INFO Lizmap[824190]: Lizmap user groups in parameters : admins 12:10:06 INFO Lizmap[824190]: Fetching /home/data/ftp/template/qgis/lizmap_test/zios.qgs.cfg cfg file with last modified timestamp : 1683626320.5751119 12:10:06 INFO Lizmap[824190]: No acl defined in Lizmap config 12:10:06 INFO Server[824190]: LIZMAP_OVERRIDE_FILTER:1 12:10:06 INFO Server[824190]: LIZMAP_USER:admin 12:10:06 INFO Server[824190]: LIZMAP_USER_GROUPS:admins 12:10:06 INFO Server[824190]: MAP:/home/data/ftp/template/qgis/lizmap_test/zios.qgs 12:10:06 INFO Server[824190]: REQUEST:getcapabilities 12:10:06 INFO Server[824190]: SERVICE:WMS 12:10:06 INFO Server[824190]: VERSION:1.3.0 12:10:06 CRITICAL Server[824190]: Error, Layer(s) Cigeo_Zios_Po_20170503_ee7aedcd_2ab0_4b3f_bb42_81725199ad65 not valid in project /home/data/ftp/template/qgis/lizmap_test/zios.qgs 12:10:06 WARNING Server[824190]: <?xml version="1.0" encoding="UTF-8"?> <ServerException>Layer(s) not valid</ServerException> 12:10:06 INFO Server[824190]: Request finished in 70 ms
Dernière modification par image95 (Tue 09 May 2023 12:19)
Hors ligne
#4 Wed 10 May 2023 15:55
- image95
- Participant assidu
- Date d'inscription: 6 Sep 2014
- Messages: 257
Re: Lizmap/qgis server : Lire un projet avec couche postgis
Bonjour,
J'ai enfin trouvé une solution à mon problème. Un post qui m'a aidé :
https://gis.stackexchange.com/questions … s-database
Hors ligne