Bug report: PHP error due to typo with mongodb

Started by sorano, June 29, 2021, 11:45:55 AM

Previous topic - Next topic
Saw this error when I logged into OPNsense today:


[28-Jun-2021 22:47:18 Europe/Stockholm] PHP Warning:  unlink(/tmp/mongodb_dahsboard60da35511c350.json): No such file or directory in /usr/local/opnsense/mvc/app/controllers/OPNsense/Sensei/Api/WidgetController.php on line 97
[28-Jun-2021 22:47:18 Europe/Stockholm] PHP Warning:  unlink(/tmp/mongodb_dahsboard60da35511c350_result.json): No such file or directory in /usr/local/opnsense/mvc/app/controllers/OPNsense/Sensei/Api/WidgetController.php on line 98


If you look at the filename it's looking for a file called dahsboard.
2x 23.7 VMs & CARP, 4x 2.1GHz, 8GB
Cisco L3 switch, ESXi, VDS, vmxnet3
DoT, Chrony, HAProxy + NAXSI, Suricata
VPN: IPSec, OpenVPN, Wireguard
MultiWAN: Fiber 500/500Mbit dual stack + 4G failover

--
Available for private support.
Did my answer help you? Feel free to click [applaud] to the left

Hi,

What about the reports and widget? All works or?

June 29, 2021, 05:56:08 PM #2 Last Edit: June 29, 2021, 06:12:29 PM by sorano
Well, the mongodb service had stopped again for some unknown reason.

Just starting the service normally (without erasing reporting data) got it up and running.

However I seem to get alot of mongodb stops for no apparent reason, the fw is up and running all other services works fine but mongodb keeps taking a dump from time to time.

Edit:

Looking at this further I found the following:

root@fw01:/var/log # grep -i mongod dmesg.*
dmesg.today:pid 20481 (mongod), jid 0, uid 922, was killed: out of swap space
dmesg.yesterday:pid 20481 (mongod), jid 0, uid 922, was killed: out of swap space


So out of memory seems like a solid guess, just weird that no other services was affected. I have 8GB RAM and 2 days retention for Sensei.
Looks like Suricata is using alot of RAM though.
2x 23.7 VMs & CARP, 4x 2.1GHz, 8GB
Cisco L3 switch, ESXi, VDS, vmxnet3
DoT, Chrony, HAProxy + NAXSI, Suricata
VPN: IPSec, OpenVPN, Wireguard
MultiWAN: Fiber 500/500Mbit dual stack + 4G failover

--
Available for private support.
Did my answer help you? Feel free to click [applaud] to the left