Machine Learning URL is not a URL

When I attempt to save the administration settings I receive the error
machineLearning.url must be a URL address
I have the URL set to http://machine_learning:3003 via an env var. This happens if I hit save from any section.
9 Replies
jrasm91
jrasm912y ago
Can you use the service name instead of the container name?
EnochPrime
EnochPrimeOP2y ago
I'm using docker swarm so the service name is <namespace>_<service>. I could make a network alias and try referencing that.
jrasm91
jrasm912y ago
Underscores aren't technically valid urls, which is why it is failing. We could probably loosen the validation, but ideally there is a proper url you could just use You are saying the namespace is machine and the service name is learning? Did machine-learning: 3003 not work?
EnochPrime
EnochPrimeOP2y ago
Okay, let me start over, I misspoke. The namespace is immich so the service is immich_machine_learning, but docker inspect shows it has an alias of machine_learning. I'll try the full service name Same error
jrasm91
jrasm912y ago
You can't use underscores, but I think using "machine-learning" will work still
EnochPrime
EnochPrimeOP2y ago
The settings accepted it, but then microservices died.
immich_microservices.1.mphbcfjbz6mb@McMint | [Nest] 8 - 09/22/2023, 12:22:00 AM ERROR [JobService] TypeError: fetch failed
immich_microservices.1.mphbcfjbz6mb@McMint | at Object.fetch (node:internal/deps/undici/undici:11576:11)
immich_microservices.1.mphbcfjbz6mb@McMint | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices.1.mphbcfjbz6mb@McMint | at async MachineLearningRepository.post (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:27:21)
immich_microservices.1.mphbcfjbz6mb@McMint | at async FacialRecognitionService.handleRecognizeFaces (/usr/src/app/dist/domain/facial-recognition/facial-recognition.services.js:105:23)
immich_microservices.1.mphbcfjbz6mb@McMint | at async /usr/src/app/dist/domain/job/job.service.js:107:37
immich_microservices.1.mphbcfjbz6mb@McMint | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28)
immich_microservices.1.mphbcfjbz6mb@McMint | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24)
immich_microservices.1.mphbcfjbz6mb@McMint | [Nest] 8 - 09/22/2023, 12:22:00 AM ERROR [JobService] Object:
immich_microservices.1.mphbcfjbz6mb@McMint | {
immich_microservices.1.mphbcfjbz6mb@McMint | "id": "f9708fb4-1253-47fc-81bc-a82d662fa8e2"
immich_microservices.1.mphbcfjbz6mb@McMint | }
immich_microservices.1.mphbcfjbz6mb@McMint |
immich_microservices.1.mphbcfjbz6mb@McMint | Killed
immich_microservices.1.mphbcfjbz6mb@McMint | [Nest] 8 - 09/22/2023, 12:22:00 AM ERROR [JobService] TypeError: fetch failed
immich_microservices.1.mphbcfjbz6mb@McMint | at Object.fetch (node:internal/deps/undici/undici:11576:11)
immich_microservices.1.mphbcfjbz6mb@McMint | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices.1.mphbcfjbz6mb@McMint | at async MachineLearningRepository.post (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:27:21)
immich_microservices.1.mphbcfjbz6mb@McMint | at async FacialRecognitionService.handleRecognizeFaces (/usr/src/app/dist/domain/facial-recognition/facial-recognition.services.js:105:23)
immich_microservices.1.mphbcfjbz6mb@McMint | at async /usr/src/app/dist/domain/job/job.service.js:107:37
immich_microservices.1.mphbcfjbz6mb@McMint | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28)
immich_microservices.1.mphbcfjbz6mb@McMint | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24)
immich_microservices.1.mphbcfjbz6mb@McMint | [Nest] 8 - 09/22/2023, 12:22:00 AM ERROR [JobService] Object:
immich_microservices.1.mphbcfjbz6mb@McMint | {
immich_microservices.1.mphbcfjbz6mb@McMint | "id": "f9708fb4-1253-47fc-81bc-a82d662fa8e2"
immich_microservices.1.mphbcfjbz6mb@McMint | }
immich_microservices.1.mphbcfjbz6mb@McMint |
immich_microservices.1.mphbcfjbz6mb@McMint | Killed
Machine learning was working with the underscore. I bet I could rename the service so it would be immich_machine-learning which would have the machine-learning alias.
jrasm91
jrasm912y ago
Cool
EnochPrime
EnochPrimeOP2y ago
Are underscores going to be unsupported going forward?
jrasm91
jrasm912y ago
I mean, like I said we could make it less restrictive. You can open a PR to remove the url validation and have it be free form (string) basically.

Did you find this page helpful?