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

Container start fails "sed: can't read /container/service/slapd/assets/config/..." #605

Open
damianon opened this issue Jan 16, 2022 · 0 comments

Comments

@damianon
Copy link

damianon commented Jan 16, 2022

When trying to start the openldap server with this docker-compose, it fails.
The volumes mounted for the server are all empty when it starts, so there is no leftover config.
Also the two files it cannot find are not in any mounted path anyways.

docker-compose.yml

version: "3.9"

services:
  openldap:
    image: osixia/openldap:1.5.0
    container_name: {{ container_name }}
    restart: always
    ports: 
      - "389:389"
      - "636:636"
    volumes:
      - "{{ docker_dir }}/openldap/database:/var/lib/ldap"
      - "{{ docker_dir }}/openldap/config:/etc/ldap/slapd.d"
      - "{{ docker_dir }}/openldap/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom"
    environment:
      - LDAP_ORGANISATION="LocalDomain"
      - LDAP_DOMAIN=example.com
      - "LDAP_BASE_DN=dc=example,dc=com"
      - LDAP_REPLICATION=false
      - LDAP_ADMIN_PASSWORD={{ ldap_password }}
      - LDAP_TLS=false
      - LDAP_OPENLDAP_UID={{ uid }}
      - LDAP_OPENLDAP_GID={{ gid }}
      - LDAP_READONLY_USER="false"

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openldap.rule=Host(`{{ openldap_subdomain }}.{{ hostname }}`)"
      - "traefik.http.routers.openldap.entrypoints=websecure"
      - "traefik.http.routers.openldap.tls=true"
      - "traefik.http.services.openldap.loadbalancer.server.port=389"

      - "traefik.docker.network=traefik-nw"
    networks:
      - traefik-nw
      - openldap
    
  openldap-admin:
    container_name: "{{ container_name }}-admin"
    image: osixia/phpldapadmin:0.9.0
    restart: unless-stopped
    depends_on:
      - openldap
    environment:
      - PHPLDAPADMIN_LDAP_HOSTS=openldap
      - PHPLDAPADMIN_HTTPS=false
      - PHPLDAPADMIN_TRUST_PROXY_SSL=true
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openldap-admin.rule=Host(`{{ openldap_subdomain }}-admin.{{ hostname }}`)"
      - "traefik.http.routers.openldap-admin.entrypoints=websecure"
      - "traefik.http.routers.openldap-admin.tls=true"
      
      - "traefik.docker.network=traefik-nw"
    networks:
      - traefik-nw
      - openldap
    
networks:
  traefik-nw:
    name: traefik-nw
    external: true
  openldap:
    driver: bridge

Error:

*** WARNING | 2022-01-16 11:17:30 | failed to link /container/service/slapd/process.sh to /container/run/process/slapd/run : [Errno 17] File exists: '/container/service/slapd/process.sh' -> '/container/run/process/slapd/run'
***  INFO   | 2022-01-16 11:17:30 | Environment files will be proccessed in this order : 
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
***  INFO   | 2022-01-16 11:17:30 | Running /container/run/startup/:ssl-tools...
***  INFO   | 2022-01-16 11:17:31 | Running /container/run/startup/slapd...
***  INFO   | 2022-01-16 11:17:31 | openldap user and group adjustments
***  INFO   | 2022-01-16 11:17:31 | get current openldap uid/gid info inside container
***  INFO   | 2022-01-16 11:17:31 | -------------------------------------
***  INFO   | 2022-01-16 11:17:31 | openldap GID/UID
***  INFO   | 2022-01-16 11:17:31 | -------------------------------------
***  INFO   | 2022-01-16 11:17:31 | User uid: 1000
***  INFO   | 2022-01-16 11:17:31 | User gid: 100
***  INFO   | 2022-01-16 11:17:31 | uid/gid changed: false
***  INFO   | 2022-01-16 11:17:31 | -------------------------------------
***  INFO   | 2022-01-16 11:17:31 | updating file uid/gid ownership
***  INFO   | 2022-01-16 11:17:31 | Start OpenLDAP...
***  INFO   | 2022-01-16 11:17:31 | Waiting for OpenLDAP to start...
***  INFO   | 2022-01-16 11:17:31 | Disable replication config...
sed: can't read /container/service/slapd/assets/config/replication/replication-disable.ldif: No such file or directory
sed: can't read /container/service/slapd/assets/config/admin/root-password-change.ldif: No such file or directory
***  ERROR  | 2022-01-16 11:17:31 | /container/run/startup/slapd failed with status 2

