Closed dennisbrouwer91 closed 4 years ago
@ludeeus could you please move this to the supervisor repo? Thanks 😊
Sorry for posting it in the wrong one @springstan
Sorry for posting it in the wrong one @springstan
No worries 😄
Frontend is probably more fitting @springstan 502 is expected, that means the core is restarting, give it some time @dennisbrouwer91
@ludeeus : I've waited HOURSSS and it's still gaving bad gateway
I have this issue too. Tried importing a snapshot (from 112.4) onto a clean 116.2 install at the beginning of the wizard - 502 Bad Gateway. Created an account and completed the wizard, then tried uploading the same snapshot from the snapshot UI, and I get this in the log:
Client timeout error on API request snapshots/new/upload
This is in a VM on ESXi on an interface with a known working interface.
I have this issue too. Tried importing a snapshot (from 112.4) onto a clean 116.2 install at the beginning of the wizard - 502 Bad Gateway. Created an account and completed the wizard, then tried uploading the same snapshot from the snapshot UI, and I get this in the log:
Exactly same result when try to move config to new hardware.
How i fixed it : Finish the setup wizard, install the SMB plugin, copy the backup and then do a restore from the snapshots page. That works fine!
I belie it is caused by size of a backup file. It will probably timeout before image is uploaded.
I just been able to restore 22MB backup (basicaly just config). It will alow you to restore into "minimal" installation. And then upload larger backup using rsync, scp or smb share and restore it.
This needs to be reopened, it is certainly not fixed. [as of HA 0.117.2]
I spent the morning trying to restore snapshots on hassio 4.15, none of them are restorable...
Received the same message "502 Bad Gateway" everytime w/ Client timeout error on API request snapshots/new/upload
showing in the docker logs homeassistant
output.
My first try was a 560MB snapshot of which Home Assistant config tarball took 278MB and Open Z-wave tarball took up 164MB of that space. Failed.
I switched to partial backup, dropped Open Z-wave out, ran recorder.purge
w/ {"keep_days":"31", "repack":"true"}
to shrink my home-assistant_v2.db
from 12GB down to 1 GB and managed to produce a snapshot at 266MB. Failed.
The only scenario this seems to work is backing up and restoring an empty virgin configuration of Home Assistant. :\
Here are some suggestions:
home-assistant_v2.db
during the backup to reduce sizePainful workaround to get a ~400MB snapshot restored on a fresh HassOS install:
20-11-02 20:33:21 ERROR (MainThread) [supervisor.snapshots] 4a386787 is only a partial snapshot!
root
(no password), type login
at the ha> promptdropbear -B -R
start ssh to remote in root@homeassistant.local (repeat step 3 when you connect to get shell)docker exec -i -t homeassistant scp me@myworkstation:Downloads/backup_snapshot.tar .
(scp is broken on HassOS /usr/bin/dbclient missing; can't cp dropbear to /usr/bin/dbclient because squashfs / is RO)mv /mnt/data/supervisor/homeassistant/*.tar /mnt/data/supervisor/backup/
ha snapshots reload
ha snapshots restore $(ha snapshots | grep slug | cut -d: -f2)
Open another ssh connection, do step 3 and then run docker logs -f hassio_supervisor
to watch restoration do it's thing; this can take a long time on an RPi4.
20-11-02 20:46:12 INFO (MainThread) [supervisor.snapshots] Full-Restore f941c8fd start
....
20-11-02 21:09:31 INFO (MainThread) [supervisor.snapshots] Full-Restore f941c8fd done
Done! 😄
This is indeed still broken, just tried on a brand-new installation!
Just doing this today (after the n-th time an SD card failed me) and finding out this is definitely still a problem. I got the Bad Gateway message on a 300MB restore with a fresh install of 4.15. Thank you @deftdawg, your instructions saved my day.
@ludeeus Can this be reopened or should we spin up a duplicate to track this issue?
No need, all logs/errors have been removed in 0.118
Still having the same issue on Home Assistant 0.118.4 on a raspberry pi 3 running on raspberry pi OS using supervised install.
I have the same problem on a fresh install of the image hassos_rpi3-64-4.16.img.gz
on a RPI 3B+
During onboarding or trying to upload through the snapshot page results in a Bad Gateway error.
Some good news, it looks like this commit (https://github.com/home-assistant/core/pull/43851) merged into 0.118.5 could maybe help with this issue.
I have a 1.6GB snapshot (keep a lot of log files) and also cannot restore a snapshot. It says 'Snapshot too large'.
@bjschuit if the message was Uploaded snapshot is too large
, we can trace that to
Frontend: https://github.com/home-assistant/frontend/blob/590cd8500d88f992338a98c51db0c62c89ff7d4a/src/data/hassio/snapshot.ts#L112
Which connects to the backend @ api/hassio/snapshots/new/upload
Which I think ends up here (??): https://github.com/home-assistant/supervisor/blob/6f26536d97c61feeb47857f666b69244a12091a5/supervisor/api/snapshots.py#L187
The only thing I see in that method is the possibility that you could run out of temp disk space to unpack the snapshot... That's just a guess though
At least it's no longer timing out on the uploading part now, @ludeeus can you comment on what's causing the upload size error and what users might do to remedy it?
I'm having the same issue trying to restore a 638mb snapshot to a new installation of hassos_rpi3-64-5.9.img.xz
When I try to upload a snapshot, I just get a spinning circle:
Then it says "connection lost", I refresh the page, and have to re-log in again. No error messages, nothing in the logs, no snapshots.
@blerrgh not sure if @ludeeus has plans to reopen/fix/test this issue anytime soon (especially being holidays season). Your best bet is to follow the workaround steps I posted up a bit, that'll at least get you back up and running. Tag me here if those steps give you grief. Good Luck!
@blerrgh not sure if @ludeeus has plans to reopen/fix/test this issue anytime soon (especially being holidays season). Your best bet is to follow the workaround steps I posted up a bit, that'll at least get you back up and running. Tag me here if those steps give you grief. Good Luck!
Thanks for the tip. I just installed the samba add-on, copied the snapshot over, and manually restored it. Took forever but restored successfully then.
The problem
I woud like to migrate my Hass installation to a new VM, so i made a snapshot, downloaded that one and now trying to restore it on the new VM. I can select the upload option, select the file, but after a while it gives back a 502 Bad Gateway error.
Environment
Latest and greatest version of HassOS OVA (4.13)
Problem-relevant
configuration.yaml
No configuration.yaml file yet as this is in the setup wizard
Traceback/Error logs
502 Bad Gateway
In core log :
Additional information
Backup is 1.34GB.