lomorage / homepage

home page source
215 stars 12 forks source link

Restarted docker and it failed #23

Closed darrepac closed 1 year ago

darrepac commented 2 years ago

Hello

I had to restart the lomorage docker and it failed with the following in the logs:

+ '[' 1 -lt 1 ']'
+ LOMOD_PORT=8001
+ /opt/lomorage/bin/lomod -p 8001 -b /lomo --max-upload 1 --max-fetch-preview 3
time="2022-07-11T21:32:55Z" level=info msg="using file permision: -rw-r--r--, folder permission: -rwxr-x---\n"
time="2022-07-11T21:32:55Z" level=info msg="No changes needed!"
time="2022-07-11T21:32:55Z" level=info msg="probe transcode app at /opt/lomorage/bin got neither ffmpeg nor avconv are found at /opt/lomorage/bin"
time="2022-07-11T21:32:55Z" level=info msg="probe ffprobe at /opt/lomorage/bin got stat /opt/lomorage/bin/ffprobe: no such file or directory"
time="2022-07-11T21:32:55Z" level=info msg="probe exiftool at /opt/lomorage/bin got stat /opt/lomorage/bin/exiftool: no such file or directory"
time="2022-07-11T21:32:55Z" level=info msg="debug log file is /lomo/var/log/lomod.log"
time="2022-07-11T21:32:55Z" level=info msg="access log file is /lomo/var/log/lomod_access.log"
time="2022-07-11T21:32:55Z" level=info msg="backup log file is /lomo/var/log/lomod_backup.log"
time="2022-07-11T21:32:55Z" level=info msg="inconsistent check log file is /lomo/var/log/lomod_check.log"
2022/07/11 21:32:57 Vips started with concurrency=4 cache_max_files=0 cache_max_mem=0 cache_max=0
2022/07/11 21:32:58 Registered image type loader type=pdf
2022/07/11 21:32:58 Registered image type loader type=png
2022/07/11 21:32:58 Registered image type loader type=svg
2022/07/11 21:32:58 Registered image type loader type=tiff
2022/07/11 21:32:58 Registered image type loader type=webp
2022/07/11 21:32:58 Registered image type loader type=gif
2022/07/11 21:32:58 Registered image type loader type=jpeg
2022/07/11 21:32:58 Registered image type loader type=magick
time="2022-07-11T21:33:08Z" level=info msg="Published service: 28ad0634ff36, type: _lomod._tcp, domain: local."
time="2022-07-11T21:38:08Z" level=fatal msg="context deadline exceeded"

Any hints... may-be it will restart next

dwebfan commented 2 years ago

Sorry to hear that. Can running sqlite3 /lomo/var/assets.db 'select count(*) from asset' inside docker output right number?

Also does it work after restart?

darrepac commented 2 years ago

sqlite3 /lomo/var/assets.db 'select count(*) from asset'

Sorry to hear that. Can running sqlite3 /lomo/var/assets.db 'select count(*) from asset' inside docker output right number?

No it seems, it is removing all my files from the database: now 8050, while I imported about 40k files successfully some days ago :(

Also does it work after restart?

Yes the container started well the second try

dwebfan commented 2 years ago

yes, I remember you imported using --no-move option, which will keep your original file untouched. One possibility is somehow that directory was not mounted correctly one time, and inconsistency check thought they were removed, thus clean them. We need discuss a solution internally to cover this case.

darrepac commented 2 years ago

well in fact, all data and running dockers are on the same disk.... just an other directory and I did not want to replicate data, that's why I used the --no-move option. So it should not be a mounting issue as in that case, nothing would run. But yes, it seems something makes it think data have been deleted... I let you investigate.

fuji246 commented 2 years ago

@dwebfan , any update on this?

fuji246 commented 1 year ago

now lomod won't auto remove database records if the files are not existing in file system, so this problem should be fixed now.

fuji246 commented 1 year ago

close it now, feel free to reopen if it still happens.