docker-lizmap icon indicating copy to clipboard operation
docker-lizmap copied to clipboard

Service non disponible!

Open MaxiReglisse opened this issue 7 years ago • 31 comments

this issue is quite similar to the #39 : i can not load a map when i click on "voir la carte" (Montpellier). my conf is :

Numéro de version -> 3.2pre171102
URL du serveur WMS -> http://qgiserver/cgi-bin/qgis_mapserv.fcgi
Version de QGIS Server -> ≥ 2.18
Répertoire racine du cache -> /tmp/
Chemin vers le répertoire local -> ../install/qgis/

the error message is "Service non disponible!", and i see nothing in the logs... from the lizmap container, i can ping qgiserver, the qgis server container (after adding iputils-ping). i also test fcgi with a little test.fcgi script, it is also ok. i had a similar problem with an other Lizmap instance, without Docker. The problem was solved with the ExecCGI option in the ScriptAlias directive of apache2. any help would be appreciated.

MaxiReglisse avatar Jan 25 '18 16:01 MaxiReglisse

found something in /var/log/apache2/qgis-server-access.log (qgis container)... but it is not an error.

172.18.0.3 - - [26/Jan/2018:08:43:09 +0000] "GET /cgi-bin/qgis_mapserv.fcgi?map=%2Fvar%2Fwww%2Fwebsig%2Flizmap%2Finstall%2Fqgis%2Fmontpellier%2Eqgs&request=GetCapabilities&service=WFS HTTP/1.0" 200 424 "-" "-"

idem in /var/log/apache2/access.log (lizmap container) :

172.20.74.124 - - [26/Jan/2018:08:44:00 +0000] "GET /websig/lizmap/www/admin.php/admin/logs/detail HTTP/1.1" 200 1996 "http://lizmap-test.umrthema.univ-fcomte.fr/websig/lizmap/www/admin.php/admin/logs/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 Chrome/63.0.3239.84 Safari/537.36"

MaxiReglisse avatar Jan 26 '18 09:01 MaxiReglisse

I have the same issue. If i change the qgis-server version in my docker-compose file, i can load and correctly display old qgis project (made with qgis 2.14) I checked in the qgis-server logs, and found some warning message about possible trouble with a qgis project not built with the same qgis-server version.

My conclusion is that you should rebuild your project with a qgis having the same version as the qgis-server your are using in your containers.

On the other hand, i modified the yml file to expose the qgiserver ports on the host. Then tried to query a map from my web browser with a query like: http://my_ip:my_port/cgi-bin/qgis_mapserv.fcgi?REQUEST=GetMap&MAP=a_project.qgs. With the 2.14LTR qgisserver version, i got an answer. With the 2.18, i got an error message (service not available). Therefore, i'm not sure the solution you may follow. I guess there's a problem with the 2.18 qgiserver image ...

Hope this help somewhere

pclastre avatar Mar 07 '18 17:03 pclastre

hi, I'll need to see the docker-composer.yml

jancelin avatar Mar 08 '18 08:03 jancelin

Here is the docker-compose.yml file

version: '2' services:

#---Lizmap & Qgis-server-------------

lizmap: image: jancelin/docker-lizmap:latest restart: always ports: - 81:80 - 443:443 volumes: - /home/donnees/source_ar/0_InterfacesWeb/lizmap_data:/home - /tmp/lizmap_config:/var/www/websig/lizmap/var - /tmp/lizmap_tmp:/tmp links: - qgiserver:qgiserver

##Pensez à changer l'URL WMS dans le back-office de lizmap: http://qgiserver/cgi-bin/qgis_mapserv.fcgi qgiserver: image: jancelin/qgis-server:2.14LTR-wfsOutputExtension restart: always volumes: - /home/donnees/source_ar/0_InterfacesWeb/lizmap_data:/home ports: - 82:80 expose: - 80

In this configuration, both containers are fully functionnal If i switch to the qgis-server :2.18-wfsOutputExtension, lizmap is ok, but qgisserver is not : « service non disponible », and none of the available project are loadable in the browser.

Thanks

pclastre avatar Mar 08 '18 08:03 pclastre

How does it feel with this query by changing the "my_ip" and "myQgisProject" with the right values:

https://my_ip:82/cgi-bin/qgis_mapserv.fcgi?map=/home/myQgisProject.qgs&service=WMS&request=GetCapabilities

jancelin avatar Mar 08 '18 08:03 jancelin

with 2.14LTR qgiserver, It returns a long xml files (layers list, bouding box, project title ...) with 2.18 qgiserver, the returned error is: This XML file does not appear to have any style information associated with it. The document tree is shown below. <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0"> <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException> </ServiceExceptionReport>

pclastre avatar Mar 08 '18 09:03 pclastre

