Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 500 getaddrinfo ENOTFOUND immich-server #2055

Closed
2 of 3 tasks
MozPri opened this issue Mar 23, 2023 · 31 comments
Closed
2 of 3 tasks

[BUG] 500 getaddrinfo ENOTFOUND immich-server #2055

MozPri opened this issue Mar 23, 2023 · 31 comments

Comments

@MozPri
Copy link
Contributor

MozPri commented Mar 23, 2023

The bug

Can't access Immich web page since version v1.51.0.
I get 500 getaddrinfo ENOTFOUND immich-server error.

_immich_server_logs.txt

The OS that Immich Server is running on

Debian 11

Version of Immich Server

v1.51.2

Version of Immich Mobile App

v1.51.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Latest from the docs

Your .env content

Latest from the docs

Reproduction steps

1. Install Immich with Portainer or docker-compose
2. Go to the Immich web page

Additional information

No response

@bo0tzz
Copy link
Member

bo0tzz commented Mar 23, 2023

Is the typesense container running? The server can't reach it.

@MozPri
Copy link
Contributor Author

MozPri commented Mar 23, 2023

It's running if I add restart: always. But it's not running without it.

Edit: Actually it's not running. Just restarting...

@bo0tzz
Copy link
Member

bo0tzz commented Mar 23, 2023

You'll need to enable logging on the typesense container to figure out why it's having trouble starting. Either way this is not a problem in Immich, so I'll close this issue.

@bo0tzz bo0tzz closed this as completed Mar 23, 2023
@tinju87
Copy link

tinju87 commented Mar 23, 2023

Same problem with docker-compose running on portainer.
"Failure Unable to retrieve container logs" for typesense container

@tinju87
Copy link

tinju87 commented Mar 23, 2023

TYPESENSE_API_KEY is missing in the env file and needed by typesense container.
Adding TYPESENSE_API_KEY to the env with whatever value worked for me.

Edit: Please also mention how to update to latest version using portainer in the docs.

@MozPri
Copy link
Contributor Author

MozPri commented Mar 23, 2023

It seems that typesense requires a CPU with AVX support, which I don't have...
typesense/typesense#423 (comment)

Maybe this should be mentioned in sys requirements.

@bo0tzz
Copy link
Member

bo0tzz commented Mar 23, 2023

Good find, I think we weren't aware of that! We are planning to make typesense an optional component in a future release.

@Peda1996
Copy link

Peda1996 commented Mar 24, 2023

I have the same problem, after updating to the newest version, my immich instance (proxmox instance: debian 5.10.162-1) won't boot up.

getaddrinfo ENOTFOUND immich-server
Where can I find log files, that I can attach to that issue? Im using a dell wyse 5070 thin client as my system.

edit: I'm having the same issues with the typesense_api_key? How can I fix this?

@MozPri
Copy link
Contributor Author

MozPri commented Mar 25, 2023

@Peda1996 Try disabling machine learning and typesense.
Add this to env variables:

IMMICH_MACHINE_LEARNING_URL=false
TYPESENSE_ENABLED=false

Logs:
https://documentation.immich.app/docs/guides/docker-help#logs

@florihupf
Copy link

Running into the same thing.

Should this be re-opened?

@florihupf
Copy link

Ah, never mind. Didn't realize I need to update .env.

@florihupf
Copy link

Dang it, I got it all working and that search is SO SUPER AWESOME!

TYTYTYTY!

@Peda1996
Copy link

Peda1996 commented Mar 26, 2023 via email

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

@bertmelis do you think we can get a non-avx image working here?

@bertmelis
Copy link

bertmelis commented Apr 23, 2023

I don't know. I guess I can start a build container: https://github.com/typesense/typesense#build-from-source and see what happens.

Edit: after some minor changes to their Docker build script, it's building. I have no clue about the outcome or the time it takes.
(changes: replace docker by podman and satisfy SELinux, you might not have to do this)

@bertmelis
Copy link

So. I just built Typesense from source, using the script in the typesense repo and pointed the compose file to the locally generated image.

On my J4105 it took a less then 4 hours. Not a big deal to do it yourself. It also doesn't clutter your system with all kind of dependencies because the build process is entirely contained in build containers.

I probably won't publish an image because it actually is just too easy to create one yourself. And then it is built for your cpu.

I'm happy to write the instructions if you need help.

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

I'll give it a try! Thanks!

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

How do you get docker to reference the locally built typesense image in the compose file?

My typesense build worked after running the command several times due to some checksums not working. Eventually it did build though (not sure how long it took, walked away and got some food, when I came back build was done). It was tagged by default as typesense/typesense:nightly, which I re-tagged as typesense (in attempts of trying to make it not pull latest from dockerhub).

However, when I run docker compose pull, docker will complain that the repo typesense does not exist (which rightfully so, it does not on dockerhub). How do I get pull to skip typesense and provide a local image to be used instead? up -d works in the meantime.

@bertmelis
Copy link

bertmelis commented Apr 23, 2023

This should go in your composefile:

image: localhost/typesense/typesense:nightly

If you omit the localhost, it searches in the (online) registries as found in your configuration files.

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

If I paste that in, I get: Error response from daemon: error unmarshalling content: invalid character '<' looking for beginning of value

  typesense:
    container_name: immich_typesense
    # image: typesense/typesense:0.24.0
    image: localhost/typesense/typesense:nightly
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    # logging:
    #   driver: none
    volumes:
      - tsdata:/data
    restart: always

@bertmelis
Copy link

Sorry, I'm using Podman, not Docker. I'm not familiar with your error.

Can you run the image as-is, outside of the Immich stack?

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

Via docker run? I don't see why that wouldn't work. It's when I pull that it tries to fetch an image remotely but I want it to use the local one instead.

@bertmelis
Copy link

Some googling suggests you just shouldn't pull. When the stack is started, docker will find the local image.

docker/compose#3660

@Snuupy
Copy link

Snuupy commented Apr 23, 2023

Some googling suggests you just shouldn't pull. When the stack is started, docker will find the local image.

docker/compose#3660

Wait - but I need to pull to update immich

I did the build workaround for now

Edit: pull_policy: never is likely more correct docker/compose#3660 (comment)

@rkononov
Copy link

rkononov commented Aug 6, 2023

I don't know. I guess I can start a build container: https://github.com/typesense/typesense#build-from-source and see what happens.

Edit: after some minor changes to their Docker build script, it's building. I have no clue about the outcome or the time it takes.
(changes: replace docker by podman and satisfy SELinux, you might not have to do this)

Could you please share the changes you introduced?

@bertmelis
Copy link

I'm using postman on a SELinux-enabled machine.

The two changes:

  • replaced docker command with podman command
  • added :Z flags to volume mounts

@55nevets
Copy link

55nevets commented Nov 9, 2023

So. I just built Typesense from source, using the script in the typesense repo and pointed the compose file to the locally generated image.

On my J4105 it took a less then 4 hours. Not a big deal to do it yourself. It also doesn't clutter your system with all kind of dependencies because the build process is entirely contained in build containers.

I probably won't publish an image because it actually is just too easy to create one yourself. And then it is built for your cpu.

I'm happy to write the instructions if you need help.

@bertmelis: I'm interested in compiling typesense for my Intel N5100. Could you provide your build script? Are you still running this non-avx version, and has it been sufficient for a personal immich install?

@bertmelis
Copy link

I'm still running it. For me it is sufficient. It might take a tad longer but it's a background task. It still processes the pictures faster than I shoot them.

I don't know how I built the container but I might find some leftovers on my home server... Stay tuned.

@Snuupy
Copy link

Snuupy commented Nov 9, 2023

@bertmelis: I'm interested in compiling typesense for my Intel N5100. Could you provide your build script? Are you still running this non-avx version, and has it been sufficient for a personal immich install?

fyi you need to build this version: https://github.com/immich-app/immich/blob/main/docker/docker-compose.yml#L55C4-L55C4

please see: #300 (comment)

Just follow these instructions: https://github.com/typesense/typesense/tree/v0.24.1#build-from-source

@bertmelis
Copy link

ah yes. Typesense is on v0.25 but Immich uses v0.24. The instructions to build it yourself are extremely simple: just download/clone the Typesense repo with the correct version and execute the script.

@756yang
Copy link

756yang commented Nov 22, 2023

After my inspection, the official archive compiled by typesense supports most x64 platforms. Based on the platform instruction set, it requires at least SSE2, SSSE3, SSE4.1 support, and may require SSE3 and SSE4.2 support.

The AVX instruction set is additional and not necessarily required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants