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

Error when Restarting LDAP_SEED_INTERNAL_LDIF_PATH LDAP_SEED_INTERNAL_SCHEMA_PATH /container/run/service/slapd/assets/config/bootstrap/schema/custom #660

Open
ugoevola opened this issue Jul 5, 2023 · 3 comments

Comments

@ugoevola
Copy link

ugoevola commented Jul 5, 2023

version: '3'
services:
  openldap:
    image: osixia/openldap:1.5.0
    container_name: openldap
    hostname: openldap
    restart: unless-stopped
    ports:
      - "389:389"
      - "636:636"
    volumes:
      - /var/lib/ldap
      - /etc/ldap/slapd.d
      - /container/service/slapd/assets/certs/
      - ./assets/openldap/schema:/assets/openldap/custom/schema
      - ./assets/openldap/ldif:/assets/openldap/custom/ldif
    environment:
      LDAP_LOG_LEVEL: "8"
      LDAP_ORGANISATION: "Test"
      LDAP_DOMAIN: "test.com"
      LDAP_BASE_DN: ""
      LDAP_ADMIN_PASSWORD: "admin"
      LDAP_CONFIG_PASSWORD: "config"
      LDAP_READONLY_USER: "false"
      LDAP_RFC2307BIS_SCHEMA: "false"
      LDAP_BACKEND: "mdb"
      LDAP_TLS: "true"
      LDAP_TLS_CRT_FILENAME: "ldap.crt"
      LDAP_TLS_KEY_FILENAME: "ldap.key"
      LDAP_TLS_DH_PARAM_FILENAME: "dhparam.pem"
      LDAP_TLS_CA_CRT_FILENAME: "ca.crt"
      LDAP_TLS_ENFORCE: "false"
      LDAP_TLS_CIPHER_SUITE: "SECURE256:+SECURE128:-VERS-TLS-ALL:+VERS-TLS1.2:-RSA:-DHE-DSS:-CAMELLIA-128-CBC:-CAMELLIA-256-CBC"
      LDAP_TLS_VERIFY_CLIENT: "never"
      LDAP_REPLICATION: "false"
      KEEP_EXISTING_CONFIG: "false"
      LDAP_REMOVE_CONFIG_AFTER_SETUP: "true"
      LDAP_SSL_HELPER_PREFIX: "ldap"
      LDAP_SEED_INTERNAL_LDIF_PATH: "/assets/openldap/custom/ldif"
      LDAP_SEED_INTERNAL_SCHEMA_PATH: "/assets/openldap/custom/schema"
    command: --copy-service
    networks:
      - openldap

When I launch my container for the first time, I get no error, my custom schemas are copied correctly.

However, if I restart my container, I get this error :

Copy from internal path /assets/openldap/custom/schema to /container/run/service/slapd/assets/config/bootstrap/schema/custom
cp: cannot create directory '/container/run/service/slapd/assets/config/bootstrap/schema/custom': No such file or directory
*** ERROR | 2023-07-05 17:27:36 | /container/run/startup/slapd failed with status 1

I have the impression that on first startup the customs files are temporarily copied to the
/container/run/service/slapd/assets/config/bootstrap/schema/custom

that this folder disappears once the ldap base has been configured

Then, if I restart the container, it will no longer find these folders.

@miamilabs
Copy link

Not sure why my comment got deleted twice..

Did you find any solution for this issue, i am fighting this since few days.

I did also try to use command: [ "--loglevel", "warning", "--copy-service" ] and still same issue.

openldap | Copy from internal path /assets/openldap/custom/schema to /container/run/service/slapd/assets/config/bootstrap/schema/custom openldap | cp: cannot create directory '/container/run/service/slapd/assets/config/bootstrap/schema/custom': No such file or directory openldap | *** ERROR | 2023-08-22 11:18:40 | /container/run/startup/slapd failed with status 1

@ugoevola
Copy link
Author

ugoevola commented Sep 5, 2023

no, unfortunately I haven't found anything conclusive...

If you find a solution tell me :(

@jonathanmedd
Copy link

We had the same issue. Got round it by setting the following:

LDAP_REMOVE_CONFIG_AFTER_SETUP=false

Also stopped mounting the schema and ldif files via volumes in docker compose, rather created our own docker image from osixia/openldap:1.5.0 and copying the schema and ldif files into that image.

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

3 participants