immich-machine-learning address doesn't not exist #2131

Closed
opened 2026-02-05 05:15:53 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @waclaw66 on GitHub (Feb 5, 2024).

The bug

The predefined host name immich-machine-learning for machine learning url http://immich-machine-learning:3003 doesn't exist, the correct docker container name is immich_machine_learning.

[Nest] 7  - 02/05/2024, 8:09:20 AM   ERROR [JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: getaddrinfo ENOTFOUND immich-machine-learning
[Nest] 7  - 02/05/2024, 8:09:20 AM   ERROR [JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: getaddrinfo ENOTFOUND immich-machine-learning
    at /usr/src/app/dist/infra/repositories/machine-learning.repository.js:18:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MachineLearningRepository.predict (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:17:21)
    at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/domain/smart-info/smart-info.service.js:64:31)
    at async /usr/src/app/dist/domain/job/job.service.js:116:37
    at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)

The OS that Immich Server is running on

Fedora 39

Version of Immich Server

v1.94.1

Version of Immich Mobile App

not relevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

default

Your .env content

default

Reproduction steps

just ran the default docker-compose

Additional information

Originally created by @waclaw66 on GitHub (Feb 5, 2024). ### The bug The predefined host name `immich-machine-learning` for machine learning url `http://immich-machine-learning:3003` doesn't exist, the correct docker container name is `immich_machine_learning`. ``` [Nest] 7 - 02/05/2024, 8:09:20 AM ERROR [JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: getaddrinfo ENOTFOUND immich-machine-learning [Nest] 7 - 02/05/2024, 8:09:20 AM ERROR [JobService] Error: Machine learning request to "http://immich-machine-learning:3003" failed with Error: getaddrinfo ENOTFOUND immich-machine-learning at /usr/src/app/dist/infra/repositories/machine-learning.repository.js:18:19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async MachineLearningRepository.predict (/usr/src/app/dist/infra/repositories/machine-learning.repository.js:17:21) at async SmartInfoService.handleEncodeClip (/usr/src/app/dist/domain/smart-info/smart-info.service.js:64:31) at async /usr/src/app/dist/domain/job/job.service.js:116:37 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) ``` ### The OS that Immich Server is running on Fedora 39 ### Version of Immich Server v1.94.1 ### Version of Immich Mobile App not relevant ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML default ``` ### Your .env content ```Shell default ``` ### Reproduction steps ```bash just ran the default docker-compose ``` ### Additional information
Author
Owner

@bagheriali2001 commented on GitHub (Feb 5, 2024):

Hi, can you run a few commands and send the result ?
docker inspect immich_machine_learning
docker inspect immich_server
There is lots of info here, but I only need the part "NetworkSettings" at the end.
something like this one:

        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "cf091b48a1885f2b928065ab1dc1fef5436568a118bf651734e6557d56228747",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/cf091b48a188",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "immich_network": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "immich_machine_learning",
                        "immich-machine-learning",
                        "0bc05a583333"
                    ],
                    "NetworkID": "a6a151bb1cf7d5c512b619a5ca91c4d0053c74ff5871d2645e0ef80d54f129bf",
                    "EndpointID": "f09f66522810206049b2e3d265506cb63e78964a214d23fb37f3f0aa1ab5de24",
                    "Gateway": "172.28.0.1",
                    "IPAddress": "172.28.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:1c:00:02",
                    "DriverOpts": null
                }
            }
        }
@bagheriali2001 commented on GitHub (Feb 5, 2024): Hi, can you run a few commands and send the result ? `docker inspect immich_machine_learning` `docker inspect immich_server` There is lots of info here, but I only need the part "NetworkSettings" at the end. something like this one: ``` "NetworkSettings": { "Bridge": "", "SandboxID": "cf091b48a1885f2b928065ab1dc1fef5436568a118bf651734e6557d56228747", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/cf091b48a188", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "immich_network": { "IPAMConfig": null, "Links": null, "Aliases": [ "immich_machine_learning", "immich-machine-learning", "0bc05a583333" ], "NetworkID": "a6a151bb1cf7d5c512b619a5ca91c4d0053c74ff5871d2645e0ef80d54f129bf", "EndpointID": "f09f66522810206049b2e3d265506cb63e78964a214d23fb37f3f0aa1ab5de24", "Gateway": "172.28.0.1", "IPAddress": "172.28.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:1c:00:02", "DriverOpts": null } } } ```
Author
Owner

@waclaw66 commented on GitHub (Feb 5, 2024):

