Seite 1 von 1

DeviceContainsWrongStateException - Handler

Verfasst: Sa 7. Feb 2026, 20:09
von xdcc_master
Ich bekomme immer wieder Probleme mit dieser Exception.

1. Die Meldung wird nur im Log angezeigt, die Oberfläche schlägt einfach nur beim Backup fehl
2. Der Grund ist nicht immer ersichtlich, vermutlich weil der FTP nicht schnell genug erreichbar war. Das liegt nicht zwingend am Server; ich vermute eher eine Latenz bei der WLAN/Standby/...
3. Der Fix ist immer der Gleiche: Zurücksetzen des Backupplans und Importieren.

Vorschlag: Diesen Fehler einfacher erkennbar in der Oberfläche anzeigen und als Fehlerbehandlung einen automatisierten Neuabgleich mit dem Server integrieren.

Re: DeviceContainsWrongStateException - Handler

Verfasst: So 8. Feb 2026, 15:23
von Alex
Hallo xdcc_master,

Der Fehler deutet eigentlich darauf hin, dass der Abschluss des Backups nicht auf dem FTP Server gespeichert wurde. Es gibt eine backup.bshv Datei, die den Versionsstand speichert, welcher dann vor jeder Sicherung mit der Datenbank abgeglichen wird.

Findet sich kein sonstiger Fehler im Protokoll wenn die Sicherung durchgelaufen ist?

Re: DeviceContainsWrongStateException - Handler

Verfasst: So 8. Feb 2026, 19:45
von xdcc_master
Nach einer gewissen Zeit tritt das Phänomen auf. Ich kann in den Logs aber keine weiteren Fehlermeldungen finden, außer dass es entweder ein FTP Timeout oder nicht erreichbaren FTP Server gibt. Der FTP Server wird im LAN betrieben, daher wird er für ein Notebook nicht immer erreichbar sein. Das sollte allerdings aber nicht diese Probleme auslösen?

Code: Alles auswählen

