jancelin / docker-lizmap

docker lizmap
GNU Affero General Public License v3.0
27 stars 21 forks source link

Service non disponible! #41

Open MaxiReglisse opened 6 years ago

MaxiReglisse commented 6 years ago

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 commented 6 years ago

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"
pclastre commented 6 years ago

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

jancelin commented 6 years ago

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

pclastre commented 6 years ago

Here is the docker-compose.yml file

version: '2' services:

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

lizmap: image: jancelin/docker-lizmap:latest restart: always ports:

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:

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

jancelin commented 6 years ago

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

pclastre commented 6 years ago

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.

Service unknown or unsupported
jancelin commented 6 years ago

this is a project made with qgis 2.18?

pclastre commented 6 years ago

no. It was made with the Qgis 2.14

jancelin commented 6 years ago

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

pclastre commented 6 years ago

I have exactly the same error message:

Service unknown or unsupported
pclastre commented 6 years ago

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

jancelin commented 6 years ago

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

pclastre commented 6 years ago

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

jancelin commented 6 years ago

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

pclastre commented 6 years ago

Yes. Otherwise, the project file is not found and i get an error :

Project file error
jancelin commented 6 years ago

try this image jancelin/qgis-server:2.18LTR

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

pclastre commented 6 years ago

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.

MaxiReglisse commented 6 years ago

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...

jancelin commented 6 years ago

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

latest is the master of lizmap.

MaxiReglisse commented 6 years ago

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 commented 6 years ago

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
jancelin commented 6 years ago

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

jancelin commented 6 years ago

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

pclastre commented 6 years ago

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:

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:

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.

MaxiReglisse commented 6 years ago

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/

pclastre commented 6 years ago

Actually, when i try to connect to the lizmap web client, i only enter the address http://:<port_numberhttp://%3cserver_ip%3e:%3cport_number> That’s enough, and apache does the job to complete the URL with : http://:/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 …

jlstanus commented 6 years ago

Me too same issue. Nothing works

jancelin commented 6 years ago

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

jancelin commented 6 years ago

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 commented 6 years ago

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

jlstanus commented 6 years ago

if i have a jauth.db with hundred users, how could i convert it to the new version?