community-scripts / ProxmoxVE

Proxmox VE Helper-Scripts (Community Edition)
https://Helper-Scripts.com
MIT License
5.62k stars 343 forks source link

Mongodb LXC not working #539

Closed przemoch-dev closed 2 days ago

przemoch-dev commented 3 days ago

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

Hello,

I'm trying to install MongoDB LXC using script. On default settings, it creates the container, but the mognod service keeps failing.

root@mongodb:~# systemctl status mongod
× mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; preset: enabled)
     Active: failed (Result: signal) since Wed 2024-11-27 15:05:07 CET; 6min ago
   Duration: 261ms
       Docs: https://docs.mongodb.org/manual
    Process: 4181 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=killed, signal=ILL)
   Main PID: 4181 (code=killed, signal=ILL)
        CPU: 17ms

Nov 27 15:05:06 mongodb systemd[1]: Started mongod.service - MongoDB Database Server.
Nov 27 15:05:07 mongodb systemd[1]: mongod.service: Main process exited, code=killed, status=4/ILL
Nov 27 15:05:07 mongodb systemd[1]: mongod.service: Failed with result 'signal'.

I test both community and tteck version of the script. Both with the same result.

Here is the installation log:

root@proxmox:~#   bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/mongodb.sh)"
    __  ___                        ____  ____
   /  |/  /___  ____  ____ _____  / __ \/ __ )
  / /|_/ / __ \/ __ \/ __ `/ __ \/ / / / __  |
 / /  / / /_/ / / / / /_/ / /_/ / /_/ / /_/ /
/_/  /_/\____/_/ /_/\__, /\____/_____/_____/
                   /____/
Loading...
    __  ___                        ____  ____
   /  |/  /___  ____  ____ _____  / __ \/ __ )
  / /|_/ / __ \/ __ \/ __ `/ __ \/ / / / __  |
 / /  / / /_/ / / / / /_/ / /_/ / /_/ / /_/ /
/_/  /_/\____/_/ /_/\__, /\____/_____/_____/
                   /____/
    __  ___                        ____  ____
   /  |/  /___  ____  ____ _____  / __ \/ __ )
  / /|_/ / __ \/ __ \/ __ `/ __ \/ / / / __  |
 / /  / / /_/ / / / / /_/ / /_/ / /_/ / /_/ /
/_/  /_/\____/_/ /_/\__, /\____/_____/_____/
                   /____/
Using Default Settings
Using Distribution: debian
Using debian Version: 12
Using Container Type: 1
Using Root Password: Automatic Login
Using Container ID: 104
Using Hostname: mongodb
Using Disk Size: 4GB
Allocated Cores 1
Allocated Ram 512
Using Bridge: vmbr0
Using Static IP Address: dhcp
Using Gateway IP Address: Default
Using Apt-Cacher IP Address: Default
Disable IPv6: No
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server Address: Host
Using MAC Address: Default
Using VLAN Tag: Default
Enable Root SSH Access: No
Enable Verbose Mode: No
Creating a MongoDB LXC using the above default settings
 ✓ Using local for Template Storage.
 ✓ Using local-lvm for Container Storage.
 ✓ Updated LXC Template List
 ✓ LXC Container 104 was successfully created.
 ✓ Started LXC Container
 ✓ Set up Container OS
 ✓ Network Connected: 192.168.55.112
 ✓ IPv4 Internet Connected
 ✗ IPv6 Internet Not Connected
 ✓ DNS Resolved github.com to 140.82.121.4
 ✓ Updated Container OS
 ✓ Installed Dependencies
 ✓ Installed MongoDB
 ✓ Customized Container
 ✓ Cleaned
 ✓ Completed Successfully!

I also tried on Debian 11 and with higher memory and disk (1GB memory and 10 GB disk space) with the same result.

What settings are you currently utilizing?

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

No response

Please provide detailed steps to reproduce the issue.

Just a regular installation flow:

  1. Open proxmox shell
  2. Enter command bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/mongodb.sh)"
  3. Choose default settings
  4. Open mongo container shell
  5. Type systemctl status mongod
tjcomserv commented 3 days ago

Hello @przemoch-dev, the installation log you sent shows you are using the old tteck repo. Have you tried with the new repo as this works fine for me.

https://community-scripts.github.io/ProxmoxVE/scripts?id=mongodb

havardthom commented 2 days ago

Works fine here aswell

image

Does your cpu have AVX support? cat /proc/cpuinfo | grep avx

przemoch-dev commented 2 days ago

Hello @przemoch-dev, the installation log you sent shows you are using the old tteck repo. Have you tried with the new repo as this works fine for me.

https://community-scripts.github.io/ProxmoxVE/scripts?id=mongodb

Hello, I tried both with the same result.

Works fine here aswell

image

Does your cpu have AVX support? cat /proc/cpuinfo | grep avx

It seems it does not support it

root@proxmox:~# cat /proc/cpuinfo | grep avx
root@proxmox:~#

CPU is Intel Pentium CPU G4560

This seems to explain the cause of the problem. Thank you.