Skip to content

MongoDB-k8s fails to start, stuck in a crash loop of exit status 48. #467

Description

@amc94

Steps to reproduce

  1. Deploy MongoDB-K8s on Canonicalk8s 1.32

Expected behavior

MongoDB comes up

Actual behavior

MongoDB is stuck starting with the status message of Waiting for replica set initialisation

Versions

100

Operating system:

Juju CLI:

Juju agent: 3.6.9

Charm revision: 100

microk8s:

Log output

Juju debug log:

-----
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-target-0/charm/venv/lib/python3.12/site-packages/single_kernel_mongo/core/k8s_workload.py", line 68, in restart
    self.container.restart(self.service)
  File "/var/lib/juju/agents/unit-target-0/charm/venv/lib/python3.12/site-packages/ops/model.py", line 2451, in restart
    self._pebble.restart_services(service_names)
  File "/var/lib/juju/agents/unit-target-0/charm/venv/lib/python3.12/site-packages/ops/pebble.py", line 2374, in restart_services
    return self._services_action('restart', services, timeout, delay)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/juju/agents/unit-target-0/charm/venv/lib/python3.12/site-packages/ops/pebble.py", line 2401, in _services_action
    raise ChangeError(change.err, change)
ops.pebble.ChangeError: cannot perform the following tasks:
- Start service "mongod" (service start attempt: exited quickly with code 48, will restart)
----- Logs from task 1 -----
2025-11-27T11:35:27Z INFO Most recent service output:
    (...)
    {"t":{"$date":"2025-11-27T11:35:19.251Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:19.251Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:20.106Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:20.107Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:22.378Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:22.378Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:22.568Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:22.568Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:23.050Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:23.050Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:23.183Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:23.183Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:23.401Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:23.402Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:24.201Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:24.202Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:25.354Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:25.354Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
    {"t":{"$date":"2025-11-27T11:35:27.774Z"},"s":"W",  "c":"CONTROL",  "id":29117,   "ctx":"main","msg":"The storage.journal.enabled option and the corresponding --journal and --nojournal command-line options have no effect in this version of Percona Server for MongoDB. Journaling is always enabled. Please remove those options from the config","tags":["startupWarnings"]}
    {"t":{"$date":"2025-11-27T11:35:27.775Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"main","msg":"Applied --setParameter options","attr":{"serverParameters":{"processUmask":{"default":63,"value":31}}}}
2025-11-27T11:35:27Z ERROR service start attempt: exited quickly with code 48, will restart
-----
unit-target-0: 2025-11-27 11:35:29 DEBUG juju.apiserver.http api <- fd:-1 ServeHTTP GET /liveness

Additional context

Test Observer Logs https://test-observer.canonical.com/#/charms/290626?testExecutionId=290290&testResultId=8012877 (canonical vpn required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions