[GH-ISSUE #7] Cannot sync to vaultwarden #6

Closed
opened 2026-03-04 00:59:35 +03:00 by kerem · 2 comments
Owner

Originally created by @TheLaskY on GitHub (Aug 19, 2024).
Original GitHub issue: https://github.com/sirtoobii/vaultwarden_ldap_sync/issues/7

When i start the containers, vaultwarden and vaultwarden_ldap_sync, an error happens:

2024-08-19:08:40:44 ERROR [sync.py] Something went wrong. Error: HTTPConnectionPool(host='127.0.0.1', port=80): Max retries exceeded with url: /admin/users (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f63be4e2880>: Failed to establish a new connection: [Errno 111] Connection refused'))

For the development purposes, vaultwarden url is set as http://127.0.0.1:80
Admin Token is set to root
LDAP binding is good.

Here is my docker-compose:

version: "3.1"

services:
  vaultwarden_ldap_sync:
    container_name: vaultwarden_ldap_sync
    build:
      dockerfile: Dockerfile
      context: .
    restart: on-failure
    env_file:
      - .env-ldap
    volumes:
      - "./data/:/data"
  vaultwarden:
    container_name: vaultwarden
    image: vaultwarden/server:latest
    restart: on-failure
    env_file:
      - .env-vault
    ports:
      - 80:80
    volumes:
      - ./vw-data:/data/

Really hope to have some news to this project, never been so close to syncing AD users to vaultwarden!

Originally created by @TheLaskY on GitHub (Aug 19, 2024). Original GitHub issue: https://github.com/sirtoobii/vaultwarden_ldap_sync/issues/7 When i start the containers, vaultwarden and vaultwarden_ldap_sync, an error happens: 2024-08-19:08:40:44 ERROR [sync.py] Something went wrong. Error: HTTPConnectionPool(host='127.0.0.1', port=80): Max retries exceeded with url: /admin/users (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f63be4e2880>: Failed to establish a new connection: [Errno 111] Connection refused')) For the development purposes, vaultwarden url is set as http://127.0.0.1:80 Admin Token is set to root LDAP binding is good. Here is my docker-compose: ```bash version: "3.1" services: vaultwarden_ldap_sync: container_name: vaultwarden_ldap_sync build: dockerfile: Dockerfile context: . restart: on-failure env_file: - .env-ldap volumes: - "./data/:/data" vaultwarden: container_name: vaultwarden image: vaultwarden/server:latest restart: on-failure env_file: - .env-vault ports: - 80:80 volumes: - ./vw-data:/data/ ``` Really hope to have some news to this project, never been so close to syncing AD users to vaultwarden!
kerem 2026-03-04 00:59:35 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sirtoobii commented on GitHub (Aug 19, 2024):

Hey @TheLaskY

This is most likely due to Docker's internal network configuration. You have not set networking mode to "host" and therefore 127.0.0.1 is only valid inside the docker container.
To make it work, you have to set the Vaultwarden URL to something like http://vaultwarden

<!-- gh-comment-id:2296070569 --> @sirtoobii commented on GitHub (Aug 19, 2024): Hey @TheLaskY This is most likely due to Docker's internal network configuration. You have not set networking mode to "host" and therefore `127.0.0.1` is only valid inside the docker container. To make it work, you have to set the Vaultwarden URL to something like `http://vaultwarden`
Author
Owner

@TheLaskY commented on GitHub (Aug 19, 2024):

Hey!
Vacations made me forget about simple things to check, replacing 127.0.0.1 by my private ip works really fine now!

I'm closing this issue :D

<!-- gh-comment-id:2296122349 --> @TheLaskY commented on GitHub (Aug 19, 2024): Hey! Vacations made me forget about simple things to check, replacing 127.0.0.1 by my private ip works really fine now! I'm closing this issue :D
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden_ldap_sync#6
No description provided.