***  INFO   | 2022-01-16 11:17:31 | Killing all processes...
***  INFO   | 2022-01-16 11:18:32 | CONTAINER_LOG_LEVEL = 3 (info)
***  INFO   | 2022-01-16 11:18:32 | Search service in CONTAINER_SERVICE_DIR = /container/service :
***  INFO   | 2022-01-16 11:18:32 | link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*** WARNING | 2022-01-16 11:18:32 | failed to link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools: [Errno 17] File exists: '/container/service/:ssl-tools/startup.sh' -> '/container/run/startup/:ssl-tools'
***  INFO   | 2022-01-16 11:18:32 | link /container/service/slapd/startup.sh to /container/run/startup/slapd
*** WARNING | 2022-01-16 11:18:32 | failed to link /container/service/slapd/startup.sh to /container/run/startup/slapd: [Errno 17] File exists: '/container/service/slapd/startup.sh' -> '/container/run/startup/slapd'
***  INFO   | 2022-01-16 11:18:32 | link /container/service/slapd/process.sh to /container/run/process/slapd/run
*** WARNING | 2022-01-16 11:18:32 | directory /container/run/process/slapd already exists
*** WARNING | 2022-01-16 11:18:32 | failed to link /container/service/slapd/process.sh to /container/run/process/slapd/run : [Errno 17] File exists: '/container/service/slapd/process.sh' -> '/container/run/process/slapd/run'
***  INFO   | 2022-01-16 11:18:32 | Environment files will be proccessed in this order : 
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
***  INFO   | 2022-01-16 11:18:32 | Running /container/run/startup/:ssl-tools...
***  INFO   | 2022-01-16 11:18:32 | Running /container/run/startup/slapd...
***  INFO   | 2022-01-16 11:18:32 | openldap user and group adjustments
***  INFO   | 2022-01-16 11:18:32 | get current openldap uid/gid info inside container
***  INFO   | 2022-01-16 11:18:32 | -------------------------------------
***  INFO   | 2022-01-16 11:18:32 | openldap GID/UID
***  INFO   | 2022-01-16 11:18:32 | -------------------------------------
***  INFO   | 2022-01-16 11:18:32 | User uid: 1000
***  INFO   | 2022-01-16 11:18:32 | User gid: 100
***  INFO   | 2022-01-16 11:18:32 | uid/gid changed: false
***  INFO   | 2022-01-16 11:18:32 | -------------------------------------
***  INFO   | 2022-01-16 11:18:32 | updating file uid/gid ownership
***  INFO   | 2022-01-16 11:18:32 | Start OpenLDAP...
***  INFO   | 2022-01-16 11:18:32 | Waiting for OpenLDAP to start...
***  INFO   | 2022-01-16 11:18:32 | Disable replication config...
sed: can't read /container/service/slapd/assets/config/replication/replication-disable.ldif: No such file or directory
sed: can't read /container/service/slapd/assets/config/admin/root-password-change.ldif: No such file or directory
***  ERROR  | 2022-01-16 11:18:32 | /container/run/startup/slapd failed with status 2

***  INFO   | 2022-01-16 11:18:32 | Killing all processes...
***  INFO   | 2022-01-16 11:19:33 | CONTAINER_LOG_LEVEL = 3 (info)
***  INFO   | 2022-01-16 11:19:33 | Search service in CONTAINER_SERVICE_DIR = /container/service :
***  INFO   | 2022-01-16 11:19:33 | link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*** WARNING | 2022-01-16 11:19:33 | failed to link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools: [Errno 17] File exists: '/container/service/:ssl-tools/startup.sh' -> '/container/run/startup/:ssl-tools'
***  INFO   | 2022-01-16 11:19:33 | link /container/service/slapd/startup.sh to /container/run/startup/slapd
*** WARNING | 2022-01-16 11:19:33 | failed to link /container/service/slapd/startup.sh to /container/run/startup/slapd: [Errno 17] File exists: '/container/service/slapd/startup.sh' -> '/container/run/startup/slapd'
***  INFO   | 2022-01-16 11:19:33 | link /container/service/slapd/process.sh to /container/run/process/slapd/run
*** WARNING | 2022-01-16 11:19:33 | directory /container/run/process/slapd already exists
*** WARNING | 2022-01-16 11:19:33 | failed to link /container/service/slapd/process.sh to /container/run/process/slapd/run : [Errno 17] File exists: '/container/service/slapd/process.sh' -> '/container/run/process/slapd/run'
***  INFO   | 2022-01-16 11:19:33 | Environment files will be proccessed in this order : 
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
***  INFO   | 2022-01-16 11:19:33 | Running /container/run/startup/:ssl-tools...
***  INFO   | 2022-01-16 11:19:33 | Running /container/run/startup/slapd...
***  INFO   | 2022-01-16 11:19:33 | openldap user and group adjustments
***  INFO   | 2022-01-16 11:19:33 | get current openldap uid/gid info inside container
***  INFO   | 2022-01-16 11:19:33 | -------------------------------------
***  INFO   | 2022-01-16 11:19:33 | openldap GID/UID
***  INFO   | 2022-01-16 11:19:33 | -------------------------------------
***  INFO   | 2022-01-16 11:19:33 | User uid: 1000
***  INFO   | 2022-01-16 11:19:33 | User gid: 100
***  INFO   | 2022-01-16 11:19:33 | uid/gid changed: false
***  INFO   | 2022-01-16 11:19:33 | -------------------------------------
***  INFO   | 2022-01-16 11:19:33 | updating file uid/gid ownership
***  INFO   | 2022-01-16 11:19:33 | Start OpenLDAP...
***  INFO   | 2022-01-16 11:19:34 | Waiting for OpenLDAP to start...
***  INFO   | 2022-01-16 11:19:34 | Disable replication config...
sed: can't read /container/service/slapd/assets/config/replication/replication-disable.ldif: No such file or directory
sed: can't read /container/service/slapd/assets/config/admin/root-password-change.ldif: No such file or directory
***  ERROR  | 2022-01-16 11:19:34 | /container/run/startup/slapd failed with status 2

***  INFO   | 2022-01-16 11:19:34 | Killing all processes...
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

1 participant