2025-12-25 00:00:00.005 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-25 00:00:21.103 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-25 00:00:21.150 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-25 00:29:03.274 +01:00 [INF] Backup Service Home stopped
2025-12-25 03:01:15.897 +01:00 [INF] Backup Service Home 3.9.4.0 started.
2025-12-25 03:01:16.950 +01:00 [INF] Service for "Full automatic backup" is started.
2025-12-25 03:01:17.026 +01:00 [INF] Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
2025-12-25 03:01:17.027 +01:00 [INF] Quartz Scheduler created
2025-12-25 03:01:17.027 +01:00 [INF] RAMJobStore initialized.
2025-12-25 03:01:17.027 +01:00 [INF] Quartz Scheduler 3.14.0.0 - 'QuartzScheduler' with instanceId 'NON_CLUSTERED' initialized
2025-12-25 03:01:17.028 +01:00 [INF] Using thread pool 'Quartz.Simpl.DefaultThreadPool', size: 1
2025-12-25 03:01:17.028 +01:00 [INF] Using job store 'Quartz.Simpl.RAMJobStore', supports persistence: False, clustered: False
2025-12-25 03:01:17.031 +01:00 [INF] Scheduler QuartzScheduler_$_NON_CLUSTERED started.
2025-12-25 04:00:00.028 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-25 04:00:21.427 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-25 04:00:21.469 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-26 15:15:28.327 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-26 15:15:49.449 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-26 15:15:49.458 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-26 16:00:00.019 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-26 16:00:21.057 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-26 16:00:21.058 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
---------------------
2025-12-28 03:20:18.038 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 03:20:39.072 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 03:20:39.072 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 04:00:00.032 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 04:00:21.115 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 04:00:21.118 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 05:00:00.060 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 05:00:21.110 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 05:00:21.112 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 06:00:00.009 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 06:00:21.077 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 06:00:21.081 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 07:00:00.020 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 07:00:21.090 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 07:00:21.091 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 08:00:00.015 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 08:00:21.051 +01:00 [ERR] Exception during connecting to ftp server
System.TimeoutException: Timed out trying to connect!
   at FluentFTP.Client.Modules.ConnectModule.AutoDetectAsync(AsyncFtpClient client, FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoDetect(FtpAutoDetectConfig config, CancellationToken token)
   at FluentFTP.AsyncFtpClient.AutoConnect(CancellationToken token)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
2025-12-28 08:00:21.052 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 12:01:51.568 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 12:01:51.589 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 13:02:16.199 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 13:02:16.266 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 15:39:12.690 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 15:39:12.696 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 16:00:00.007 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 16:00:00.064 +01:00 [WRN] Automatic backup cancelled due to not reachable storage device.
2025-12-28 23:51:56.210 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2025-12-28 23:51:56.659 +01:00 [WRN] FTP server contains an inconsistent state. Version file contains a different version than the computers backup version.
2025-12-28 23:51:56.689 +01:00 [ERR] An unexpected error occurred Das Sicherungsmedium steht nicht zur Verfügung, da es einen anderen Sicherungsstand enthält als dieser Computer. Um die Sicherung nicht zu beschädigen wird BSH auf dieses Sicherungsmedium nicht schreiben.


   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
   at Brightbits.BSH.Engine.Services.BackupService.CheckMedia(Boolean quickCheck)
   at Brightbits.BSH.Main.BackupLogic.RunAutoBackup()
   at Brightbits.BSH.Main.BackupLogic.<>c.<<StartFullAutomatedSystem>b__34_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart().
Brightbits.BSH.Engine.Exceptions.DeviceContainsWrongStateException: Das Sicherungsmedium steht nicht zur Verfügung, da es einen anderen Sicherungsstand enthält als dieser Computer. Um die Sicherung nicht zu beschädigen wird BSH auf dieses Sicherungsmedium nicht schreiben.


   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
   at Brightbits.BSH.Engine.Services.BackupService.CheckMedia(Boolean quickCheck)
   at Brightbits.BSH.Main.BackupLogic.RunAutoBackup()
   at Brightbits.BSH.Main.BackupLogic.<>c.<<StartFullAutomatedSystem>b__34_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   

Re: DeviceContainsWrongStateException - Handler

Verfasst: Sa 21. Feb 2026, 21:38
von xdcc_master

Code: Alles auswählen

2026-01-27 00:30:54.974 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2026-01-27 00:30:55.494 +01:00 [INF] Begin backup
2026-01-27 00:30:56.606 +01:00 [INF] 3010 files and 20 folders are collected for backup.
2026-01-27 00:31:02.794 +01:00 [WRN] Reconnect needed due to disconnected control connection
2026-01-27 00:31:02.796 +01:00 [WRN] Reconnect (Count: 1)
2026-01-27 00:31:02.800 +01:00 [INF] Backup job finished.
und danach kann das Backup nicht mehr ausgeführt werden:

Code: Alles auswählen

2026-01-28 10:14:21.186 +01:00 [INF] Automatic backup is scheduled and will be performed now.
2026-01-28 10:14:21.430 +01:00 [WRN] FTP server contains an inconsistent state. Version file contains a different version than the computers backup version.
2026-01-28 10:14:21.694 +01:00 [ERR] An unexpected error occurred Das Sicherungsmedium steht nicht zur Verfügung, da es einen anderen Sicherungsstand enthält als dieser Computer. Um die Sicherung nicht zu beschädigen wird BSH auf dieses Sicherungsmedium nicht schreiben.


   at Brightbits.BSH.Engine.Storage.FtpStorage.CheckMedium(Boolean quickCheck)
   at Brightbits.BSH.Engine.Services.BackupService.CheckMedia(Boolean quickCheck)
   at Brightbits.BSH.Main.BackupLogic.RunAutoBackup()
   at Brightbits.BSH.Main.BackupLogic.<>c.<<StartFullAutomatedSystem>b__34_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart().
Brightbits.BSH.Engine.Exceptions.DeviceContainsWrongStateException: Das Sicherungsmedium steht nicht zur Verfügung, da es einen anderen Sicherungsstand enthält als dieser Computer. Um die Sicherung nicht zu beschädigen wird BSH auf dieses Sicherungsmedium nicht schreiben.

Re: DeviceContainsWrongStateException - Handler

Verfasst: Sa 28. Feb 2026, 16:06
von Alex
Entschuldige die späte Antwort.

Es sieht zumindest so aus als würde die Sicherung eigentlich durchlaufen. Wenn die Aktualisierung auf dem FTP Server nicht funktioniert hätte, würdest du die Fehlermeldung "Database file could not be refreshed on storage device." bekommen.

Ich nehme aber mal an, dass BSH nur von einem Nutzer und nicht über die Kommandozeile gesteuert wird, richtig?
Alternativ gerne mal die neue Betaversion 3.9.5-beta2 (von heute) ausprobieren, es gab sehr viele Änderungen unter der Haube, aber nichts spezifisches zu deinem Problem :/