sabeechen / hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive
MIT License
3.12k stars 189 forks source link

Fails to start because already running (Another job is running for job group) #992

Closed MikeBookham closed 7 months ago

MikeBookham commented 7 months ago

Now I have noticed that this Add-On will no longer start, either via the Add-On or via the Side-Bar.

This Add-On was initially operating as expected, but after an update of Home Assistant OS Core from 2023.01.5 to 2023.01.6 about a week ago, no backups have run since. I have only last night managed to get the HA OS FrontEnd operational by updgrading to 2024.2.1

I have: Rebooted the system Performed a manual backup which works Rebooted again

Here is the log information: _Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:138 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 13:02:30 (6 occurrences) Last logged: 13:15:33

Failed to to call /addons/cebe7a76_hassio_google_drive_backup/start - Another job is running for job group addon_cebe7a76_hassio_google_drive_backup Failed to to call /addons/cebe7a76_hassio_google_drive_backup/stats - Container addon_cebe7a76_hassio_google_drivebackup is not running Failed to to call /supervisor/stats -

## System Information version core-2024.2.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.63-haos-raspi
arch aarch64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1384 Downloaded Repositories | 16
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.01.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 27.8 GB disk_used | 13.3 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Tailscale (0.15.0), File editor (5.7.0), UniFi Network Application (3.0.3), Studio Code Server (5.15.0), Advanced SSH & Web Terminal (17.1.0), Home Assistant Google Drive Backup (0.112.1), ESPHome (2023.12.9)
Dashboards dashboards | 4 -- | -- resources | 11 views | 5 mode | storage
Recorder oldest_recorder_run | 4 February 2024 at 22:21 -- | -- current_recorder_run | 11 February 2024 at 12:52 estimated_db_size | 224.12 MiB database_engine | sqlite database_version | 3.44.2
sabeechen commented 7 months ago

This might be hard to sort out. If I'm reading the source code from the supervisor correctly this error gets printed out because the addon is already busy doing something else (like starting, stopping) etc. so something that happened previously is preventing the addon from starting. What that is I'm not sure of is what that first thing is.

If I'm being honest, I find this aspect of how the supervisor works pretty unintelligible. I've been reading the source code for a good hour now and can't make heads or tails of when it does/doesn't get invoked because of all the python method wrapping and sbatractions. I'm kind of at a loss for figuring out whats actually going on here.

If I were you I'd try this:

This fixes most "weird" problems I see with the supervisor.

MikeBookham commented 7 months ago

This might be hard to sort out. If I'm reading the source code from the supervisor correctly this error gets printed out because the addon is already busy doing something else (like starting, stopping) etc. so something that happened previously is preventing the addon from starting. What that is I'm not sure of is what that first thing is.

If I'm being honest, I find this aspect of how the supervisor works pretty unintelligible. I've been reading the source code for a good hour now and can't make heads or tails of when it does/doesn't get invoked because of all the python method wrapping and sbatractions. I'm kind of at a loss for figuring out whats actually going on here.

If I were you I'd try this:

  • Make a partial backup of the just the addon.
  • Download it somewhere safe.
  • Uninstall the addon.
  • Restart your machine. Note: Don't restart Home Assistant, restart the host machine.
  • Restore the partial backup with just the addon in it.

This fixes most "weird" problems I see with the supervisor.

I did the following and can confirm that this Add-On is now functioning correctly.

I believe that the issue is related to Home Assistant OS Core because a number of my addons were corrupted after an update from 2023.01.5 to 2023.01.6

My general expierence so far and from reports of others with addons and integrations crashing/failing for no apparant reason is that it looks like Nabu Casa has poor or no governance of the core HA system which is very dissapointing.

EarlCrane commented 3 months ago

I had the same issue - fixed by running the command

supervisor repair

I let it run for about 10 minutes until complete. I have no idea why that worked so easily.

The cause was a bad shutdown. I just migrated to a Synology 224+ and accidentally unplugged the power supply when moving it.

I hope it works for you!