Skip to content

STS: Mongodb goes into CrashLoopBackOff #197

@surajssd

Description

@surajssd

Describe the bug

I installed the app using aks-store-all-in-one.yaml config but the mongodb pod goes into CrashLoopBackOff because its liveness probe fails. Liveness check is failing with the following error:

pets 0s Warning Unhealthy pod/mongodb-0 Liveness probe failed: OCI runtime exec failed: exec failed: unable to start container process: exec: "mongosh": executable file not found in $PATH: unknown

To Reproduce
Steps to reproduce the behavior:

  1. Follow steps from: https://github.com/Azure-Samples/aks-store-demo/tree/main?tab=readme-ov-file#run-on-any-kubernetes i.e.:
kubectl create ns pets

kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/aks-store-demo/main/aks-store-all-in-one.yaml -n pets
  1. Run the following to see that the mongodb-0 pod keeps restarting:
kubectl get events -w -n pets

Expected behavior

Pod should pass the liveness probe.

Source of the error

exec:
command:
- mongosh
- --eval
- db.runCommand('ping').ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions