Poeschl / Hassio-Addons

The repository for my Home Assistant Supervisor Add-ons.
Apache License 2.0
315 stars 91 forks source link

syncthings addon failing #445

Closed coolbombom closed 6 months ago

coolbombom commented 11 months ago

Which addon? syncthings

Describe the bug syncthing is not syncing

syncthing show following error in gui and log: Failure checking encryption consistency with device computer for folder "common-sync-folder" (z64hu-dw22): open /root/common-sync-folder/.stfolder/syncthing-encryption_password_token: no such file or directory

To Reproduce i have no idea how it got to this stage. imagine after a update of homeassistant and a restart.

Expected behavior syncthing to sync

System Core 2023.11.1 Supervisor 2023.10.1 Operating System 11.1 Brugerflade 20231030.1

coolbombom commented 10 months ago

Hi

I finally figured out how to reproduce this issue.

I removed the addon, installed it again, synced with clients, everything works as it should.

I restart home assistant server, and the error occurs.

I have a password on the folder i sync from the clients, and maybe that is the issue? The syncthing server is loosing password token after restart of docker container.

kind regards cbb

coolbombom commented 10 months ago

In other words the docker setup needs to be setup to retain/store the encryption_password_token between restart of docker container? could that be it?

salim-b commented 9 months ago

In other words the docker setup needs to be setup to retain/store the encryption_password_token between restart of docker container? could that be it?

Well, yes. Although, it's not only the encryption_password_token but also the synced data that needs to be retained between container restarts. Which brings us to...

Failure checking encryption consistency with device computer for folder "common-sync-folder" (z64hu-dw22): open /root/common-sync-folder/.stfolder/syncthing-encryption_password_token: no such file or directory

You're attempting to store syncthing data under /root/, it appears. That won't work due to Home Assistant's container setup:

When using this add-on to permanently hold your data, put the synced folders inside one of the following directories:

  • /data
  • /media
  • /share
  • /config
  • /ssl
  • /addons

Only the above directories are mapped into the add-on container. If you put synced folders in any other directory (like /root or /mnt), the synced data will be deleted on container restart.

RTFM :wink:

tomaszduda23 commented 9 months ago

It would be nice to make default folder persistent https://github.com/Poeschl/Hassio-Addons/issues/447. I know that doc already mentioned that but what is the point of syncing to temporary folder at all?

salim-b commented 8 months ago

Latest release of the add-on (v1.18.2) defaults to /share as folder path, which is persistent.

@Poeschl I think this issue can be closed.