bloxx
bloxx

Reputation: 123

389ds docker container crashes: Unable to find PID of ns-slapd process

I'm trying to use the 389ds directory server. Unfortunately, it crashes about 30 seconds after startup. Here is the MWE:

docker run 389ds/dirsrv:2.1

The error message I get is:

Unable to find pid (/data/run/slapd-localhost.pid) of ns-slapd process

After having tried several debugging attempts, I am out of ideas now. Does anyone have an idea why this crashes or what I could try to investigate the problem effectively?

Debugging attempts

While the container was still running, I used docker exec to enter a shell in the container and used ps to check whether the ns-slapd was still running. It was running in the beginning but seemed to stop or crash at some point.

However, I was not able to find the source of the problem.

It seems strange to me that the very same container image works like a charm on the computer of a friend of mine.

Logs

INFO: The 389 Directory Server Container Bootstrap
INFO: Inspired by works of: ITS, The University of Adelaide
INFO: 389 Directory Server Version: 2.1.11
INFO: Initialising 389-ds-container due to empty volume ... 
DEBUG: Running setup with verbose
DEBUG: START: Starting installation ... 
DEBUG: READY: Preparing installation for localhost...
INFO: Validate installation settings ... 
DEBUG: PASSED: using config settings 999999999
DEBUG: PASSED: user / group checking
DEBUG: PASSED: prefix checking
DEBUG: list() localhost instance not found: missing /etc/dirsrv/slapd-localhost/dse.ldif

DEBUG: PASSED: instance checking
DEBUG: INFO: temp root password set to XQ1yfxlIKXCrI2Y5cYAyRKG3ouewNWy4Fsz16rqvKpav99iRPezd.rsidz4BOjUEf
DEBUG: PASSED: root user checking
DEBUG: PASSED: network avaliability checking
DEBUG: READY: Beginning installation for localhost...
DEBUG: ACTION: Creating dse.ldif
DEBUG: Container detected setting db home directory to db directory.
INFO: Create file system structures ... 
DEBUG: ACTION: creating /data/bak
DEBUG: ACTION: creating /etc/dirsrv/slapd-localhost
DEBUG: ACTION: creating /data/db
DEBUG: ACTION: creating /data/db
DEBUG: ACTION: creating /data/ldif
DEBUG: ACTION: creating /data/run/lock
DEBUG: ACTION: creating /data/logs
DEBUG: ACTION: creating /data/run
DEBUG: ACTION: Creating certificate database is /etc/dirsrv/slapd-localhost
DEBUG: Allocate <class 'lib389.DirSrv'> with None
DEBUG: Allocate <class 'lib389.DirSrv'> with /data/run/slapd-localhost.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with localhost:3389
DEBUG: Allocate <class 'lib389.DirSrv'> with localhost:3389
DEBUG: nss cmd: /usr/bin/certutil -N -d /etc/dirsrv/slapd-localhost -f /etc/dirsrv/slapd-localhost/pwdfile.txt -@ /etc/dirsrv/slapd-localhost/pwdfile.txt
DEBUG: nss output: 
INFO: Create self-signed certificate database ... 
DEBUG: nss cmd: /usr/bin/certutil -N -d /etc/dirsrv/ssca/ -f /etc/dirsrv/ssca//pwdfile.txt -@ /etc/dirsrv/ssca//pwdfile.txt
DEBUG: nss output:
DEBUG: nss cmd: /usr/bin/certutil -S -n Self-Signed-CA -s CN=ssca.389ds.example.com,O=testing,L=389ds,ST=Queensland,C=AU -x -g 4096 -t CT,, -v 24 -2 --keyUsage certSigning -d /etc/dirsrv/ssca/ -z /etc/dirsrv/ssca//noise.txt -f /etc/dirsrv/ssca//pwdfile.txt
DEBUG: nss output: Is this a CA certificate [y/N]?
Enter the path length constraint, enter to skip [<0 for unlimited path]: > Is this a critical extension [y/N]?

DEBUG: nss cmd: /usr/bin/certutil -L -n Self-Signed-CA -d /etc/dirsrv/ssca/ -a
DEBUG: nss cmd: /usr/bin/openssl rehash /etc/dirsrv/ssca/
DEBUG: CSR subject -> CN=5d33ff7d9d7b,givenName=51269bd0-be73-4d45-b2a6-b80317ecf78a,O=testing,L=389ds,ST=Queensland,C=AU
DEBUG: CSR alt_names -> ['5d33ff7d9d7b']
DEBUG: nss cmd: /usr/bin/certutil -R --keyUsage digitalSignature,nonRepudiation,keyEncipherment,dataEncipherment --nsCertType sslClient,sslServer --extKeyUsage clientAuth,serverAuth -s CN=5d33ff7d9d7b,givenName=51269bd0-be73-4d45-b2a6-b80317ecf78a,O=testing,L=389ds,ST=Queensland,C=AU -8 5d33ff7d9d7b -g 4096 -d /etc/dirsrv/slapd-localhost -z /etc/dirsrv/slapd-localhost/noise.txt -f /etc/dirsrv/slapd-localhost/pwdfile.txt -a -o /etc/dirsrv/slapd-localhost/Server-Cert.csr
DEBUG: nss cmd: /usr/bin/certutil -C -d /etc/dirsrv/ssca/ -f /etc/dirsrv/ssca//pwdfile.txt -v 24 -a -i /etc/dirsrv/slapd-localhost/Server-Cert.csr -o /etc/dirsrv/slapd-localhost/Server-Cert.crt -c Self-Signed-CA
DEBUG: nss cmd: /usr/bin/openssl rehash /etc/dirsrv/slapd-localhost
DEBUG: nss cmd: /usr/bin/certutil -A -n Self-Signed-CA -t CT,, -a -i /etc/dirsrv/slapd-localhost/ca.crt -d /etc/dirsrv/slapd-localhost -f /etc/dirsrv/slapd-localhost/pwdfile.txt
DEBUG: nss cmd: /usr/bin/certutil -A -n Server-Cert -t ,, -a -i /etc/dirsrv/slapd-localhost/Server-Cert.crt -d /etc/dirsrv/slapd-localhost -f /etc/dirsrv/slapd-localhost/pwdfile.txt
DEBUG: nss cmd: /usr/bin/certutil -V -d /etc/dirsrv/slapd-localhost -n Server-Cert -u YCV
DEBUG: asan_enabled=False
DEBUG: libfaketime installed =False
DEBUG: systemd status -> False
DEBUG: pid file /data/run/slapd-localhost.pid -> None
DEBUG: No pidfile found for localhost
DEBUG: systemd status -> False
DEBUG: DEBUG: starting with ['/usr/sbin/ns-slapd', '-D', '/etc/dirsrv/slapd-localhost', '-i', '/data/run/slapd-localhost.pid']
ERROR: Unable to find pid (/data/run/slapd-localhost.pid) of ns-slapd process

System information

I'm running Docker 19.03, being part of the Linux Mint 19.3 Cinnamon package sources.

Upvotes: 1

Views: 303

Answers (1)

rgrosjean
rgrosjean

Reputation: 59

we had the same issue with Docker 20.10.8 on Ubuntu 22.04. Upgrading to 20.10.17 solved the issue. No idea why

Upvotes: 0

Related Questions