Troubleshooting on Red Hat OpenShift Container platform
Learn how to isolate and resolve problems on Red Hat OpenShift Container platform.
Mongo Pod crash due to locked file
This issue occurs when you have MongoDB colocated with Process Mining on the same Red Hat OpenShift Container.
Symptom
The Process Mining Mongo Pod gets a CrashLoopBackOff
status.
Cause
Check the pod log, and you can see the following message:
exception in initAndListen: DBPathInUse: Unable to lock the lock file: /data/mongod.lock
Solution
Do the following steps to resolve this issue.
- Go into the pod and delete 2 files:
mongod.lock
andWiredTiger.lock
. - You can use the following yaml file:
apiVersion: v1 kind: Pod metadata: name: reset-mongo-pod spec: volumes: - name: volume-repository persistentVolumeClaim: claimName: 'processmining-mongo' containers: - name: reset-mongo-container image: registry.access.redhat.com/ubi8/ubi:latest command: ['sh', '-c', 'echo The app is running! && ls /data/mongod.lock && ls /data/WiredTiger.lock && rm -f /data/mongod.lock && rm -f /data/WiredTiger.lock && echo file deleted && sleep 3600'] volumeMounts: - name: volume-repository mountPath: /data
- After file deletion, you need to restart mongo pod by deleting it.