docker inspect immich_machine_learning

        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "8a4a536fa0026001799cf2d50935ad10e4151fb5c224d62ac6feb18219093dd9",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/8a4a536fa002",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "immich-docker_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "829151d7958a"
                    ],
                    "NetworkID": "fb54ee178a6eb475ee30fa9e77225d44be1cf633ecb14cbfa6276a30a6c91921",
                    "EndpointID": "ba6ae93e6e3a1eab45ecc3081e723f6c4afdd421c06d32492a2f813a001dc0db",
                    "Gateway": "172.18.0.1",
                    "IPAddress": "172.18.0.5",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:12:00:05",
                    "DriverOpts": null
                }
            }
        }

docker inspect immich_server

        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "17344b73eda4d0f64635ebaa72bcc0f630f6a61a7e70a2a9b074f6de259c07d9",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "3001/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "2283"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "2283"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/17344b73eda4",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "immich-docker_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "immich-server",
                        "0b3ac660317c"
                    ],
                    "NetworkID": "fb54ee178a6eb475ee30fa9e77225d44be1cf633ecb14cbfa6276a30a6c91921",
                    "EndpointID": "4e497958cfb3d6a7e1632c7d4cbec0a16d294b3dbd8c82bc21f74840cabce7c0",
                    "Gateway": "172.18.0.1",
                    "IPAddress": "172.18.0.4",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:12:00:04",
                    "DriverOpts": null
                }
            }
        }

I see your point, there is missing alias for machine learning. Couldn't be because of older docker-composer version?
docker-compose version 1.29.2

# docker version
Client:
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.21.0
 Git commit:        %{shortcommit_cli}
 Built:             Sun Aug 27 16:45:40 2023
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.21.0
  Git commit:       %{shortcommit_moby}
  Built:            Sun Aug 27 16:45:40 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.23
  GitCommit:
 runc:
  Version:          1.1.8
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:
@waclaw66 commented on GitHub (Feb 5, 2024): docker inspect immich_machine_learning ``` "NetworkSettings": { "Bridge": "", "SandboxID": "8a4a536fa0026001799cf2d50935ad10e4151fb5c224d62ac6feb18219093dd9", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/8a4a536fa002", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "immich-docker_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "829151d7958a" ], "NetworkID": "fb54ee178a6eb475ee30fa9e77225d44be1cf633ecb14cbfa6276a30a6c91921", "EndpointID": "ba6ae93e6e3a1eab45ecc3081e723f6c4afdd421c06d32492a2f813a001dc0db", "Gateway": "172.18.0.1", "IPAddress": "172.18.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:12:00:05", "DriverOpts": null } } } ``` docker inspect immich_server ``` "NetworkSettings": { "Bridge": "", "SandboxID": "17344b73eda4d0f64635ebaa72bcc0f630f6a61a7e70a2a9b074f6de259c07d9", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "3001/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "2283" }, { "HostIp": "::", "HostPort": "2283" } ] }, "SandboxKey": "/var/run/docker/netns/17344b73eda4", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "immich-docker_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "immich-server", "0b3ac660317c" ], "NetworkID": "fb54ee178a6eb475ee30fa9e77225d44be1cf633ecb14cbfa6276a30a6c91921", "EndpointID": "4e497958cfb3d6a7e1632c7d4cbec0a16d294b3dbd8c82bc21f74840cabce7c0", "Gateway": "172.18.0.1", "IPAddress": "172.18.0.4", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:12:00:04", "DriverOpts": null } } } ``` I see your point, there is missing alias for machine learning. Couldn't be because of older docker-composer version? `docker-compose version 1.29.2` ``` # docker version Client: Version: 24.0.5 API version: 1.43 Go version: go1.21.0 Git commit: %{shortcommit_cli} Built: Sun Aug 27 16:45:40 2023 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.21.0 Git commit: %{shortcommit_moby} Built: Sun Aug 27 16:45:40 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.23 GitCommit: runc: Version: 1.1.8 GitCommit: docker-init: Version: 0.19.0 GitCommit: ```
Author
Owner

@bo0tzz commented on GitHub (Feb 5, 2024):

docker-compose 1.x is deprecated, the supported version is docker compose 2.x.

@bo0tzz commented on GitHub (Feb 5, 2024): `docker-compose` 1.x is deprecated, the supported version is `docker compose` 2.x.
Author
Owner

@waclaw66 commented on GitHub (Feb 5, 2024):

@bo0tzz: docker-compose v1.x is just fine. It turned out, that I forgot immich-machine-learning in network_mode: host from my previous tests. It works properly without it and alias is present. Sorry for my mistake.

                    "Aliases": [
                        "immich-machine-learning",
                        "4fe499c73b32"
                    ],
@waclaw66 commented on GitHub (Feb 5, 2024): @bo0tzz: docker-compose v1.x is just fine. It turned out, that I forgot immich-machine-learning in `network_mode: host` from my previous tests. It works properly without it and alias is present. Sorry for my mistake. ``` "Aliases": [ "immich-machine-learning", "4fe499c73b32" ], ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2131