-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
LDAP sync command line does nothing #10933
Comments
Shouldn’t need to though - Snipe-IT v5.4.x works just fine on 7.4. (It’s what we use on the hosted platform, and we run cli crons for customers all the time, so it still feels like something else is weird.) |
I've completely cannibalized the environment several times and this issue ( and others ) remain. The compose file I'm using is below. And there are no logs in This probably a tangent but I'll mention this since it also involves the CLI, I'm also finding it strange that API tokens generated with Artisan aren't able to authenticate API requests. php artisan passport:client --personal --name=ansible-token-1 --user_id=1
# Client ID: 20
# Client secret: hcwPhf9QyK6G7diKGQ3jhGYoQhpzPt0LICoDpOLW
curl -k -X GET -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'Authorization: Bearer hcwPhf9QyK6G7diKGQ3jhGYoQhpzPt0LICoDpOLW' https://snipeit.test.lab/api/v1/users
# {"error":"Unauthorized or unauthenticated."} I'm aware there's passwords in it - this is just a test environment. version: '3.9'
networks:
snipeit_private: {}
services:
snipeit_db:
image: mariadb:10.8
restart: always
environment:
MYSQL_ROOT_PASSWORD: df3094ca3d962d0fcfde7405d565f7bb8d313bbec2e6178ae1bb40ae55a29531
MYSQL_DATABASE: snipeit
MYSQL_USER: snipeit
MYSQL_PASSWORD: 94f624fc7245b93df04ba1a4d0eb38faa60cd2f5edbfa8b05708a3d4626b360c
MYSQL_PORT_3306_TCP_ADDR: snipeit_db
MYSQL_PORT_3306_TCP_PORT: '3306'
networks:
snipeit_private: {}
volumes:
- /home/ansi-5928db17/pod/test/snipeit/mariadb:/var/lib/mysql
healthcheck:
test:
- CMD
- mysqladmin
- ping
- --user=root
- --password=df3094ca3d962d0fcfde7405d565f7bb8d313bbec2e6178ae1bb40ae55a29531
interval: 10s
timeout: 5s
retries: 5
snipeit:
image: linuxserver/snipe-it:5.4.1
depends_on:
snipeit_db:
condition: service_healthy
networks:
snipeit_private: {}
volumes:
- /home/ansi-5928db17/pod/test/snipeit/config:/config
environment:
PUID: '1000'
PGID: '1000'
APP_URL: https://snipeit.test.lab
NGINX_APP_URL: snipeit.test.lab
APP_LOCALE: en
APP_TIMEZONE: US/Eastern
APP_ENV: production
APP_DEBUG: 'false'
MYSQL_PORT_3306_TCP_ADDR: snipeit_db
MYSQL_PORT_3306_TCP_PORT: '3306'
MYSQL_DATABASE: snipeit
MYSQL_USER: snipeit
MYSQL_PASSWORD: 94f624fc7245b93df04ba1a4d0eb38faa60cd2f5edbfa8b05708a3d4626b360c
labels:
- traefik.enable=true
- traefik.http.routers.snipeit.tls=true
- traefik.http.routers.snipeit.entrypoints=websecure
- traefik.http.routers.snipeit.rule=Host(`snipeit.test.lab`)
- traefik.http.routers.snipeit.service=snipeit-svc
- traefik.http.services.snipeit-svc.loadbalancer.server.port=80 |
I've noticed that the command line isn't even connecting to my LDAP server. So I ran This confirms there's nothing attempting to connect to LDAP; which is |
When I inlined several
This comes from app/Console/Commands/LdapSync.php#L68. Without my edits the Where is this info supposed to be shown? [EDIT] Seems that error message is suppressing the original error:
|
I changed my distro to |
Debug mode
Describe the bug
In a fresh instance deployed via docker-compose the command-line LDAP sync does not have any effect or produce any output. Syncing via the web page works correctly and syncs / creates LDAP users as expected.
Here are variations of the commands tried:
Reproduction steps
docker-compose exec
to perform LDAP sync ( commands above )./users
page.Expected behavior
LDAP user's are synced or created when LDAP sync is run via command-line.
Screenshots
Snipe-IT Version
vV5.4.1 - build 6746 (master)
Operating System
Ubuntu / docker
Web Server
NGINX
PHP Version
7.4.26
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: