blindsidenetworks / scalelite

Scalable load balancer for BigBlueButton.
GNU Affero General Public License v3.0
471 stars 248 forks source link

After mounting nfs mongod failed to start #121

Closed mabras closed 4 years ago

mabras commented 4 years ago

When I mount NFS with this:

mount private_network_ip:/data/recordings /mnt/

Or if I add this to my fstab:

private_network_ip:/data/recordings    /mnt/    nfs    defaults        0 0

mongod service failed:

~# bbb-conf --status
nginx —————————————————► [✔ - active]
freeswitch ————————————► [✔ - active]
redis-server ——————————► [✔ - active]
bbb-apps-akka —————————► [✔ - active]
bbb-transcode-akka ————► [✔ - active]
bbb-fsesl-akka ————————► [✔ - active]
red5 ——————————————————► [✔ - active]
mongod ————————————————► [✘ - failed]
bbb-html5 —————————————► [✔ - active]
bbb-webrtc-sfu ————————► [✔ - active]
kurento-media-server ——► [✔ - active]
etherpad ——————————————► [✔ - active]
bbb-web ———————————————► [✔ - active]
root@vc3:~# systemctl status mongod  
● mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/etc/systemd/system/mongod.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-04-03 20:52:32 UTC; 33min ago
     Docs: https://docs.mongodb.org/manual
  Process: 1328 ExecStart=/usr/bin/mongod --config /usr/share/meteor/bundle/mongo-ramdisk.conf --oplogSize 8 --replSet rs0 --noauth --nojournal (code=exited, status=100)
  Process: 1226 ExecStartPre=/usr/share/meteor/bundle/mongod_start_pre.sh (code=exited, status=0/SUCCESS)
 Main PID: 1328 (code=exited, status=100)                                                      

Apr 03 20:52:32 bbb.domain.com systemd[1]: Starting High-performance, schema-free document-oriented database...
Apr 03 20:52:32 bbb.domain.com systemd[1]: Started High-performance, schema-free document-oriented database.
Apr 03 20:52:32 bbb.domain.com systemd[1]: mongod.service: Main process exited, code=exited, status=100/n/a
Apr 03 20:52:32 bbb.domain.com systemd[1]: mongod.service: Unit entered failed state.
Apr 03 20:52:32 bbb.domain.com systemd[1]: mongod.service: Failed with result 'exit-code'.   

This would not work:

sudo service mongod start

I have to run:

bbb-conf --restart

After the restart everything work as expected.

Thanks

rabser commented 4 years ago

Normally BBB mongod creates a tmpfs ramdisk for performance reason on

tmpfs                                  524288     6616     517672   2% /mnt/mongo-ramdisk

In the startup procedure, if you mount an NFS/fs on top of /mnt, this obfuscate the mongod tmpfs, causing it to crash. Do not mount the scalelite NFS filesystem on /mnt on BBB nodes, choose another directory, elsewhere, but not /mnt! In the scalelite's documentation there is a suggestion for /mnt but only for the scalelite server, not for the BBB nodes, even if i do not like to mount an application NFS share onto a system directory, as this can cause confusion to other system tools, like you experienced. In my opinion, choose any /namedir you like to use as the NFS mountpoint for all the cluster servers and change the configs accordingly.

kurjajuur666 commented 4 years ago

Documentation doesn't really say you should mount it on /mnt, rather it says to mount it on /mnt/scalelite-recordings. Fine like that.

rabser commented 4 years ago

Yes, my mistake.