7.0.2-2-pve breaks Graylog due to MongoDB on an LXC.

Rayd123

Member
Jul 6, 2023
1
1
8
Hi everyone,

Just a heads-up for those running MongoDB (specifically version 8.0.21) inside LXC containers on the latest Proxmox 9.x updates.

During my Sunday maintenance window, I updated to Kernel 7.0.2-2-pve. After the reboot, my Graylog instance failed to start. Specifically, the MongoDB service was crashing silently—no obvious errors in /var/log/mongodb/mongod.log, and systemctl status only showed a generic Result: exit-code.

The Issue

It appears there is a significant incompatibility between the memory-mapping (mmap) behavior of the 7.0.2 kernel and current MongoDB builds (referencing SERVER-121912). This seems to specifically affect LXC environments where the container is restricted by the host's new kernel memory management and AppArmor profiles.

Diagnostics (How to check if you're affected)

If your MongoDB fails silently on this kernel, try running it manually as the mongodb user:

Bash

sudo -u mongodb /usr/bin/mongod --config /etc/mongod.conf<br>
If it returns to the prompt immediately with no output, or if dmesg on the host shows trap invalid opcode or segfault, you are likely hitting this kernel mismatch.

Working Workaround

I confirmed this is kernel-dependent by migrating the container.

  • Failed: Kernel 7.0.2-2-pve (Production)
  • Success: Kernel 6.17.13-3-pve (Test Laptop)
Current Fix: Roll back and pin your host kernel to a 6.x branch if you need MongoDB/Graylog stability.

If anyone has managed to get MongoDB 8.x running on the 7.0.2 kernel by tweaking AppArmor profiles (unconfined) or disabling Transparent Huge Pages (THP) on the host, I'd love to hear the specific config. Until then, I’m staying on 6.17!
 
  • Like
Reactions: keeka
https://search.brave.com/search?q=l...ersation=091155146a6ea0e8301d2f368ba78ca1a165

I remember reading about the issue a couple of weeks ago but the article might have been in an app, can't find the exact one in search

If you want more stability, I suggest you run essential services like Mongodb out of an LTS VM like Ubuntu 24.04

Personally I think Proxmox is revving too many updates too quickly compared to ESXI, at least for no-subscription. I don't necessarily want to patch even my homelab hypervisor every weekend and reboot it.