3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
254 stars 143 forks source link

[Bug]: jelix table doesnt exist when starting up container #3698

Closed lykaios closed 12 months ago

lykaios commented 1 year ago

What is the bug?

I am attempting to setup lizmap 3.6 within the docker-compose stack provided here: https://github.com/3liz/lizmap-docker-compose

Although I am able to connect to the Postgres database (so I know credentials are good), there seems to be an issue creating the admin user.

I tried deleting the postgres volume and completely reinitializing the database, no luck. Can you please advise? ### Steps to reproduce the issue Pull code from repository, configure Postgres database, init database (create role + db), try to start up stack. ### Versions 3.6 ### 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.22 ### Operating system Ubuntu 20.04 ### Browsers Firefox, Chrome ### Browsers version Chrominium 113.xx ### Relevant log output ```shell lizmap container: trying to connect to the Postgresql database lizmap at postgres with the profile default... Ok, Postgresql is alive. Set files rights Launch installer Installation is starting All modules dependencies are ok Installation starts All modules are installed or upgraded Installation is finished Clean temp Setup config php-fpm Create the account for admin default logic 2023-05-22 08:52:50 [2] pg_query(): Query failed: ERROR: relation "jlx_user" does not exist LINE 1: ...", "usr"."request_date", "usr"."create_date" FROM "jlx_user"... ^ /www/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 207 2023-05-22 08:52:50 [403] invalid query (ERROR: relation "jlx_user" does not exist LINE 1: ...", "usr"."request_date", "usr"."create_date" FROM "jlx_user"... ^(SELECT "usr"."usr_login" as "login", "usr"."usr_email" as "email", "usr"."usr_password" as "password", "usr"."firstname", "usr"."lastname", "usr"."organization", "usr"."phonenumber", "usr"."street", "usr"."postcode", "usr"."city", "usr"."country", "usr"."comment", "usr"."status", "usr"."keyactivate", "usr"."request_date", "usr"."create_date" FROM "jlx_user" AS "usr" WHERE "usr"."usr_login" = 'admin' LIMIT 1 OFFSET 0)) /www/lizmap/vendor/jelix/jelix/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 210 ```
nworr commented 1 year ago

There may be a problem during docker initialisation (lizmap installation don't perform completely, speciallay the db installation). Within the folder where you copy the lizmap-docker-compose files, there must be a folder "lizmap" , can you try and remove it , or simply do a configure.sh clean in order to force un clean install ?

lykaios commented 1 year ago

hi @nworr thanks for your feedback.

Let me give that a whirl and get back to you.

Its relevant to note, we are using an existing postgres container (we are trying to integration into a stack we have, rather than create a separate one). However, I did include the "init" script which creates the "lizmap" database and that definitely works correctly.

lykaios commented 1 year ago

Ok, so I took a peek into configure.sh and it looks like all clean does is delete .../var and a few other install directories.

I suspect its something to do with the config in there - can you explain which one of the ini files controls the db setup?

Also, more generally, the container-stack design doesn't quite align with industry standards for Docker/Distributed systems... Are you guys concentrating any resources there or is it pure open source contributions?

Gustry commented 1 year ago

Also, more generally, the container-stack design doesn't quite align with industry standards for Docker/Distributed systems... Are you guys concentrating any resources there or is it pure open source contributions?

Can you elaborate a few things quickly? Maybe @dmarteau will have some ideas.

If you think it's needed, feel free to provide a PR. Step by step

3liz-bot commented 1 year ago

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

lykaios commented 1 year ago

You can go ahead and close this as I don't have time to do an infrastructure fundamentals; cheers!

3liz-bot commented 1 year ago

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