MongoDB container keep restarting every few seconds after new install of Rocket.Chat

Description

New install of Rocket.Chat on a Debian 13 VM on ProxMox, using Docker install instructions and compose files. After install, MongoDB container will not start, just keeps restarting every few second. Error log below:

docker compose -f compose.database.yml logs -f mongodb
# Check init container
docker compose -f compose.database.yml logs mongodb-init-container
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
mongodb-1  | =====> Waiting for /data/db to be owned by uid=1001 (mongodb user) ...
mongodb-1  | =====> /data/db ownership OK (1001) - starting MongoDB
mongodb-1 exited with code 132 (restarting)
<!-- Please include as many details as possible about your issue -->


Server Setup Information

  • Version of Rocket.Chat Server: 8.2.1
  • Operating System: Debian 13
  • Deployment Method: Docker compose
  • Number of Running Instances: 0
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 8.2
  • Proxy: traefik
  • Firewalls involved: pfsense

Any additional Information

It’s likely docker/mongo/server permissions issue.

Search online for your error eg

Waiting for /data/db to be owned by uid=1001

Did you follow the docs re users/groups?

Loking at their compose file you can see the error message:

echo “=====> Waiting for /data/db to be owned by uid=$$MONGODB_USER_ID (mongodb user) …”;
for i in $(seq 1 60); do
owner=“$(stat -c %u /data/db 2>/dev/null || true)”;
if [ “$$owner” = “$$MONGODB_USER_ID” ]; then
echo “=====> /data/db ownership OK ($$owner) - starting MongoDB”;
exec mongod --replSet “$$MONGODB_REPLICA_SET_NAME” --bind_ip_all;
fi;

So look at the permissions.

SOLVED.

I changed the processor type for the VM in ProxMox from “kvm64” to “host”, then removed all the docker containers and re-deployed them. It started right up after that.

You probably shouldn’t do that unless you really know what you are doing and understand the risks.

Fix the issue properly in the VM, or Prox. Is it an older version?