this is a project made with qgis 2.18?

jancelin avatar Mar 08 '18 10:03 jancelin

no. It was made with the Qgis 2.14

pclastre avatar Mar 08 '18 10:03 pclastre

you can test with a project in 2.18? the headers are changed

jancelin avatar Mar 08 '18 10:03 jancelin

I have exactly the same error message: <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0"> <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException> </ServiceExceptionReport>

pclastre avatar Mar 08 '18 10:03 pclastre

By the way, the 2.18 project i just tested is loading fine in an old 2.14 lizmap+qgisserver container. So, i cannot incriminate the project itself

pclastre avatar Mar 08 '18 10:03 pclastre

do : docker ps -a that does a: docker exec container_name_qgis2.18 sh -c "ls -l /home"

jancelin avatar Mar 08 '18 10:03 jancelin

The container is running

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4d6768091e1d jancelin/docker-lizmap:latest "/bin/sh -c /start.sh" About an hour ago Up About an hour 0.0.0.0:443->443/tcp, 0.0.0.0:81->80/tcp dockerlizmapmaster_lizmap_1 05f10c323d4b jancelin/qgis-server:2.18-wfsOutputExtension "/bin/sh -c /start.sh" About an hour ago Up About an hour 0.0.0.0:82->80/tcp dockerlizmapmaster_qgiserver_1 5

And the mounted volume shows the expected files docker exec 05f10 sh -c "ls -l /home" total 52 drwxrwxrwx 2 root root 4096 Sep 29 14:43 AGROCLIM drwxrwxrwx 2 root root 4096 Nov 28 09:05 BIOSP drwxr-xr-x 2 12133 root 4096 Sep 19 2014 CAPTE drwxrwxrwx 2 root root 4096 Feb 2 2016 ECODEV drwxrwxrwx 7 root root 12288 Jan 25 2017 EMMAH drwxr-xr-x 2 13007 root 4096 Jan 28 2016 PSH drwxr-xr-x 2 13008 root 4096 Oct 14 2016 UAPV drwxrwxrwx 2 root root 12288 Feb 28 09:31 URBANSIMUL drwxrwxrwx 3 3039 300 4096 Jan 9 08:53 URFM-UEFM

pclastre avatar Mar 08 '18 11:03 pclastre

you added the subfolders to GetCapabilities? ex: https://my_ip:82/cgi-bin/qgis_mapserv.fcgi?map=/home/AGROCLIM/myQgisProject.qgs&service=WMS&request=GetCapabilities

jancelin avatar Mar 08 '18 11:03 jancelin

Yes. Otherwise, the project file is not found and i get an error : <ServerException>Project file error</ServerException>

pclastre avatar Mar 08 '18 11:03 pclastre

try this image jancelin/qgis-server:2.18LTR

I have to clean up the depots with the new LTR ...

jancelin avatar Mar 08 '18 11:03 jancelin

YES !!

The lizmap web client 3.2pre180202 works fine with qgiserver 2.18LTR container, even for older projects (built with a qgis 2.14 )

Thank you for this help

Yes you should propose the same tag version for both docker images (lizmap & qgiserver) in order to help us to choose the right ones.

pclastre avatar Mar 08 '18 13:03 pclastre

for me it is worse... when i try http://ip/websig/lizmap/www/admin.php/config, the answer is now :

Error 500. A technical error has occured. Sorry for this trouble.

i removed all volumes and images before trying the new image jancelin/qgis-server:2.18LTR. my docker-compose.ymp contains :

version: '3'
services:

#---Lizmap & Qgis-server-------------

  lizmap:
    image: jancelin/docker-lizmap:latest
    restart: always
    ports:
     - 80:80
     - 443:443
    volumes:
     - /home/lizmap/lizmap_project:/home
     - /home/lizmap/lizmap_var:/var/www/websig/lizmap/var
     - /home/lizmap/tmp:/tmp
    links:
     - qgiserver:qgiserver

##Pensez à changer l'URL WMS dans le back-office de lizmap: http://qgiserver/cgi-bin/qgis_mapserv.fcgi
  qgiserver:
    #image: jancelin/qgis-server:2.18-wfsOutputExtension
    image: jancelin/qgis-server:2.18LTR
    restart: always
    volumes:
      - /home/lizmap/lizmap_project:/home
    expose:
      - 80

docker ps shows that everything should be ok :

$ docker ps
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                                      NAMES
92490a3e50ca        jancelin/docker-lizmap:latest   "/bin/sh -c /start.sh"   6 minutes ago       Up 6 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   dockerlizmap_lizmap_1
d982735daf36        jancelin/qgis-server:2.18LTR    "/bin/sh -c /start.sh"   6 minutes ago       Up 6 minutes        80/tcp                                     dockerlizmap_qgiserver_1

but I encounter this error 500. i do not understand...

MaxiReglisse avatar Mar 08 '18 14:03 MaxiReglisse

a bug with php7.0 .... use last stable version with php5: jancelin/docker-lizmap:3.1.8

latest is the master of lizmap.

jancelin avatar Mar 08 '18 14:03 jancelin

thank you for this tip, but even with jancelin/docker-lizmap:3.1.8, i always obtain an error 500.

$ docker ps
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                      NAMES
6ac453a7d200        jancelin/docker-lizmap:3.1.8   "/bin/sh -c /start.sh"   3 minutes ago       Up About a minute   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   dockerlizmap_lizmap_1
e6827d36f9e7        jancelin/qgis-server:2.18LTR   "/bin/sh -c /start.sh"   3 minutes ago       Up 3 minutes        80/tcp                                     dockerlizmap_qgiserver_1

PHP is now in version 5.6 :

$ docker exec -it dockerlizmap_lizmap_1 php --version
PHP 5.6.33-0+deb8u1 (cli) (built: Jan  5 2018 15:46:26) 

an other suggestion ? thank in advance. i really do not understand what happens.

MaxiReglisse avatar Mar 08 '18 14:03 MaxiReglisse

hey, it is ok now !!!! because one should not use the following URL :

http://ip/websig/lizmap/www/admin.php/config

but this one :

http://ip/websig/lizmap/www/admin.php

MaxiReglisse avatar Mar 08 '18 15:03 MaxiReglisse

Ok, docker-compose.yml up-to-date

jancelin avatar Mar 08 '18 15:03 jancelin

jancelin/docker-lizmap:latest working, nowback to php5 and debian jessie, just for test of course!!!

use the lizmap master plugin for new features: https://github.com/3liz/lizmap-plugin

jancelin avatar Mar 08 '18 16:03 jancelin

Julien

AS i was allready on the latest version of docker-lizmap, i deleted every thing (containers & docker-lizmap image) and simply ran the following command

docker-compose up –d

And my docker-compose.yml contains : version: '2' services:

#---Lizmap & Qgis-server-------------

lizmap: image: jancelin/docker-lizmap:latest restart: always ports: - 81:80 - 443:443 volumes: - /home/donnees/source_ar/0_InterfacesWeb/lizmap_data:/home - /tmp/lizmap_config:/var/www/websig/lizmap/var - /tmp/lizmap_tmp:/tmp links: - qgiserver:qgiserver

##Pensez à changer l'URL WMS dans le back-office de lizmap: http://qgiserver/cgi-bin/qgis_mapserv.fcgi qgiserver: image: jancelin/qgis-server:2.18LTR restart: always volumes: - /home/donnees/source_ar/0_InterfacesWeb/lizmap_data:/home ports: - 82:80 expose: - 80

And lizmap is not working anymore ! With my web browser, i have this answer : Error 500. A technical error has occured. Sorry for this trouble.

Please, help

Btw, on github, i cannot see the issue #41 anymore.

pclastre avatar Mar 12 '18 15:03 pclastre

be careful at the URL you use. my experience is that http://lizmap-dev.umrthema.univ-fcomte.fr/lm/admin.php/config/ does not work and leads to an error 500 but you should use http://lizmap-dev.umrthema.univ-fcomte.fr/lm/admin.php or http://lizmap-dev.umrthema.univ-fcomte.fr/lm/admin.php/admin/config/

MaxiReglisse avatar Mar 13 '18 16:03 MaxiReglisse

Actually, when i try to connect to the lizmap web client, i only enter the address http://<server_ip>:<port_numberhttp://%3cserver_ip%3e:%3cport_number> That’s enough, and apache does the job to complete the URL with : http://<server_ip>:<port_number>/websig/lizmap/www/http://%3cserver_ip%3e:%3cport_number%3e/websig/lizmap/www/ Thus i cannot make a mistake when connecting to the container.

My issue was just here to say to Julien that the changes made in the docker-lizmap:latest ( back to php5 and debian jessie ) drives me to a non functionning container …

pclastre avatar Mar 14 '18 07:03 pclastre

Me too same issue. Nothing works

jlstanus avatar Mar 15 '18 08:03 jlstanus

https://github.com/3liz/lizmap-web-client/issues/814

jancelin avatar Mar 16 '18 15:03 jancelin

I think the problem comes from old jauth.db (from 3.1... ) which defines directory rights. by restarting from strach it works in master you can test with the "Play with Docker" button in ReadMe.md

jancelin avatar Mar 20 '18 08:03 jancelin

yes that's right, by restarting the master container with a new folder /var on docker-compose.yml no problem

jancelin avatar Mar 20 '18 09:03 jancelin