lavinir / hassio-onedrive-backup

MIT License
273 stars 11 forks source link

Addon regularly stops #230

Open jymorel opened 2 months ago

jymorel commented 2 months ago

Onedrive Backup add-on regularly stops and backups are not done.

Update : not sure of this issue. I see that the "Start on boot" option was disabled in the add-on settings. I installed this module over a year ago and I'm sure it was enabled ...

Log: 09/16/2024 03:06:52 [63] Info: Creating new backup 09/16/2024 03:06:52 [63] Info: Starting full local backup 09/16/2024 03:07:29 [62] Info: Backup complete 09/16/2024 03:07:29 [62] Info: Found 1 backups to upload. 09/16/2024 03:07:29 [62] Info: Uploading ha_onedrive_backup_2024-09-16-03-06 (09/16/2024 03:06:52) 09/16/2024 03:07:29 [62] Info: Fetching Local Backup (Slug:f72dba3a) 09/16/2024 03:07:30 [62] Info: Backup (f72dba3a) fetched successfully 09/16/2024 03:07:31 [62] Info: Starting file upload. (Size:212725760 bytes. Attempt: 1/3) 09/16/2024 03:09:38 [31] Error: Error uploading backup: System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing. ---> System.TimeoutException: The operation was canceled. ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled. ---> System.Net.Sockets.SocketException (125): Operation canceled --- End of inner exception stack trace --- at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory1 buffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.HeadersInspectionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RetryHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.GetHttpResponseMessage(RequestInformation requestInfo, CancellationToken cancellationToken, Activity activityForAttributes, String claims, Boolean isStreamResponse) at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendNoContentAsync(RequestInformation requestInfo, Dictionary2 errorMapping, CancellationToken cancellationToken) at Microsoft.Graph.UploadSliceRequestBuilder1.PutAsync(Stream stream, CancellationToken cancellationToken) at Microsoft.Graph.LargeFileUploadTask1.UploadSliceAsync(UploadSliceRequestBuilder1 uploadSliceRequestBuilder, ICollection1 exceptionTrackingList, CancellationToken cancellationToken) at Microsoft.Graph.LargeFileUploadTask1.UploadAsync(IProgress1 progress, Int32 maxTries, CancellationToken cancellationToken) at hassio_onedrive_backup.Graph.GraphHelper.UploadFileAsync(String filePath, DateTime date, String instanceName, TransferSpeedHelper transferSpeedHelper, String destinationFileName, Action2 progressCallback, Boolean flatten, String description) in /src/Graph/GraphHelper.cs:line 205 at hassio_onedrive_backup.Hass.BackupManager.UploadLocalBackupToOneDrive(Backup backup, Action2 progressCallback, Boolean updateHassEntityState) in /src/Hass/BackupManager.cs:line 361 09/16/2024 03:09:39 [34] Info: Reached Max Online Backups (3) 09/16/2024 03:09:39 [34] Info: Found 1 backups to delete from OneDrive. 09/16/2024 03:09:39 [34] Info: Deleting item: ha_onedrive_backup_2024-09-12-04-40.tar 09/16/2024 03:09:40 [57] Info: Reached Max Local Backups (3) 09/16/2024 03:09:40 [57] Info: Removing 1 local backups 09/18/2024 10:06:01 [6] Info: Anonymous Telemetry Disabled 09/18/2024 10:06:01 [6] Info: Backup interval configured to every 24 hours 09/18/2024 10:06:01 [6] Info: Backups / Syncs will only run during these hours: 3,4,5

lavinir commented 2 months ago

I'm seeing one issue in the logs, it is unrelated with the issue of the addon stopping - Not sure if this is still an issue. The error in the log usually happens when the backup takes a long time to create (depending on the size of your installation / hardware). You can increase this timeout in the settings to resolve the issue.

mikeynp commented 1 month ago

Looks like I'm getting the same issue too. It runs just fine for many weeks, then all of a sudden I notice my backups haven't been happening. My backups take around 6-8 mins to upload and it doesn't look like they are timing out on upload or failing to be created locally. My most recent log looks similar to the OP (last couple of days, with some comments I added for clarity) but I don't have any errors, everything just seems to work ok up until a certain point. I have Start on Boot enabled and the Watchdog enabled.

