Unable to install photoprism

I did a device migration (Docker Container) and everything works as expected. Nextcloud, Matrix, Pihole, Syncthing are up and running accessing their data. But I can not install photoprism. If I try from command line it exits when running cofiguration:

xx:xx$ docker exec -it Syncloud bash
root@xx:/# snap install photoprism
error: cannot perform the following tasks:
- Run configure hook of "photoprism" snap if present (run hook "configure":
-----
Error: exit status 1
exit status 1
-----)
root@macmini:/#

Is there anything I can do?

What kind of the docker is running on (arm64, x64, linux)?

Did the command even kill bash/docker shell bringing you back to the host shell?

docker logs:

docker logs Syncloud

syncloud logs inside docker

journalctl --no-pager -n 100

Docker runs on a x64, debian OS

the command did not kill the bash shell, I can run the log inside docker. Output:

Feb 01 16:57:32 macmini systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancontrol.pid; please update the unit file accordingly.
Feb 01 16:57:32 macmini systemd[1]: Started Service for snap application photoprism.web.
Feb 01 16:57:33 macmini systemd[1]: Started Service for snap application photoprism.mariadb.
Feb 01 16:57:34 macmini systemd[1]: Started snap.photoprism.hook.configure.d68f2e60-4d66-4d17-ad52-ee6c8f7cc754.scope.
Feb 01 16:57:35 macmini configure[14138]: 1 2025-02-01T16:57:35.784537Z macmini photoprism:configure 14138 - [photoprism:configure@0 cmd="/snap/photoprism/current/bin/sql.sh --abort-source-on-error --execute CREATE DATABASE photoprism"] executing
Feb 01 16:57:36 macmini configure[14138]: 1 2025-02-01T16:57:36.837041Z macmini photoprism:configure 14138 - - command output
Feb 01 16:57:36 macmini configure[14138]: 1 2025-02-01T16:57:36.837080Z macmini photoprism:configure 14138 - - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/snap/photoprism/current/mysql.sock' (2)
Feb 01 16:57:36 macmini configure[14138]: 1 2025-02-01T16:57:36.837093Z macmini photoprism:configure 14138 - -
Feb 01 16:57:36 macmini systemd[1]: snap.photoprism.hook.configure.d68f2e60-4d66-4d17-ad52-ee6c8f7cc754.scope: Succeeded.
Feb 01 16:57:36 macmini systemd[1]: snap.photoprism.hook.configure.d68f2e60-4d66-4d17-ad52-ee6c8f7cc754.scope: Consumed 456ms CPU time.
Feb 01 16:57:36 macmini snapd[148]: taskrunner.go:299: [change 71 "Run configure hook of \"photoprism\" snap if present" task] failed: run hook "configure":
Feb 01 16:57:36 macmini snapd[148]: -----
Feb 01 16:57:36 macmini snapd[148]: Error: exit status 1
Feb 01 16:57:36 macmini snapd[148]: exit status 1
Feb 01 16:57:36 macmini snapd[148]: -----
Feb 01 16:57:37 macmini photoprism.mariadb[14096]: 2025-02-01 16:57:37 0 [Note] /snap/photoprism/180/mariadb/usr/bin/mysqld.bin (mysqld 10.5.16-MariaDB) starting as process 14157 ...
Feb 01 16:57:37 macmini systemd[1]: Stopping Service for snap application photoprism.mariadb...
Feb 01 16:57:37 macmini systemd[1]: snap.photoprism.mariadb.service: Main process exited, code=killed, status=15/TERM
Feb 01 16:57:37 macmini systemd[1]: snap.photoprism.mariadb.service: Succeeded.
Feb 01 16:57:37 macmini systemd[1]: Stopped Service for snap application photoprism.mariadb.
Feb 01 16:57:37 macmini systemd[1]: snap.photoprism.mariadb.service: Consumed 701ms CPU time.
Feb 01 16:57:38 macmini systemd[1]: Stopping Service for snap application photoprism.web...
Feb 01 16:57:38 macmini systemd[1]: snap.photoprism.web.service: Main process exited, code=killed, status=15/TERM
Feb 01 16:57:38 macmini systemd[1]: snap.photoprism.web.service: Succeeded.
Feb 01 16:57:38 macmini systemd[1]: Stopped Service for snap application photoprism.web.
Feb 01 16:57:38 macmini systemd[1]: snap.photoprism.web.service: Consumed 423ms CPU time.
Feb 01 16:57:41 macmini snapd[148]: services.go:1111: RemoveSnapServices - disabling snap.photoprism.web.service
Feb 01 16:57:41 macmini snapd[148]: services.go:1111: RemoveSnapServices - disabling snap.photoprism.mariadb.service
Feb 01 16:57:41 macmini systemd[1]: Reloading.
Feb 01 16:57:42 macmini systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancontrol.pid; please update the unit file accordingly.
Feb 01 16:57:43 macmini systemd[1]: snap-photoprism-180.mount: Succeeded.
Feb 01 16:57:43 macmini systemd[1]: snap-photoprism-180.mount: Consumed 7ms CPU time.
Feb 01 16:57:43 macmini systemd[1]: Reloading.

Don’t know if this is relevant: There is a very huge photoprism database under data/photoprism.

Mariadb does not like something, what is your docker version?

docker -v

Potentially related: 'mariadb:latest' shows "Can't initialize timers" · Issue #434 · MariaDB/mariadb-docker · GitHub

Also can you run this:

docker run -d --name mariadb linuxserver/mariadb:10.5.16-alpine

docker exec -it mariadb mysql -e 'select version();'
Docker version 27.5.0, build a187fa5
$ docker run -d --name mariadb linuxserver/mariadb:10.5.16-alpine
Unable to find image 'linuxserver/mariadb:10.5.16-alpine' locally
10.5.16-alpine: Pulling from linuxserver/mariadb
ae32b63bd803: Pull complete 
3b67a3eeda84: Pull complete 
5badb1f0ec3f: Pull complete 
2cf6a48d97c6: Pull complete 
e1fbd5d88907: Pull complete 
Digest: sha256:a490f9b5e8101eb01fbece73a11f45af3f5c70d7d7629b1ff4d5567e1732194d
Status: Downloaded newer image for linuxserver/mariadb:10.5.16-alpine
86249d92beb79e0321cd32fb0d257661eb82f9c473cb16cee928ba00d04043a2
$ docker exec -it mariadb mysql -e 'select version();'
+---------------------+
| version()           |
+---------------------+
| 10.5.16-MariaDB-log |
+---------------------+

Can tou try running a new syncloud container with just photoprism app?

I have a second container running and try to install photoprism. But downloading the snap image takes forever at 60 kB/sec (it was super fast before). It calculates 3h30 to finish.

# snap install photoprism
error: cannot perform the following tasks:
- Run install hook of "photoprism" snap if present (run hook "install": 
-----
info platform/client.go:32 init storage {"request": "app_name=photoprism&user_name=photoprism"}
Error: Post "http://unix/app/init_storage": dial unix /var/snap/platform/common/api.socket: connect: no such file or directory
Post "http://unix/app/init_storage": dial unix /var/snap/platform/common/api.socket: connect: no such file or directory
-----)

You need to start the container first.

Sorry.
It worked now.

It worked on second container but not on first?

No, the same error code.

Logs:

