Closed lachlanalston closed 1 year ago
I had this same issue too, thanks for reporting
The image is deprecated it means we need to switch to a new one that doesn't have embedded postgres so the database will be lost... And the new postgres add-on must be downloaded and used for immich to work. This is quite inconvenient but the way the image on which my add-on is based is now defined
Thanks for the quick response.
Seems to somewhat be working now, the web gui works for a 15 seconds or so and then crashes and gets this error on the web interface:
connect ECONNREFUSED 127.0.0.1:3001
If i then wait another 10 seconds or so and refresh the normal immich interface comes up and then repeats.
These are the errors from the logs and the errors will loop
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}
[Nest] 604 - 09/21/2023, 12:43:25 PM ERROR [RedisIoAdapter] Redis subClient: Error: connect ECONNREFUSED 127.0.0.1:6379
[Nest] 604 - 09/21/2023, 12:43:25 PM ERROR [RedisIoAdapter] Redis pubClient: Error: connect ECONNREFUSED 127.0.0.1:6379
[Nest] 604 - 09/21/2023, 12:43:25 PM ERROR [RedisIoAdapter] Redis subClient: Error: connect ECONNREFUSED 127.0.0.1:6379
[Nest] 604 - 09/21/2023, 12:43:25 PM ERROR [RedisIoAdapter] Redis pubClient: Error: connect ECONNREFUSED 127.0.0.1:6379
[Nest] 604 - 09/21/2023, 12:43:26 PM ERROR [RedisIoAdapter] Redis subClient: Error: connect ECONNREFUSED 127.0.0.1:6379
[Nest] 604 - 09/21/2023, 12:43:26 PM ERROR [RedisIoAdapter] Redis pubClient: Error: connect ECONNREFUSED 127.0.0.1:6379
If i leave it looping for 5 minutes it eventually spits this out as well:
/app/immich/server/node_modules/ioredis/built/redis/event_handler.js:182
self.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest));
^
MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.
at Socket.<anonymous> (/app/immich/server/node_modules/ioredis/built/redis/event_handler.js:182:37)
at Object.onceWrapper (node:events:629:26)
at Socket.emit (node:events:514:28)
at TCP.<anonymous> (node:net:323:12)
Node.js v18.17.1
Any help would be greatly appreciated
Thanks, that must be a bug with the new image ; I'll try to look as soon as possible
@alexbelgium Still I am not able to make it work with external postgres addon.
I an getting error of below error on startup
/etc/cont-init.d/99-database.sh: executing
[23:00:55] WARNING: Your previous database was exported to /share/postgresql_immich.tar.gz
[23:00:55] INFO: Defining database
[23:00:55] INFO: -----------------
[23:00:55] INFO: Connecting to external postgresql
[23:00:55] INFO:
chown: invalid user: βpostgresβ
*Error* : /etc/cont-init.d/99-database.sh exiting 1
/etc/cont-init.d/99-run.sh: executing
looking into code, I see in database setup file still assigns a unix username 'postgres' which does not exists immich/rootfs/etc/cont-init.d/99-database.sh
if we don't have postgres in image, how do we create database at first place?
Eventually database setup fails and addon does not start even for external postgres.
I'll try something in a newly pushed test version
v5 tested to work on my system
Thanks for the quick response. I can confirm that v5 is working for me as well
@alexbelgium Thanks, Works fine now.
@alexbelgium On the same version, I am getting errors constantly as below and machine learning features are not working.
I see /data/machine-learning is created and given UID permission (in folders.sh) but immich is checking /config/machine-learning (default path).
[2023-09-22 22:11:06 +0530] [1308] [CRITICAL] WORKER TIMEOUT (pid:16401)
[2023-09-22 22:11:07 +0530] [1308] [ERROR] Worker (pid:16401) was sent SIGKILL! Perhaps out of memory?
[2023-09-22 22:11:07 +0530] [16452] [INFO] Booting worker with pid: 16452
There was a problem when trying to write in your cache folder (/config/machine-learning). You should set the environment variable TRANSFORMERS_CACHE to a writable directory.
Pushed ; please let me know
Pushed ; please let me know
Thanks. That Error is gone now.
but still it is not working. now i am not sure if it is issue in addon or base image or HW ( i am running rpi4 - 2G RAM, 4G swap on SSD - cpu consumption is 1 core 100% while jobs are running).
[2023-09-22 23:48:13 +0530] [2767] [INFO] Booting worker with pid: 2767
[2023-09-22 23:48:43 +0530] [1305] [CRITICAL] WORKER TIMEOUT (pid:2767)
[2023-09-22 23:48:45 +0530] [1305] [ERROR] Worker (pid:2767) was sent SIGKILL! Perhaps out of memory?
[2023-09-22 23:48:45 +0530] [2821] [INFO] Booting worker with pid: 2821
[2023-09-22 23:49:15 +0530] [1305] [CRITICAL] WORKER TIMEOUT (pid:2821)
[2023-09-22 23:49:16 +0530] [1305] [ERROR] Worker (pid:2821) was sent SIGKILL! Perhaps out of memory?
[2023-09-22 23:49:16 +0530] [2873] [INFO] Booting worker with pid: 2873
[2023-09-22 23:49:46 +0530] [1305] [CRITICAL] WORKER TIMEOUT (pid:2873)
[Nest] 1312 - 09/22/2023, 11:49:47 PM ERROR [JobService] Unable to run job handler (recognizeFaces/recognize-faces): TypeError: fetch failed
[Nest] 1312 - 09/22/2023, 11:49:47 PM ERROR [JobService] TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at async MachineLearningRepository.post (/app/immich/server/dist/infra/repositories/machine-learning.repository.js:27:21)
at async FacialRecognitionService.handleRecognizeFaces (/app/immich/server/dist/domain/facial-recognition/facial-recognition.services.js:105:23)
at async /app/immich/server/dist/domain/job/job.service.js:107:37
at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:346:28)
at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:531:24)
[Nest] 1312 - 09/22/2023, 11:49:47 PM ERROR [JobService] Object:
{
"id": "a6a19d7f-a8b1-4b3e-9e2a-88fd0babc959"
}
Pushed ; please let me know Thanks. That Error is gone now.
Hi, the requirement is at least 4go ram it seems⦠https://documentation.immich.app/docs/install/requirements ; perhaps you could ask in the immich GitHub repo otherwise
Hi, the requirement is at least 4go ram it seems⦠https://documentation.immich.app/docs/install/requirements ; perhaps you could ask in the immich GitHub repo otherwise
Thank you very much for helping out. Looking further, it looks fimiliar with fix(ml): set higher default worker timeout they have added timeout to 120sec instead of 30s default to their docker compose way. I see we are using single docker solution, not sure where to pass this value.
On parallel I tried installing immich using docker compose outside HA (on same HW) and it is working fine with machine learning things working too. (Now Home Assistant complains about I am running other software outside HA in docker but I can ignore that)
Update: found a place where it should be added. Raised an issue in that repo Increase worker timout
Yes, nicely seen! We can also modify the files through my dockerfile (with a sed command for example) but it's true that modifying the upstream container the best solution !
Yes, nicely seen! We can also modify the files through my dockerfile (with a sed command for example) but it's true that modifying the upstream container the best solution !
we will export the MACHINE_LEARNING_WORKERS
and MACHINE_LEARNING_WORKER_TIMEOUT
for you to play with as needed
Thanks @hydazz, that makes sense. Let us know when PR can be merged into main.
Thanks @hydazz for merging it. @alexbelgium I guess you need to rebuild image of addon.
Thanks a ton both you.
Thanks very much! Rebuild ongoing! New env are set as optional with default values of 1 worker and 120 seconds
Perfect. It works with all ML features. π
Thanks ! Then as both issues from this element (redis and ml) are confirmed working I'll close it! Thanks to all
Description
Any help would be greatly appreciated
Installed Immich addon using the default settings
sql server cant connect durring install
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
Then later on this loops
[Nest] 727 - 09/20/2023, 1:40:12 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... Error: connect ECONNREFUSED 172.30.32.1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) It is highly recommended to use a minimum Redis version of 6.2.0 Current: 6.0.16
See full logs attached
Reproduction steps
Addon Logs