10/07/2024 01:13:05 [43] Info: Creating new backup
10/07/2024 01:13:05 [43] Info: Starting full local backup
10/07/2024 01:13:40 [18] Info: Backup complete
10/07/2024 01:13:40 [15] Info: Found 1 backups to upload.
10/07/2024 01:13:40 [15] Info: Uploading hass_backup_2024-10-07-01-13 (10/07/2024 01:13:05)
10/07/2024 01:13:40 [15] Info: Fetching Local Backup (Slug:37e25307)
10/07/2024 01:13:42 [15] Info: Backup (37e25307) fetched successfully
10/07/2024 01:13:44 [15] Info: Starting file upload. (Size:453621760 bytes. Attempt: 1/3)
10/07/2024 01:22:05 [43] Info: Upload completed successfully
10/07/2024 01:22:06 [43] Info: Reached Max Online Backups (14)
10/07/2024 01:22:06 [43] Info: Found 1 backups to delete from OneDrive.
10/07/2024 01:22:06 [43] Info: Deleting item: hass_backup_2024-09-23-01-05.tar
10/07/2024 01:22:07 [43] Info: Reached Max Local Backups (7)
10/07/2024 01:22:07 [43] Info: Removing 1 local backups                         # add-on stops here
10/08/2024 08:51:00 [4] Info: Anonymous Telemetry Disabled                      # add-on manually restarted here
10/08/2024 08:51:00 [4] Info: Backup interval configured to every 24 hours
10/08/2024 08:51:00 [4] Info: Backups / Syncs will only run during these hours: 1,2
jymorel commented 1 month ago

I confirm the issue with the Start On Boot option. I had activated it when I started manualy the add-on last time. And now, I find it deactivated. My last backup was made on October 7. onedrive-backup_last backup onedrive-backup_start on boot_disabled

lavinir commented 1 month ago

Could you please cross check the time where the addon stops with the Home Assistant Supervisor logs? It shouldn't happen but in case the addon does crash the logs would be there and not in the addon log itself.

jymorel commented 1 month ago

I only have 1 day of logs in HA supervisor logs ... But almost only messages about onedrive backup...

Supervisor 2024-10-13 18:18:01.911 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/zigbee2mqtt/hassio-zigbee2mqtt repository 2024-10-13 18:18:01.922 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/AlexxIT/hassio-addons repository 2024-10-13 18:18:01.932 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/adamoutler/HassOSArgonOneAddon.git repository 2024-10-13 18:18:01.939 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Poeschl/Hassio-Addons repository 2024-10-13 18:18:01.956 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/music-assistant/home-assistant-addon repository 2024-10-13 18:18:01.970 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/lavinir/hassio-onedrive-backup repository 2024-10-13 18:18:01.979 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository 2024-10-13 18:18:01.989 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository 2024-10-13 18:18:01.999 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository 2024-10-13 18:18:02.006 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository 2024-10-13 18:18:02.017 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository 2024-10-13 18:18:04.584 WARNING (SyncWorker_6) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Signalk Server 2024-10-13 18:18:04.925 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) 2024-10-13 18:18:04.942 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta 2024-10-13 18:18:05.599 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Signalk Server 2024-10-13 18:18:05.957 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) 2024-10-13 18:18:05.974 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta 2024-10-13 18:18:06.231 INFO (MainThread) [supervisor.store] Loading add-ons from store: 220 all - 0 new - 0 remove 2024-10-13 18:18:06.232 INFO (MainThread) [supervisor.store] Loading add-ons from store: 220 all - 0 new - 0 remove 2024-10-13 18:20:10.687 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:20:11.398 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:21:28.526 WARNING (MainThread) [supervisor.addons.options] Option 'local_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'onedrive_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'backup_interval_days' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'backup_name' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'monitor_all_local_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'ignore_upgrade_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'hass_api_timeout_minutes' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'notify_on_error' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_media_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_ssl_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_share_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_local_addons_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'sync_paths' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.527 WARNING (MainThread) [supervisor.addons.options] Option 'file_sync_remove_deleted' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.528 WARNING (MainThread) [supervisor.addons.options] Option 'excluded_addons' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.528 WARNING (MainThread) [supervisor.addons.options] Option 'log_level' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.528 WARNING (MainThread) [supervisor.addons.options] Option 'backup_passwd' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:21:28.528 WARNING (MainThread) [supervisor.addons.options] Option 'backup_allowed_hours' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:25:11.555 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:25:11.996 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'local_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'onedrive_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'backup_interval_days' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'backup_name' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'monitor_all_local_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'ignore_upgrade_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'hass_api_timeout_minutes' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'notify_on_error' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_media_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_ssl_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_share_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_local_addons_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.535 WARNING (MainThread) [supervisor.addons.options] Option 'sync_paths' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.536 WARNING (MainThread) [supervisor.addons.options] Option 'file_sync_remove_deleted' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.536 WARNING (MainThread) [supervisor.addons.options] Option 'excluded_addons' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.536 WARNING (MainThread) [supervisor.addons.options] Option 'log_level' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.536 WARNING (MainThread) [supervisor.addons.options] Option 'backup_passwd' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:26:30.536 WARNING (MainThread) [supervisor.addons.options] Option 'backup_allowed_hours' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:30:12.330 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:30:12.846 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:30:29.396 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'mqtt_user' 2024-10-13 18:30:29.831 INFO (MainThread) [supervisor.auth] Successful login for 'mqtt_user' 2024-10-13 18:31:32.575 WARNING (MainThread) [supervisor.addons.options] Option 'local_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.575 WARNING (MainThread) [supervisor.addons.options] Option 'onedrive_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.575 WARNING (MainThread) [supervisor.addons.options] Option 'backup_interval_days' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.575 WARNING (MainThread) [supervisor.addons.options] Option 'backup_name' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.575 WARNING (MainThread) [supervisor.addons.options] Option 'monitor_all_local_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'ignore_upgrade_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'hass_api_timeout_minutes' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'notify_on_error' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_media_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_ssl_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_share_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_local_addons_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'sync_paths' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'file_sync_remove_deleted' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'excluded_addons' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'log_level' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'backup_passwd' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:31:32.576 WARNING (MainThread) [supervisor.addons.options] Option 'backup_allowed_hours' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:35:13.271 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:35:13.755 INFO (MainThread) [supervisor.api.middleware.security] /backups access from de91e161_hassio_onedrive_backup 2024-10-13 18:36:34.522 WARNING (MainThread) [supervisor.addons.options] Option 'local_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'onedrive_backup_num_to_keep' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'backup_interval_days' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'backup_name' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'monitor_all_local_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'ignore_upgrade_backups' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'hass_api_timeout_minutes' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'notify_on_error' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_media_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_ssl_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_share_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'exclude_local_addons_folder' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'sync_paths' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.523 WARNING (MainThread) [supervisor.addons.options] Option 'file_sync_remove_deleted' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.524 WARNING (MainThread) [supervisor.addons.options] Option 'excluded_addons' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.524 WARNING (MainThread) [supervisor.addons.options] Option 'log_level' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.524 WARNING (MainThread) [supervisor.addons.options] Option 'backup_passwd' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup) 2024-10-13 18:36:34.524 WARNING (MainThread) [supervisor.addons.options] Option 'backup_allowed_hours' does not exist in the schema for OneDrive Backup (de91e161_hassio_onedrive_backup)

lavinir commented 1 month ago

I don't see anything related to the addon stopping but look at the link below to clear those warnings. That happened when moving the addon config to the addon UI. https://github.com/lavinir/hassio-onedrive-backup/issues/138#issuecomment-1775423063

If you get a repro of the addon stopping and can send the matching supervisor logs that would be helpful.

mikeynp commented 1 month ago

It stopped again today, this time I got an error in the log....however, it seemed to happen at exactly the same time that the Supervisor updated and restarted itself according to the supervisor logs (there are no other errors related to the add-on in the supervisor log).

10/14/2024 01:03:38 [31] Info: Creating new backup
10/14/2024 01:03:38 [31] Info: Starting full local backup
10/14/2024 01:04:14 [31] Info: Backup complete
10/14/2024 01:04:15 [31] Info: Found 1 backups to upload.
10/14/2024 01:04:15 [31] Info: Uploading hass_backup_2024-10-14-01-03 (10/14/2024 01:03:38)
10/14/2024 01:04:15 [31] Info: Fetching Local Backup (Slug:fc67c8e3)
10/14/2024 01:04:19 [34] Info: Backup (fc67c8e3) fetched successfully
10/14/2024 01:04:21 [34] Info: Starting file upload. (Size:460871680 bytes. Attempt: 1/3)
10/14/2024 01:12:54 [23] Info: Upload completed successfully
10/14/2024 01:12:55 [36] Info: Reached Max Online Backups (14)
10/14/2024 01:12:55 [36] Info: Found 1 backups to delete from OneDrive.
10/14/2024 01:12:55 [36] Info: Deleting item: hass_backup_2024-09-29-01-09.tar
10/14/2024 01:12:56 [25] Info: Reached Max Local Backups (7)
10/14/2024 01:12:56 [25] Info: Removing 1 local backups
10/14/2024 16:47:14 [36] Error: Unexpected error. System.Net.Http.HttpRequestException: Host is unreachable (supervisor:80)
 ---> System.Net.Sockets.SocketException (113): Host is unreachable
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at hassio_onedrive_backup.Hass.HassioClient.UpdateHassEntityStateAsync(String entityId, String payload) in /src/Hass/HassioClient.cs:line 206
   at hassio_onedrive_backup.Hass.HassOnedriveFreeSpaceEntityState.UpdateOneDriveFreespaceSensorInHass(OneDriveFreeSpaceData freeSpaceData) in /src/Hass/HassOnedriveFreeSpaceEntityState.cs:line 44
   at hassio_onedrive_backup.Orchestrator.Start() in /src/Orchestrator.cs:line 107
