I
Immichโ€ข3y ago
wutanc

Getting "Search is disabled (400 - Bad Request)" from the "explore" link

Using a slightly modified version of the docker-compose.yml file found in the repository. When starting it starts up I can see WARN [ImmichServer] Search is disabled so it seems like that's the cause. But why is search disabled? What am I missing? I can also see this error in the logs
immich_web | [ERROR] hooks.server.ts [handle]: AxiosError: connect ECONNREFUSED 172.18.0.22:3001
immich_web | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) {
immich_web | port: 3001,
immich_web | address: '172.18.0.22',
immich_web | [ERROR] hooks.server.ts [handle]: AxiosError: connect ECONNREFUSED 172.18.0.22:3001
immich_web | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) {
immich_web | port: 3001,
immich_web | address: '172.18.0.22',
24 Replies
wutanc
wutancOPโ€ข3y ago
Adding config here: immich.env
DB_PASSWORD=<....>
DB_DATABASE_NAME=<....>
DB_HOSTNAME=<....>
DB_USERNAME=<....>
POSTGRES_USER=<....>
POSTGRES_PASSWORD=<....>
POSTGRES_DB=<....>
PG_DATA=/var/lib/postgresql/data
NODE_ENV=production

#DB_USERNAME=postgres
#DB_PASSWORD=postgres
#DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich-redis
TYPESENSE_ENABLED=false

JWT_SECRET=<....>

PUBLIC_LOGIN_PAGE_MESSAGE=

IMMICH_WEB_URL=http://immich_web:3000
IMMICH_SERVER_URL=http://immich_server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich_machine_learning:3003
#IMMICH_API_URL_EXTERNAL=http://localhost:3001

TYPESENSE_API_KEY=<....>
TYPESENSE_DATA_DIR=/data
DB_PASSWORD=<....>
DB_DATABASE_NAME=<....>
DB_HOSTNAME=<....>
DB_USERNAME=<....>
POSTGRES_USER=<....>
POSTGRES_PASSWORD=<....>
POSTGRES_DB=<....>
PG_DATA=/var/lib/postgresql/data
NODE_ENV=production

#DB_USERNAME=postgres
#DB_PASSWORD=postgres
#DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich-redis
TYPESENSE_ENABLED=false

JWT_SECRET=<....>

PUBLIC_LOGIN_PAGE_MESSAGE=

IMMICH_WEB_URL=http://immich_web:3000
IMMICH_SERVER_URL=http://immich_server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich_machine_learning:3003
#IMMICH_API_URL_EXTERNAL=http://localhost:3001

TYPESENSE_API_KEY=<....>
TYPESENSE_DATA_DIR=/data
base.yml
version: "3.7"

services:
base:
security_opt:
- no-new-privileges=true
cpu_shares: 1024
pids_limit: 100
restart: always
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
resources:
limits:
cpus: '0.2'
memory: 800M
env_file:
- ../env/common.env
networks:
backend:
labels:
traefik.enable: 'true'

networks:
backend:
external: true
version: "3.7"

services:
base:
security_opt:
- no-new-privileges=true
cpu_shares: 1024
pids_limit: 100
restart: always
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
resources:
limits:
cpus: '0.2'
memory: 800M
env_file:
- ../env/common.env
networks:
backend:
labels:
traefik.enable: 'true'

networks:
backend:
external: true
wutanc
wutancOPโ€ข3y ago
Pastebin
version: "3.8"services: immich-server: extends: file: base...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
jrasm91
jrasm91โ€ข3y ago
TYPESENSE_ENABLED=false will disable search
wutanc
wutancOPโ€ข3y ago
omg, sometimes I'm blind It wasn't enough tho. When removing that line I also had to rename it from immich-typesense to just typesense it's using just typesense somewhere in the code and it's not configurable I guess lol, the image recognition is really bad. But it works! Thanks for the help
jrasm91
jrasm91โ€ข3y ago
It uses typesense by default, but it is configurable
wutanc
wutancOPโ€ข3y ago
Is there any docs for how to configure it?
jrasm91
jrasm91โ€ข3y ago
No, we haven't updated those yet ๐Ÿ˜Ž
wutanc
wutancOPโ€ข3y ago
How would change the name then?
jrasm91
jrasm91โ€ข3y ago
One sec
jrasm91
jrasm91โ€ข3y ago
GitHub
immich/infra.config.ts at main ยท immich-app/immich
Self-hosted photo and video backup solution directly from your mobile phone. - immich/infra.config.ts at main ยท immich-app/immich
wutanc
wutancOPโ€ข3y ago
I couldn't see it in the code either. But given that I missed the disabled ENV I'm clearly blind ๐Ÿ˜„
jrasm91
jrasm91โ€ข3y ago
Lolol
wutanc
wutancOPโ€ข3y ago
cool. for some reason github wouldn't show me that line of code when seaching for just TYPESENSE
jrasm91
jrasm91โ€ข3y ago
Weird
wutanc
wutancOPโ€ข3y ago
I mean, clearly it's to late on a friday for me to be doing anything like that. So I blame me for githubs problems as well
jrasm91
jrasm91โ€ข3y ago
Lol, idk githubs new search seems to sometimes not work great either Jwt secret isn't used anymore btw
alviss
alvissโ€ข2y ago
Hi, I get the same error on a HP Proliant Microserver G7 N54L, using AMD Turion II Neo CPU... As long as I didn't disable typesense and machine learning, I can't run Immich. By disabling typesense I am getting "Search is disabled..." error when doing a generic search (2019 for example). Is search linked with typesense and any metadata extracted from photos? Is there anything I can do to in order to be able to use typesense and machine learning? How do i know that the problem is caused by the CPU?
jrasm91
jrasm91โ€ข2y ago
Does a search with a m: prefix work?
alviss
alvissโ€ข2y ago
No, it makes no difference using m: prefix, I get the same error...
alviss
alvissโ€ข2y ago
No description
jrasm91
jrasm91โ€ข2y ago
Ah well. Looks like we disable search when you don't run typesense. Hmm OK. I remember now. Yes typesense is required for searching (always). We are considering removing typesense from our stack though and using postgres directly for search in the future, but that is probably a ways off.
alviss
alvissโ€ข2y ago
I see... Is there any way to bypass the CPU requirements in order to be able to run typesense and machine learning on my server?
jrasm91
jrasm91โ€ข2y ago
I'm not 100% sure. You would probably have to look at the typesense documentation/github repository to see. I know that it can be compiled from source, which makes it possible to run on non-pre-build arches.
alviss
alvissโ€ข2y ago
Sounds way too complicated for my skills. ๐Ÿ˜„ Anyway, thank you for your help, really appreciate it ๐Ÿ™‚

Did you find this page helpful?