fametec / glpi

GLPI Docker Container
https://hub.docker.com/r/fametec/glpi
GNU General Public License v3.0
67 stars 63 forks source link

Stuck with "error accessing config table" #46

Open jlgarnier opened 2 years ago

jlgarnier commented 2 years ago

Hi all, I'm trying to give a run with this tool and used Portainer to create a new stack with the config file hereunder:

# from https://github.com/fametec/glpi

version: "3.5"
services:

# GLPI
    glpi: 
        image: fametec/glpi:latest
        container_name: glpi-app
        restart: unless-stopped
        volumes: 
          - glpi-volume-files:/var/www/html/files:rw
          - glpi-volume-plugins:/var/www/html/plugins:rw
          - glpi-volume-config:/var/www/html/config:rw
        environment: 
          GLPI_LANG: fr_FR
          MARIADB_HOST: mariadb-glpi
          MARIADB_PORT: 3307
          MARIADB_DATABASE: glpi
          MARIADB_USER: glpi-user
          MARIADB_PASSWORD: glpipwd
          VERSION: "9.5.6"
          PLUGINS: "all"
        depends_on: 
          - mariadb-glpi
        ports: 
          - 14000:80
          - 14443:443
        networks: 
          - glpi-frontend
          - glpi-backend

# MARIADB
    mariadb-glpi: 
        image: docker.io/mariadb:latest
        container_name: glpi-db
        restart: unless-stopped
        volumes: 
          - glpi-volume-mariadb:/var/lib/mysql:rw
        environment: 
          MYSQL_DATABASE: glpi
          MYSQL_USER: glpi-user 
          MYSQL_PASSWORD: glpipwd
          MYSQL_RANDOM_ROOT_PASSWORD: 1
        ports: 
          - 3307:3306
        networks: 
          - glpi-backend

# CRON
    crond: 
        image: fametec/crond-glpi:latest
        container_name: glpi-cron
        restart: unless-stopped
        depends_on:
          - glpi
          - mariadb-glpi
        environment: 
          MARIADB_HOST: mariadb-glpi
          MARIADB_PORT: 3307
          MARIADB_DATABASE: glpi
          MARIADB_USER: glpi-user
          MARIADB_PASSWORD: glpipwd
        volumes: 
          - glpi-volume-files:/var/www/html/files:rw
          - glpi-volume-plugins:/var/www/html/plugins:rw
        networks: 
          - glpi-backend

# VOLUMES
volumes: 
  glpi-volume-files:
  glpi-volume-plugins:
  glpi-volume-config:
  glpi-volume-mariadb: 

# NETWORKS
networks: 
  glpi-frontend: 
  glpi-backend:

which is pretty close to the docker-compose.yml you propose. Unfortunately, if the stack deploys smoothly, I just can't access the GUI, getting this "Error accessing config table" error.

Logs of the cron service says:

log_it: (CRON 7) INFO (RANDOM_DELAY will be scaled with factor 50% if used.)

log_it: (CRON 7) INFO (running with inotify support)

log_it: (root 11) CMD (/usr/bin/php -c /etc/php.ini /var/www/html/front/cron.php --forcequeudnotification )

log_it: (root 12) CMD (/usr/bin/php -c /etc/php.ini /var/www/html/front/cron.php )

log_it: (root 13) CMD (/usr/bin/php -c /etc/php.ini /var/www/html/front/cron.php --forcemailgate)

log_it: (root 8) CMDOUT (PHP Warning:  mysqli::real_connect(): (HY000/2002): Connection refused in /var/www/html/inc/dbmysql.class.php on line 185)

log_it: (root 8) CMDOUT (A link to the SQL server could not be established. Please check your configuration.)

log_it: (root 8) CMDOUT (Le serveur Mysql est inaccessible. Vérifiez votre configuration.)

indicating that the DB server is not accessible and I just can't find where I'm wrong... 🤔 DB and GLPI look fine, no error in their logs.

Any helping hand would be welcome!