10/14/2024 16:47:17 [35] Error: Failed sending persistent notification. System.Net.Http.HttpRequestException: Host is unreachable (supervisor:80)
 ---> System.Net.Sockets.SocketException (113): Host is unreachable
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at hassio_onedrive_backup.Hass.HassioClient.SendPersistentNotificationAsync(String message, String notificationId) in /src/Hass/HassioClient.cs:line 186

# log stops here and add-on is also stopped
msd3287 commented 1 month ago

It stopped yesterday for my own HA instance too, and for the one located at my daughter's house. I also made the supervisor update for the 2 instances on Sunday evening. I tried to retrieve le supervisor log, but the command returned only the last 3 hours events, and I don't know how to force to get the older ones.

msd3287 commented 1 month ago

Yesterday I made the new HA core update, and this morning my automation who track last backup date and time sent me a message that my last backup was older than 29h (I backup every night around 03 AM). So the service stopped again. Luckily, my automation also relaunched successfully the integration (action: hassio.addon_start). It so seems that the issue occurs after every HA core update.

msd3287 commented 1 month ago

Yesterday I made the new HA core update, and this morning my automation who track last backup date and time sent me a message that my last backup was older than 29h (I backup every night around 03 AM). So the service stopped again. Luckily, my automation also relaunched successfully the integration (action: hassio.addon_start). It so seems that the issue occurs after every HA core update.

mikeynp commented 2 weeks ago

It stopped again today, this time I got an error in the log....however, it seemed to happen at exactly the same time that the Supervisor updated and restarted itself according to the supervisor logs (there are no other errors related to the add-on in the supervisor log).

10/14/2024 01:03:38 [31] Info: Creating new backup
10/14/2024 01:03:38 [31] Info: Starting full local backup
10/14/2024 01:04:14 [31] Info: Backup complete
10/14/2024 01:04:15 [31] Info: Found 1 backups to upload.
10/14/2024 01:04:15 [31] Info: Uploading hass_backup_2024-10-14-01-03 (10/14/2024 01:03:38)
10/14/2024 01:04:15 [31] Info: Fetching Local Backup (Slug:fc67c8e3)
10/14/2024 01:04:19 [34] Info: Backup (fc67c8e3) fetched successfully
10/14/2024 01:04:21 [34] Info: Starting file upload. (Size:460871680 bytes. Attempt: 1/3)
10/14/2024 01:12:54 [23] Info: Upload completed successfully
10/14/2024 01:12:55 [36] Info: Reached Max Online Backups (14)
10/14/2024 01:12:55 [36] Info: Found 1 backups to delete from OneDrive.
10/14/2024 01:12:55 [36] Info: Deleting item: hass_backup_2024-09-29-01-09.tar
10/14/2024 01:12:56 [25] Info: Reached Max Local Backups (7)
10/14/2024 01:12:56 [25] Info: Removing 1 local backups
10/14/2024 16:47:14 [36] Error: Unexpected error. System.Net.Http.HttpRequestException: Host is unreachable (supervisor:80)
 ---> System.Net.Sockets.SocketException (113): Host is unreachable
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at hassio_onedrive_backup.Hass.HassioClient.UpdateHassEntityStateAsync(String entityId, String payload) in /src/Hass/HassioClient.cs:line 206
   at hassio_onedrive_backup.Hass.HassOnedriveFreeSpaceEntityState.UpdateOneDriveFreespaceSensorInHass(OneDriveFreeSpaceData freeSpaceData) in /src/Hass/HassOnedriveFreeSpaceEntityState.cs:line 44
   at hassio_onedrive_backup.Orchestrator.Start() in /src/Orchestrator.cs:line 107
10/14/2024 16:47:17 [35] Error: Failed sending persistent notification. System.Net.Http.HttpRequestException: Host is unreachable (supervisor:80)
 ---> System.Net.Sockets.SocketException (113): Host is unreachable
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at hassio_onedrive_backup.Hass.HassioClient.SendPersistentNotificationAsync(String message, String notificationId) in /src/Hass/HassioClient.cs:line 186

# log stops here and add-on is also stopped

Another Supervisor update a few days ago and the add-on stopped again. Definitely some kind of issue related to this here. Once I'd manually restarted it, it was up and running again just fine.

lavinir commented 1 week ago

What seems strange to me is:

  1. Even for failures to reach the supervisor, the addon should just attempt to run its cycle on the next iteration and not crash.
  2. Even if some bug exists which caused it to crash, the Watchdog should have brought it back up.

Did you check the Supervisor logs when this happens to see what's going on with trying to bring the addon back up ?