Open smacz42 opened 5 years ago
Hi, start with a fresh folder with only the docker-compose.yml file in it in short.
OK, so there was a different error with that. Keep in mind the first time I thought I had deleted the volumes, but I must have forgotten.
This time I started with a new directory, and after 10 minutes, I am hung at this section:
root@ubuntu-s-1vcpu-2gb-nyc3-01:~/fusiondirectory# ls
docker-compose.yml
root@ubuntu-s-1vcpu-2gb-nyc3-01:~/fusiondirectory# docker-compose up
ERROR: Network nginx-proxy declared as external, but could not be found. Please create the network manually using `docker network create nginx-proxy` and try again.
root@ubuntu-s-1vcpu-2gb-nyc3-01:~/fusiondirectory# vim docker-compose.yml
root@ubuntu-s-1vcpu-2gb-nyc3-01:~/fusiondirectory# docker-compose up
Creating network "fusiondirectory_default" with the default driver
Pulling openldap-fusiondirectory-app (tiredofit/openldap-fusiondirectory:latest)...
latest: Pulling from tiredofit/openldap-fusiondirectory
cd784148e348: Pull complete
8bf1257ea6f6: Pull complete
77cb38e33634: Pull complete
dac31ff48330: Pull complete
c119799e4d2e: Pull complete
a1bb72c464ae: Pull complete
48f7711f36b6: Pull complete
6e923a8050e9: Pull complete
Digest: sha256:a68a971b987d238a673951560388a72d3fa441e94e12a109e06a1308b8acc748
Status: Downloaded newer image for tiredofit/openldap-fusiondirectory:latest
Creating openldap-fusiondirectory-app
Attaching to openldap-fusiondirectory-app
openldap-fusiondirectory-app | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
openldap-fusiondirectory-app | [s6-init] ensuring user provided files have correct perms...exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] applying ownership & permissions fixes...
openldap-fusiondirectory-app | [fix-attrs.d] 01-run: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 01-run: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 01-s6: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 01-s6: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 02-zabbix: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 02-zabbix: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 03-logrotate: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 03-logrotate: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] done.
openldap-fusiondirectory-app | [cont-init.d] executing container initialization scripts...
openldap-fusiondirectory-app | [cont-init.d] 01-permissions: executing...
openldap-fusiondirectory-app | [cont-init.d] 01-permissions: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 02-zabbix: executing...
openldap-fusiondirectory-app | [cont-init.d] 02-zabbix: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 03-cron: executing...
openldap-fusiondirectory-app | **** [cron] Enabling Cron
openldap-fusiondirectory-app | [cont-init.d] 03-cron: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 04-smtp: executing...
openldap-fusiondirectory-app | **** [smtp] Disabling SMTP Features
openldap-fusiondirectory-app | [cont-init.d] 04-smtp: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 09-nginx: executing...
openldap-fusiondirectory-app | [cont-init.d] 09-nginx: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 10-openldap: executing...
openldap-fusiondirectory-app | ** [openldap] First time install detected
openldap-fusiondirectory-app | ** [openldap] Using NIS schema type
openldap-fusiondirectory-app | ** [openldap] Starting OpenLDAP Initialization Sequence
openldap-fusiondirectory-app | ** [openldap] Waiting for OpenLDAP to be ready
root@ubuntu-s-1vcpu-2gb-nyc3-01:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c76498545d2c tiredofit/openldap-fusiondirectory "/init" 10 minutes ago Up 10 minutes 0.0.0.0:389->389/tcp, 80/tcp, 1025/tcp, 8025/tcp, 10050/tcp, 0.0.0.0:636->636/tcp openldap-fusiondirectory-app
OK lets try to get this as close as possible to the way I've run it.
First lets docker network create nginx-proxy
Then, lets set DEBUG_MODE=TRUE
on the environment variables and let's see the whole thing.
If you are unsure about leaking your details online send it over to me privately at dave at tiredofit dot ca.
It looks like it's a DNS issue:
root@ubuntu-s-1vcpu-2gb-nyc3-01:~/fusiondirectory3# docker-compose up
Creating openldap-fusiondirectory-app
Attaching to openldap-fusiondirectory-app
openldap-fusiondirectory-app | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
openldap-fusiondirectory-app | [s6-init] ensuring user provided files have correct perms...exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] applying ownership & permissions fixes...
openldap-fusiondirectory-app | [fix-attrs.d] 01-run: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 01-run: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 01-s6: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 01-s6: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 02-zabbix: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 02-zabbix: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] 03-logrotate: applying...
openldap-fusiondirectory-app | [fix-attrs.d] 03-logrotate: exited 0.
openldap-fusiondirectory-app | [fix-attrs.d] done.
openldap-fusiondirectory-app | [cont-init.d] executing container initialization scripts...
openldap-fusiondirectory-app | [cont-init.d] 01-permissions: executing...
openldap-fusiondirectory-app | + DEBUG_PERMISSIONS=FALSE
openldap-fusiondirectory-app | + ENABLE_PERMISSIONS=TRUE
openldap-fusiondirectory-app | + '[' TRUE = TRUE ']'
openldap-fusiondirectory-app | + varenvusername=(`env | grep USER_ | awk -F= '{print tolower($1)}' | awk -F_ '{print $2}'`)
openldap-fusiondirectory-app | ++ awk ++ -F_ '{print $2}'
openldap-fusiondirectory-app | awk -F= '{print tolower($1)}'
openldap-fusiondirectory-app | ++ grep USER_
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | + varenvuid=(`env | grep USER_ | awk -F= '{print tolower($2)}'`)
openldap-fusiondirectory-app | ++ awk -F= '{print tolower($2)}'
openldap-fusiondirectory-app | ++ grep USER_
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | ++ sed 's/ /\\|/g'
openldap-fusiondirectory-app | ++ echo 'user user'
openldap-fusiondirectory-app | + strusers='user\|user'
openldap-fusiondirectory-app | + [[ ! -z user\|user ]]
openldap-fusiondirectory-app | + varpassuser=(`cat /etc/passwd | grep ^"$strusers" | awk -F: '{print $1}'`)
openldap-fusiondirectory-app | ++ awk -F: '{print $1}'
openldap-fusiondirectory-app | ++ grep '^user\|user'
openldap-fusiondirectory-app | ++ cat /etc/passwd
openldap-fusiondirectory-app | + varpassuserid=(`cat /etc/passwd | grep ^"$strusers" | awk -F: '{print $3}'`)
openldap-fusiondirectory-app | ++ awk -F: '{print $3}'
openldap-fusiondirectory-app | ++ grep '^user\|user'
openldap-fusiondirectory-app | ++ cat /etc/passwd
openldap-fusiondirectory-app | + '[' FALSE = TRUE ']'
openldap-fusiondirectory-app | + '[' FALSE = true ']'
openldap-fusiondirectory-app | + '[' TRUE = TRUE ']'**** [permissions] [debug] Users (varenvusername) from Docker env are: user user
openldap-fusiondirectory-app | **** [permissions] [debug] UIDs (varenvuid) from Docker env are: reader reader
openldap-fusiondirectory-app | **** [permissions] [debug] The string (strusers) used to grep the users is: user\|user
openldap-fusiondirectory-app | **** [permissions] [debug] Users (varpassuser) from /etc/passwd are:
openldap-fusiondirectory-app | **** [permissions] [debug] UIDs (varpassuserid) from /etc/passwd are:
openldap-fusiondirectory-app |
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Users (varenvusername) from Docker env are: user user'
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] UIDs (varenvuid) from Docker env are: reader reader'
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] The string (strusers) used to grep the users is: user\|user'
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Users (varpassuser) from /etc/passwd are: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] UIDs (varpassuserid) from /etc/passwd are: '
openldap-fusiondirectory-app | + counter=0
openldap-fusiondirectory-app | + for i in ${!varenvusername[*]}
openldap-fusiondirectory-app | + for i in ${!varenvusername[*]}
openldap-fusiondirectory-app | + '[' 0 -gt 0 ']'
openldap-fusiondirectory-app | + counter=0
openldap-fusiondirectory-app | + varenvgroupname=(`env | grep ^GROUP_ | grep -v GROUP_ADD_ | awk -F= '{print tolower($1)}' | awk -F_ '{print $2}'`)
openldap-fusiondirectory-app | ++ ++ ++ grep ++ -v GROUP_ADD_awk
openldap-fusiondirectory-app | awk -F_ -F= '{print $2}''{print tolower($1)}'
openldap-fusiondirectory-app |
openldap-fusiondirectory-app | grep '^GROUP_'
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | + varenvgid=(`env | grep ^GROUP_ | grep -v GROUP_ADD_ | awk -F= '{print tolower($2)}'`)
openldap-fusiondirectory-app | ++ awk -F= '{print tolower($2)}'
openldap-fusiondirectory-app | ++ grep -v GROUP_ADD_
openldap-fusiondirectory-app | ++ grep '^GROUP_'
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | ++ sed 's/ /\\|/g'
openldap-fusiondirectory-app | ++ echo ''
openldap-fusiondirectory-app | + strgroups=
openldap-fusiondirectory-app | + [[ ! -z '' ]]
openldap-fusiondirectory-app | + '[' FALSE = TRUE ']'
openldap-fusiondirectory-app | + '[' FALSE = true ']'
openldap-fusiondirectory-app | + '[' TRUE = TRUE ']'
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Group names (varenvgroupname) from Docker environment settings are: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] GIDs (grvarenvgid) from Docker environment settings are: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] The string (strgroup) used to grep the groups is: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Group names (vargroupname) from /etc/group are: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] GIDs (vargroupid) from /etc/group are: '
openldap-fusiondirectory-app | + '[' 0 -gt 0 ']'
openldap-fusiondirectory-app | + counter=0
openldap-fusiondirectory-app | + varenvuser2add=(`env | grep ^GROUP_ADD_ | awk -F= '{print $1}' | awk -F_ '{print tolower($3)}'`)
openldap-fusiondirectory-app | **** [permissions] [debug] Group names (varenvgroupname) from Docker environment settings are:
openldap-fusiondirectory-app | **** [permissions] [debug] GIDs (grvarenvgid) from Docker environment settings are:
openldap-fusiondirectory-app | **** [permissions] [debug] The string (strgroup) used to grep the groups is:
openldap-fusiondirectory-app | **** [permissions] [debug] Group names (vargroupname) from /etc/group are:
openldap-fusiondirectory-app | **** [permissions] [debug] GIDs (vargroupid) from /etc/group are:
openldap-fusiondirectory-app | ++ ++ awk -F_ '{print tolower($3)}'
openldap-fusiondirectory-app | awk -F= '{print $1}'
openldap-fusiondirectory-app | ++ grep '^GROUP_ADD_'
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | + varenvdestgroup=(`env | grep ^GROUP_ADD_ | awk -F= '{print tolower($2)}'`)
openldap-fusiondirectory-app | ++ awk -F= '{print tolower($2)}'
openldap-fusiondirectory-app | ++ grep '^GROUP_ADD_'
openldap-fusiondirectory-app | ++ env
openldap-fusiondirectory-app | + '[' FALSE = TRUE ']'
openldap-fusiondirectory-app | + '[' FALSE = true ']'
openldap-fusiondirectory-app | + '[' TRUE **** [permissions] [debug] Users (varenvuser2add) to add to groups are:
openldap-fusiondirectory-app | **** [permissions] [debug] Groups (varenvdestgroup) to add users are:
openldap-fusiondirectory-app | = TRUE ']'
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Users (varenvuser2add) to add to groups are: '
openldap-fusiondirectory-app | + echo '**** [permissions] [debug] Groups (varenvdestgroup) to add users are: '
openldap-fusiondirectory-app | + mkdir -p /tmp/state
openldap-fusiondirectory-app | ++ basename /var/run/s6/etc/cont-init.d/01-permissions
openldap-fusiondirectory-app | + touch /tmp/state/01-permissions-init
openldap-fusiondirectory-app | [cont-init.d] 01-permissions: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 02-zabbix: executing...
openldap-fusiondirectory-app | [cont-init.d] 02-zabbix: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 03-cron: executing...
openldap-fusiondirectory-app | **** [cron] Enabling Cron
openldap-fusiondirectory-app | [cont-init.d] 03-cron: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 04-smtp: executing...
openldap-fusiondirectory-app | **** [smtp] [debug] SMTP Mailcatcher Enabled at Port 1025, Visit http://127.0.0.1:8025 for Web Interface
openldap-fusiondirectory-app | **** [smtp] Disabling SMTP Features
openldap-fusiondirectory-app | [cont-init.d] 04-smtp: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 09-nginx: executing...
openldap-fusiondirectory-app | [cont-init.d] 09-nginx: exited 0.
openldap-fusiondirectory-app | [cont-init.d] 10-openldap: executing...
openldap-fusiondirectory-app | + set -e
openldap-fusiondirectory-app | + set -o pipefail
openldap-fusiondirectory-app | + ulimit -n 1024
openldap-fusiondirectory-app | + '[' -d /var/lib/openldap ']'
openldap-fusiondirectory-app | + '[' -d /etc/openldap/slapd.d ']'
openldap-fusiondirectory-app | + '[' -d /assets/state ']'
openldap-fusiondirectory-app | + mkdir -p /assets/state/
openldap-fusiondirectory-app | + chown -R ldap:ldap /var/lib/openldap
openldap-fusiondirectory-app | + chown -R ldap:ldap /etc/openldap
openldap-fusiondirectory-app | + chown -R ldap:ldap /assets/slapd
openldap-fusiondirectory-app | + FIRST_START_DONE=/assets/state/slapd-first-start-done
openldap-fusiondirectory-app | + WAS_STARTED_WITH_TLS=/etc/openldap/slapd.d/docker-openldap-was-started-with-tls
openldap-fusiondirectory-app | + WAS_STARTED_WITH_TLS_ENFORCE=/etc/openldap/slapd.d/docker-openldap-was-started-with-tls-enforce
openldap-fusiondirectory-app | + WAS_STARTED_WITH_REPLICATION=/etc/openldap/slapd.d/docker-openldap-was-started-with-replication
openldap-fusiondirectory-app | + TLS_CA_CRT_PATH=/assets/slapd/certs/ca.pem
openldap-fusiondirectory-app | + TLS_CRT_PATH=/assets/slapd/certs/cert.pem
openldap-fusiondirectory-app | + TLS_KEY_PATH=/assets/slapd/certs/key.pem
openldap-fusiondirectory-app | + TLS_DH_PARAM_PATH=/assets/slapd/certs/dhparam.pem
openldap-fusiondirectory-app | + '[' '!' -e /assets/state/slapd-first-start-done ']'
openldap-fusiondirectory-app | + NEW_INSTALL=false
openldap-fusiondirectory-app | ++ ls -A -I lost+found /var/lib/openldap
openldap-fusiondirectory-app | + '[' -z '' ']'
openldap-fusiondirectory-app | ++ ls -A -I lost+found /etc/openldap/slapd.d
openldap-fusiondirectory-app | + '[' -z '' ']'
openldap-fusiondirectory-app | + NEW_INSTALL=true
openldap-fusiondirectory-app | + echo '** [openldap] First time install detected'
openldap-fusiondirectory-app | ** [openldap] First time install detected
openldap-fusiondirectory-app | + ** [openldap] Using NIS schema type
openldap-fusiondirectory-app | '[' nis = rfc2307bis ']'
openldap-fusiondirectory-app | + '[' nis = RFC2307BIS ']'
openldap-fusiondirectory-app | + echo '** [openldap] Using NIS schema type'
openldap-fusiondirectory-app | + SCHEMA_TYPE=nis
openldap-fusiondirectory-app | + get_ldap_base_dn
openldap-fusiondirectory-app | + '[' -z dc=example,dc=org ']'
openldap-fusiondirectory-app | + cat
openldap-fusiondirectory-app | ++ slappasswd -s config
openldap-fusiondirectory-app | ++ slappasswd -s admin
openldap-fusiondirectory-app | + set +e
openldap-fusiondirectory-app | + /usr/bin/schema2ldif /etc/openldap/schema/core.schema
openldap-fusiondirectory-app | + /usr/bin/schema2ldif /etc/openldap/schema/cosine.schema
openldap-fusiondirectory-app | + /usr/bin/schema2ldif /etc/openldap/schema/inetorgperson.schema
openldap-fusiondirectory-app | + /usr/bin/schema2ldif /etc/openldap/schema/nis.schema
openldap-fusiondirectory-app | + silent slapadd -n 0 -F /etc/openldap/slapd.d -l /tmp/slapd.ldif
openldap-fusiondirectory-app | + '[' TRUE = TRUE ']'
openldap-fusiondirectory-app | + slapadd -n 0 -F /etc/openldap/slapd.d -l /tmp/slapd.ldif
openldap-fusiondirectory-app | + rm -rf /tmp/slapd.ldif
openldap-fusiondirectory-app | + set -e
openldap-fusiondirectory-app | + chown -R ldap:ldap /etc/openldap
openldap-fusiondirectory-app | + '[' mdb = mdb ']'
openldap-fusiondirectory-app | + '[' -e '/etc/openldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif' ']'
openldap-fusiondirectory-app | + '[' '' == true ']'
openldap-fusiondirectory-app | + PREVIOUS_HOSTNAME_PARAM=
openldap-fusiondirectory-app | + '[' -e /etc/openldap/slapd.d/docker-openldap-was-started-with-replication ']'
openldap-fusiondirectory-app | + '[' -e /etc/openldap/slapd.d/docker-openldap-was-started-with-tls ']'
openldap-fusiondirectory-app | + set +e
openldap-fusiondirectory-app | ++ ++ ++ ++ tr awk '\n' '!a[$0]++'' '
openldap-fusiondirectory-app |
openldap-fusiondirectory-app | sed 's/ / /g'
openldap-fusiondirectory-app | awk '!a[$0]++'++
openldap-fusiondirectory-app | awk -F binddn '{ print $1 }'
openldap-fusiondirectory-app | ++ awk -F '[//]' '{ print $3 }'
openldap-fusiondirectory-app | ++ grep -o -h 'provider=ldap.*//.*.' '/etc/openldap/slapd.d/cn=config/olcDatabase={-1}frontend.ldif' '/etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif' '/etc/openldap/slapd.d/cn=config/olcDatabase={1}mdb.ldif' '/etc/openldap/slapd.d/cn=config/olcDatabase={2}monitor.ldif'
openldap-fusiondirectory-app | + replhosts_sanity=
openldap-fusiondirectory-app | + '[' '!' -z '' ']'
openldap-fusiondirectory-app | + echo '** [openldap] Starting OpenLDAP Initialization Sequence'
openldap-fusiondirectory-app | ** [openldap] Starting OpenLDAP Initialization Sequence
openldap-fusiondirectory-app | + echo '** [openldap] Waiting for OpenLDAP to be ready'
openldap-fusiondirectory-app | ** [openldap] Waiting for OpenLDAP to be ready
openldap-fusiondirectory-app | + '[' '!' -e /run/openldap/slapd.pid ']'
openldap-fusiondirectory-app | + sleep 0.1
openldap-fusiondirectory-app | + silent slapd -h 'ldap://ldap.example.com ldapi:///' -u ldap -g ldap -d 256
openldap-fusiondirectory-app | + '[' TRUE = TRUE ']'
openldap-fusiondirectory-app | + slapd -h 'ldap://ldap.example.com ldapi:///' -u ldap -g ldap -d 256
openldap-fusiondirectory-app | 5cb0918e @(#) $OpenLDAP: slapd 2.4.47 (Mar 29 2019 08:54:35) $
openldap-fusiondirectory-app | @6c16896b5f57:/tiredofit/openldap:6.4/servers/slapd
openldap-fusiondirectory-app | 5cb0918e daemon: getaddrinfo() failed: Name does not resolve
openldap-fusiondirectory-app | 5cb0918e slapd stopped.
openldap-fusiondirectory-app | 5cb0918e connections_destroy: nothing to destroy.
openldap-fusiondirectory-app | + '[' '!' -e /run/openldap/slapd.pid ']'
openldap-fusiondirectory-app | + sleep 0.1
openldap-fusiondirectory-app | + '[' '!' -e /run/openldap/slapd.pid ']'
If that's it, feel free to close the issue.
I had a tonne of fun with this back when I was building this a couple years ago. Can you make sure that you have your hostname: and domainname: populated in your docker-compose? I should have been doing a hack somewhere in that initialization to populate /etc/hosts with whatever domain name you have entered in there.
On our production systems I have the following: hostname: hostname.domainname.tld
and in environment: HOSTNAME=hostname.domainname.tld
Let me know if populating both with something will help, otherwise I need to think back and review as to why this isn't working for you. It should definitely work even not connected to the internet or using false domain data.
When running
docker-compose up
on the https://github.com/tiredofit/docker-openldap-fusiondirectory/blob/master/examples/docker-compose.yml file, I get the following error:All subsequent operations against the ldap server fails.