Wenn ich auf die Schnelle die Ursache nicht faend - aber mit einem einfachen restart CMX wieder laeuft - wuerde ich wohl schlicht per cron taeglich einmal den CMX-Dienst neustarten. Siehe Beitrag weiter oben.
Wobei ich wohl versuchen wuerde, die Ursache fuer das Fehlverhalten zu finden und diese abzustellen.
Denn CMX kann durchaus voellig problemlos laufen - hier zumindest tut es das.
Was zeigt denn "sudo systemctl status cumulusmx" im Fehlerfall genau an?
Gibt es Eintraege im syslog?
das Fehlverhalten würde mich auch interessieren.
Die Fehlermeldung von "status cumulusmx" habe ich nicht mehr im Kopf, auf jeden Fall was mit Error.
Schreibe ich beim nächten Mal auf.
Heute um 05:34 Uhr passierte es auch:
sudo journalctl -u cumulusmx. Ergebnis:
Aug 09 05:34:05 cumulusmx systemd[1]: cumulusmx.service: Main process exited, code=exited, status=1/FAILURE
Aug 09 05:34:05 cumulusmx systemd[1]: cumulusmx.service: Failed with result 'exit-code'.
2023-08-09 05:32:35.480 FTP[Int]: Process complete
2023-08-09 05:32:42.049 FTP[241]: Error uploading /realtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:42.049 FTP[241]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:32:43.376 FTP[241]: Error uploading /realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:43.376 FTP[241]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:32:44.126 FTP[241]: Error uploading CUtags.php : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:44.127 FTP[241]: Inner Exception: Code: 425 Message: Unable to build data connection: Keine Route zum Zielrechner
2023-08-09 05:32:45.202 FTP[241]: Error uploading /CUtils/extrasensorsrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:45.202 FTP[241]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:32:46.433 FTP[241]: Error uploading /CUtils/airlinkrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:46.433 FTP[241]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:32:47.773 FTP[241]: Error uploading realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:32:47.773 FTP[241]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:02.720 FTP[242]: Error uploading /realtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:02.720 FTP[242]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:02.819 FTP[242]: Error uploading /realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:02.820 FTP[242]: Inner Exception: Timed out trying to connect!
2023-08-09 05:33:04.657 FTP[242]: Error uploading CUtags.php : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:04.657 FTP[242]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:05.921 FTP[242]: Error uploading /CUtils/extrasensorsrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:05.921 FTP[242]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:06.009 FTP[242]: Error uploading /CUtils/airlinkrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:06.009 FTP[242]: Inner Exception: Timed out trying to connect!
2023-08-09 05:33:07.898 FTP[242]: Error uploading realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:07.898 FTP[242]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:22.736 FTP[243]: Error uploading /realtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:22.736 FTP[243]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:22.829 FTP[243]: Error uploading /realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:22.830 FTP[243]: Inner Exception: Timed out trying to connect!
2023-08-09 05:33:24.682 FTP[243]: Error uploading CUtags.php : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:24.683 FTP[243]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:25.960 FTP[243]: Error uploading /CUtils/extrasensorsrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:25.960 FTP[243]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:27.326 FTP[243]: Error uploading /CUtils/airlinkrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:27.326 FTP[243]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:28.678 FTP[243]: Error uploading realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:28.679 FTP[243]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:42.686 FTP[244]: Error uploading /realtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:42.686 FTP[244]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:44.054 FTP[244]: Error uploading /realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:44.054 FTP[244]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:44.148 FTP[244]: Error uploading CUtags.php : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:44.148 FTP[244]: Inner Exception: Timed out trying to connect!
2023-08-09 05:33:45.844 FTP[244]: Error uploading /CUtils/extrasensorsrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:45.844 FTP[244]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:33:45.945 FTP[244]: Error uploading /CUtils/airlinkrealtime.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:45.945 FTP[244]: Inner Exception: Timed out trying to connect!
2023-08-09 05:33:47.778 FTP[244]: Error uploading realtimegauges.txt : Error while uploading the file to the server. See InnerException for more info.
2023-08-09 05:33:47.778 FTP[244]: Inner Exception: Insufficient memory to continue the execution of the program.
2023-08-09 05:34:00.348 !!! Unhandled Exception !!!
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at (wrapper alloc) System.Object.AllocVector(intptr,intptr)
at System.Text.StringBuilder..ctor (System.String value, System.Int32 startIndex, System.Int32 length, System.Int32 capacity) [0x00099] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Text.StringBuilder..ctor (System.String value, System.Int32 capacity) [0x0000f] in <d636f104d58046fd9b195699bcb1a744>:0
at CumulusMX.WeatherStation.GetTempGraphData (System.Boolean incremental, System.Boolean local, System.Nullable`1[T] start) [0x0000d] in <7bc6b971a4244cf384fe58b0e2381f1f>:0
at CumulusMX.WeatherStation.CreateGraphDataJson (System.String filename, System.Boolean incremental) [0x002c9] in <7bc6b971a4244cf384fe58b0e2381f1f>:0
at CumulusMX.WeatherStation.CreateGraphDataFiles () [0x0004e] in <7bc6b971a4244cf384fe58b0e2381f1f>:0
at CumulusMX.Cumulus.DoHTMLFiles () [0x000f9] in <7bc6b971a4244cf384fe58b0e2381f1f>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
Na ja - "Insufficient memory to continue the execution of the program" - nicht genügend (RAM-)Speciher zur Programmausführung - sagt doch schon mal was, oder ?
Wieviel RAM hat denn Dein Rapsberry ? Welche anderen RAM-Konsumenten laufen denn noch auf Deinem RPi ?
Unter Umständen schaukelt(n) sich da die mono Laufzeitbibliothek(en) hoch und belegen RAM ...
Wenn das so ist (beobachten), wäre ein regelmässiger Neustart hilfreich.
Ggf. ist das auch ein CUtils-Problem, wenn dort regelmässige Prozesse nicht zum Abschluss kommen (UserAskedData, Website) und die nächsten bereits wieder gestartet werden.
Ich kenne hier Deine Terminierung nicht, aber ggf. müsste man dort mal "entzerren".
Gyvate hat geschrieben: ↑09 Aug 2023, 14:10
Na ja - "Insufficient memory to continue the execution of the program" - nicht genügend (RAM-)Speciher zur Programmausführung - sagt doch schon mal was, oder ?
Wieviel RAM hat denn Dein Rapsberry ? Welche anderen RAM-Konsumenten laufen denn noch auf Deinem RPi ?
Unter Umständen schaukelt(n) sich da die mono Laufzeitbibliothek(en) hoch und belegen RAM ...
Mein Raspberry Pi400 hat 4GB RAM
Es läuft CumulusMX, FOSHKplugin und CUtils.
Gyvate hat geschrieben: ↑09 Aug 2023, 14:10
Wenn das so ist (beobachten), wäre ein regelmässiger Neustart hilfreich.
Ggf. ist das auch ein CUtils-Problem, wenn dort regelmässige Prozesse nicht zum Abschluss kommen (UserAskedData, Website) und die nächsten bereits wieder gestartet werden.
Ich kenne hier Deine Terminierung nicht, aber ggf. müsste man dort mal "entzerren".
CUtils lasse ich so laufen:
15 0 * * * cd /opt/CumulusMX; mono utils/bin/cumulusutils.exe WebSite
9-59/10 * * * * cd /opt/CumulusMX; mono utils/bin/cumulusutils.exe SysInfo UserAskedData UserReports > /dev/null
pack den Website mal auf 11 oder 12 statt 15; je nachdem wieviel historische Daten Du hast, kann das dauern und sich dann mit der 19 (aus 9-59/10) überlappen. Die UserAskedData ist ja relativ schnell durch.
Wie gesagt, es kann natürlich auch "nur" nicht freigebenes RAM von mono sein.
Ich lasse hier die "systemkritischen" Dienste (also die, die IMMER laufen sollen) automatisch erneut starten, wenn diese sich - aus welchen Gruenden auch immer - verabschieden. Das habe ich jetzt hier auch mal mit dem cumulusmx-Dienst erfolgreich durchexerziert.
Dazu ist eine Aenderung/Anpassung an /etc/systemd/system/cumulusmx.service noetig - bitte in der Service-Stanza noch diese zwei Zeilen eintragen:
noetig, um die geaenderten Service-Einstellungen zu aktivieren.
Damit wird systemd angewiesen, den Dienst cumulusmx - sofern dieser nicht manuell heruntergefahren wurde - nach 5 Sekunden erneut zu starten.
FOSHKplugin macht das fuer sich bereits in der Standardinstallation so - allerdings mit 15 Sekunden Wartezeit.
Aber Vorsicht!
So kriegt man nichtmal mehr mit, wenn irgendwelche Probleme vorliegen.
olicat hat geschrieben: ↑10 Aug 2023, 12:52
Aber Vorsicht!
So kriegt man nichtmal mehr mit, wenn irgendwelche Probleme vorliegen.
Oliver
wenn man das Debug Logging aktiviert hat und sich die MXDiags Logs regelmässig anschaut schon.
Die werden ja bei jedem Neustart auch neu angelegt.
Muss man aber von sich aus tun ....
2023-08-13 02:26:02.702 !!! Unhandled Exception !!!
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at (wrapper alloc) System.Object.AllocString(intptr,int)
at System.Text.StringBuilder.ToString () [0x00014] in <d636f104d58046fd9b195699bcb1a744>:0
at CumulusMX.WeatherStation.GetAqGraphData (System.Boolean incremental, System.Nullable`1[T] start) [0x0026f] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.WeatherStation.CreateGraphDataJson (System.String filename, System.Boolean incremental) [0x0035a] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.WeatherStation.CreateGraphDataFiles () [0x0004e] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.Cumulus.DoHTMLFiles () [0x000f9] in <b0ae9ad91692488da7ace3260fd3c598>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <d636f104d58046fd9b195699bcb1a744>:0 at System.Threading.ThreadPoolWorkQ02:26:19.691
2023-08-16 09:10:52.733 FTP[Int]: Process complete
2023-08-16 09:12:02.289 !!! Unhandled Exception !!!
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at (wrapper alloc) System.Object.AllocString(intptr,int)
at System.Text.StringBuilder.ToString () [0x00014] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Text.StringBuilder.Append (System.Object value) [0x00003] in <d636f104d58046fd9b195699bcb1a744>:0
at CumulusMX.WeatherStation.GetAqGraphData (System.Boolean incremental, System.Nullable`1[T] start) [0x00221] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.WeatherStation.CreateGraphDataJson (System.String filename, System.Boolean incremental) [0x0035a] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.WeatherStation.CreateGraphDataFiles () [0x0004e] in <b0ae9ad91692488da7ace3260fd3c598>:0
at CumulusMX.Cumulus.DoHTMLFiles () [0x000f9] in <b0ae9ad91692488da7ace3260fd3c598>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <d636f104d58046fd9b195699bcb1a744>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <d636f104d58046fd9b195699bcb1a744>:0