Feb 02 14:29:16 macmini systemd[1]: snap.photoprism.hook.install.99f406e7-5809-48f0-b2a4-c53ed8452747.scope: Succeeded.
Feb 02 14:29:16 macmini systemd[1]: snap.photoprism.hook.install.99f406e7-5809-48f0-b2a4-c53ed8452747.scope: Consumed 18.722s CPU time.
Feb 02 14:29:17 macmini systemd[1]: Reloading.
Feb 02 14:29:18 macmini systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancontrol.pid; please update the unit file accordingly.
Feb 02 14:29:18 macmini systemd[1]: Started Service for snap application photoprism.mariadb.
Feb 02 14:29:18 macmini systemd[1]: Started Service for snap application photoprism.web.
Feb 02 14:29:20 macmini systemd[1]: Started snap.photoprism.hook.configure.ed5f2173-b8b1-4eb6-9d7b-13cda2ebe19c.scope.
Feb 02 14:29:21 macmini configure[48129]: 1 2025-02-02T14:29:21.440014Z macmini photoprism:configure 48129 - [photoprism:configure@0 cmd="/snap/photoprism/current/bin/sql.sh --abort-source-on-error --execute CREATE DATABASE photoprism"] executing
Feb 02 14:29:22 macmini configure[48129]: 1 2025-02-02T14:29:22.720658Z macmini photoprism:configure 48129 - - command output
Feb 02 14:29:22 macmini configure[48129]: 1 2025-02-02T14:29:22.720703Z macmini photoprism:configure 48129 - - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/snap/photoprism/current/mysql.sock' (2)
Feb 02 14:29:22 macmini configure[48129]: 1 2025-02-02T14:29:22.720714Z macmini photoprism:configure 48129 - -
Feb 02 14:29:22 macmini systemd[1]: snap.photoprism.hook.configure.ed5f2173-b8b1-4eb6-9d7b-13cda2ebe19c.scope: Succeeded.
Feb 02 14:29:22 macmini systemd[1]: snap.photoprism.hook.configure.ed5f2173-b8b1-4eb6-9d7b-13cda2ebe19c.scope: Consumed 503ms CPU time.
Feb 02 14:29:22 macmini snapd[148]: taskrunner.go:299: [change 77 "Run configure hook of \"photoprism\" snap if present" task] failed: run hook "configure":
Feb 02 14:29:22 macmini snapd[148]: -----
Feb 02 14:29:22 macmini snapd[148]: Error: exit status 1
Feb 02 14:29:22 macmini snapd[148]: exit status 1
Feb 02 14:29:22 macmini snapd[148]: -----
Feb 02 14:29:23 macmini systemd[1]: Stopping Service for snap application photoprism.web...
Feb 02 14:29:23 macmini systemd[1]: snap.photoprism.web.service: Main process exited, code=killed, status=15/TERM
Feb 02 14:29:23 macmini systemd[1]: snap.photoprism.web.service: Succeeded.
Feb 02 14:29:23 macmini systemd[1]: Stopped Service for snap application photoprism.web.
Feb 02 14:29:23 macmini systemd[1]: snap.photoprism.web.service: Consumed 396ms CPU time.
Feb 02 14:29:24 macmini systemd[1]: Stopping Service for snap application photoprism.mariadb...
Feb 02 14:29:24 macmini systemd[1]: snap.photoprism.mariadb.service: Main process exited, code=killed, status=15/TERM
Feb 02 14:29:24 macmini systemd[1]: snap.photoprism.mariadb.service: Succeeded.
Feb 02 14:29:24 macmini systemd[1]: Stopped Service for snap application photoprism.mariadb.
Feb 02 14:29:24 macmini systemd[1]: snap.photoprism.mariadb.service: Consumed 557ms CPU time.
Feb 02 14:29:26 macmini snapd[148]: services.go:1111: RemoveSnapServices - disabling snap.photoprism.web.service
Feb 02 14:29:26 macmini snapd[148]: services.go:1111: RemoveSnapServices - disabling snap.photoprism.mariadb.service
Feb 02 14:29:26 macmini systemd[1]: Reloading.
Feb 02 14:29:27 macmini systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancontrol.pid; please update the unit file accordingly.
Feb 02 14:29:28 macmini systemd[1]: snap-photoprism-180.mount: Succeeded.
Feb 02 14:29:28 macmini systemd[1]: snap-photoprism-180.mount: Consumed 7ms CPU time.
Feb 02 14:29:28 macmini systemd[1]: Reloading.
Feb 02 14:29:28 macmini systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid → /run/fancontrol.pid; please update the unit file accordingly.

Do you think it is a good idea to rebuild the container?
I used this image (as in the wiki):

syncloud/platform-buster-amd64:24.05

and then updated the system. Or can I directly refer to the latest?

no, let me try to reproduce the error localy

Just to make sure there is no misunderstanding.

This was a somewhat unclear. What I meant: Installing photoprism worked on the second/new container, but not on the first/old one. The log is from the first/old container. This is the output of snap list on the second/new container:

root@macmini:/# snap list
Name        Version  Rev   Tracking       Publisher   Notes
photoprism  180      180   latest/stable  syncloud**  -
platform    2161     2161  latest/stable  syncloud**  base

Ok, so what is the difference between containers which makes it fail on one and not on the other?
Amount of apps, attached storage, …
Can you just remove the broken one and use the good one?

There are some differences:

  • The new container is not updated. Platform version is 2161 from platform-buster-amd64:24.05
  • The old container is using an external HD for data, the new one a directory on the internal HD
  • I built the old container to replace the external HD with a new one. So I claimed the whole new disk for syncloud, updated the system, installed syncthing, copied the data to the new disk and restored the users. Then I installed the apps and restored backups. All the steps before installing the apps never happened on the new container.

Since I don’t want to break the (except photoprism) running old Syncloud container I would try the following steps so I can move back to the old Syncloud Container:

  1. stop the old Syncloud Container
  2. rebuild the new syncloud container with the external drive as storage volume
  3. start the new Syncloud Container, activate at syncloud.it and update the system
  4. Claim the external HD in the Syncloud GUI without erasing it and restore the users
  5. Install photoprism and check if it works
  6. If I run into the same error: Stop the new syncloud Container, Start the old container to be back at where I came from.

What is important to me before I do this: Is Step 6 possible? Will the old Syncloud container accept the external HD as storage although it has been used by the new Syncloud container briefly? I absolutely don’t want to run into the risk to erase the HD just to claim it back for Syncloud.