OPNsense Forum

International Forums => German - Deutsch => Topic started by: c-mu on October 05, 2020, 08:40:14 am

Title: vnstat Fehler
Post by: c-mu on October 05, 2020, 08:40:14 am
Hallo,
ich stelle auf einigen meiner Firewalls fest (nicht alle), dass ich vnstat nicht mehr starten kann. Vermutlich seit dem Update von 20.7.2 auf 20.7.3

dieser Fehler wiederholt sich:

Code: [Select]
2020-10-05T08:36:31 configd.py[82327] [bd65992f-d65d-4ebf-bde9-74589bd0027f] Show log
2020-10-05T08:36:30 configd.py[82327] [d07adb5a-2bc5-401c-b236-4f74d4950cb1] Show log
2020-10-05T08:36:30 configd.py[82327] [8fcd6be2-ac4a-43ee-ab1c-97a4a8eec6df] Script action failed with Command '/usr/local/bin/vnstat -d' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -d' returned non-zero exit status 1.
2020-10-05T08:36:30 configd.py[82327] [8fcd6be2-ac4a-43ee-ab1c-97a4a8eec6df] request Vnstat daily status
2020-10-05T08:36:30 configd.py[82327] [a7262168-4018-461a-a80a-6b6bb50aa988] Script action failed with Command '/usr/local/bin/vnstat -m' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -m' returned non-zero exit status 1.
2020-10-05T08:36:30 configd.py[82327] [a7262168-4018-461a-a80a-6b6bb50aa988] request Vnstat weekly status
2020-10-05T08:36:30 configd.py[82327] [ccd1ca24-9881-496f-825d-b4ce30878184] Script action failed with Command '/usr/local/bin/vnstat -h' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -h' returned non-zero exit status 1.
2020-10-05T08:36:30 configd.py[82327] [ccd1ca24-9881-496f-825d-b4ce30878184] request Vnstat hourly status
2020-10-05T08:36:27 configd.py[82327] [a447216b-9c1f-44ff-b097-e0d2b402c47c] Script action failed with Command '/usr/local/bin/vnstat -m' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -m' returned non-zero exit status 1.
2020-10-05T08:36:27 configd.py[82327] [a447216b-9c1f-44ff-b097-e0d2b402c47c] request Vnstat weekly status
2020-10-05T08:36:27 configd.py[82327] [40b8551e-e504-4dfb-af30-e8122eff595a] Script action failed with Command '/usr/local/bin/vnstat -d' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -d' returned non-zero exit status 1.
2020-10-05T08:36:27 configd.py[82327] [40b8551e-e504-4dfb-af30-e8122eff595a] request Vnstat daily status
2020-10-05T08:36:27 configd.py[82327] [b2c42ad5-2211-468c-bc9c-b575f1317b90] Script action failed with Command '/usr/local/bin/vnstat -h' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/bin/vnstat -h' returned non-zero exit status 1.
2020-10-05T08:36:27 configd.py[82327] [b2c42ad5-2211-468c-bc9c-b575f1317b90] request Vnstat hourly status
2020-10-05T08:36:25 configd.py[82327] [80ede327-6df3-47c7-a426-6a789a8e52b0] request Vnstat status
2020-10-05T08:36:25 configd.py[82327] [7e2f05a9-1224-4d88-ae3b-c7462a1488e2] request Vnstat status
2020-10-05T08:36:25 configd.py[82327] [40f5da28-47e5-45a0-b867-2b8a8164b3f8] returned exit status 1
2020-10-05T08:36:25 configd.py[82327] [40f5da28-47e5-45a0-b867-2b8a8164b3f8] starting Vnstat

Löschen und neuinstallieren des Plugins hilft leider nicht.
Hat jemand eine Idee, was ich sonst noch tun kann?
Danke!
Title: Re: vnstat Fehler
Post by: micneu on October 05, 2020, 09:05:41 am
Ich hatte das auch mal und habe dann einfach mal die Interface geändert und irgend wann ging es dann wieder.


Gesendet von iPad mit Tapatalk Pro
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 09:07:53 am
Danke für den Tipp, habe ich jetzt ausprobiert, leider hilft das nicht.

Habe auch "clear all data" gemacht und auch mal versucht ohne Interface zu starten. Natürlich immer bei jedem Change auf "save" geklickt.
Title: Re: vnstat Fehler
Post by: micneu on October 05, 2020, 09:09:48 am
Ich kann nicht mehr genau sagen was ich gemacht hatte aber einige Änderungen. Dann den dienst gestop, und ich glaube sogar die sense Neugestalten. Irgend ein Interface war bei mir in der liste was ein Problem hatte. Einfach mal alle raus nehmen und nach und nach mal probieren ob es wieder geht


Gesendet von iPad mit Tapatalk Pro
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 09:22:47 am
Okay, das einzige was ich jetzt noch nicht testen konnte, ist ein Reboot. Das möchte ich aber erstmal als letzte Option behalten.
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 09:56:44 am
Ich bin einen Schritt "weiter":

/usr/local/bin/vnstat -h
Error: Failed to open database "/var/lib/vnstat/vnstat.db" in read-only mode.
The vnStat daemon should have created the database when started.
Check that it is configured and running. See also "man vnstatd".

Das Plugin hat also offensichtlich Probleme das Verzeichnis und die Datei anzulegen. Beides existiert nicht.
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 10:05:48 am
Noch eine Feststellung: der HA Partner kann den Dienst auch nicht mehr starten. Da hilft auch kein Reboot.

Ich vermute, das hier ein Bug vorliegt.
Title: Re: vnstat Fehler
Post by: mimugmail on October 05, 2020, 10:22:52 am
Output von:

# /usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 10:24:59 am
Code: [Select]
root@gw01:~/var/lib # /usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh
mkdir: /var/lib/vnstat: No such file or directory
chmod: /var/lib/vnstat: No such file or directory
root@gw01:~/var/lib # ls
root@gw01:~/var/lib # mkdir vnstat
root@gw01:~/var/lib # /usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh
root@gw01:~/var/lib # ls
vnstat
root@gw01:~/var/lib # cd vnstat/
root@gw01:~/var/lib/vnstat # ls

weiterhin die bekannten Fehler.
Title: Re: vnstat Fehler
Post by: mimugmail on October 05, 2020, 10:26:30 am
Hast du /var in der Ramdisk?
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 10:30:32 am
Ja!

Edit: um das weiter auszuführen: aber auch bei Firewalls, die Patchlevel 20.7.3 haben UND bei denen es funktioniert.
Title: Re: vnstat Fehler
Post by: mimugmail on October 05, 2020, 10:37:28 am
Jo, mit ramdisk gehts nicht .. eigentlich siehts gut aus, vmtl. irgendwas beim hochfahren.
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 10:47:12 am
Das ist ja spannend!
Ich habe den HA Slave jetzt ohne Ram Disk gebootet und es ist wie du sagst - funktioniert wieder.

Meine beiden Main Firewalls haben auch Enterprise SSDs mit RAID verbaut, da kann ich bedenkenlos auf RAM Disk verzichten (wegen Schreibzugriffen, nicht wegen der Geschwindigkeit - die ist egal). Aber meine Standorte haben alle nur SD Cards.

Da frage ich mich, ob es ratsam ist dort auf die RAM Disk zu verzichten. SD Cards gehen doch eher mal kaputt bei permaneten Schreibzugriffen - oder?
Title: Re: vnstat Fehler
Post by: mimugmail on October 05, 2020, 10:57:56 am
Ja, da würde ich das nicht machen .. und mittelfristig die SD's raushauen, das ist für business nur Gefrickel und macht Ärger.
Title: Re: vnstat Fehler
Post by: c-mu on October 05, 2020, 01:40:48 pm
Mal so überlegt:
könnte man das Problem mit der SD Card nich umschiffen indem man die RAM Disk wieder deakiviert, die Logfiles via rsyslog an ein remotesystem schickt und die Option "Disable writing log files to the local disk" aktiviert?

Lokal brauche ich die Logs eh nicht, und wird sowieso schon remote gelogt.
Title: Re: vnstat Fehler
Post by: mimugmail on October 05, 2020, 02:30:14 pm
jo, müsste gehen ...