Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation LDAP Sync #110

Open
Elkanta opened this issue Mar 19, 2024 · 4 comments
Open

Automation LDAP Sync #110

Elkanta opened this issue Mar 19, 2024 · 4 comments

Comments

@Elkanta
Copy link

Elkanta commented Mar 19, 2024

Hello,

I've a problem for automation of user import and synchronization, when I use command I've this error :

sudo php bin/console ldap:synchronize_users
The GLPI codebase has been updated. The update of the GLPI database is necessary.
Run the "php bin/console database:update" command to process to the update.

So when I try to update database I've this error :

php bin/console database:update
Unable to connect to database.
database:update [-u|--allow-unstable] [-s|--skip-db-checks] [-f|--force] [--enable-telemetry] [--no-telemetry]

I've check requirements with command "php bin/console system:check_requirements" and I've all required
I've configure my LDAP on graphic interface, connection is ok. I can import & synch manually users

So I don't know I've this error, maybe it's because it's a docker configuration ?
My GLPI is on version 10.0.13

Regards

@DiouxX
Copy link
Owner

DiouxX commented Mar 19, 2024

Hello,

Have you tried running the database upgrade with the following command :

docker exec glpi php /var/www/html/glpi/bin/console database:update

What is your docker-compose file ?

@Elkanta
Copy link
Author

Elkanta commented Mar 20, 2024

Hello

I've test your command but don't work, I don't have folder /var/www/html/glpi

My docker-compose file is

version: '3.2'

services:
# mariaDB Container
  db:
    image: mariadb:10.11-rc
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
     - ./db:/var/lib/mysql
    ports:
      - 3306:3306

    env_file:
     - ./mariadb.env

#GLPI Container
  app:
    image: diouxx/glpi
    container_name : glpi
    restart: always
    ports:
      - 80:80
    links:
      - db
    volumes:
      - ./data:/var/www/html/glpi

Regards,

@DiouxX
Copy link
Owner

DiouxX commented Mar 21, 2024

You need the /var/www/html/glpi folder because that's where GLPI is installed.
And this is the volume in your docker-compose file.

volumes:
      - ./data:/var/www/html/glpi

Adapt my previous command with the name of your GLPI container

docker exec app php /var/www/html/glpi/bin/console database:update

Are you sure your GLPI container can communicate with your MariaDB container ?

I also notice that you use the link statement in your docker-compose file but it is obsolete (https://docs.docker.com/network/links/) and not necessary in your docker-compose (https://docs.docker.com/compose/networking/#link-containers)

@Elkanta
Copy link
Author

Elkanta commented Mar 21, 2024

Hello,

Yes i understand but in fact I don't have this folder /var/www/html/glpi
I think i've did a mistake during installation but it's works anyway
My GLPI folder is here :

root@myserver:/# ls
bin  boot  dev  docker-compose.yml  etc  glpi 
root@myserver/glpi# ls
data  db  docker-compose.yml  mariadb.env

And yes I think my containers works because my GLPI Works fine

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants