Cannot connect to ChromaDB
moneydev1111
HOBBYOP

2 months ago

Hi, I've deployed a chroma:latest docker container with such start command
chroma run --host 0.0.0.0 --port 8000 --path /data

then on my another backend service I have
```js


	chroma = new ChromaClient({
		host: process.env.CHROMA_URL!,
		ssl: isProd ? false : true,
	})

I want to connect internaly so the CHROMA_URL is just "chroma" as its settings say ( in any way I tried all the options... still doen't work ).

Also I tried connecting my backend with the public url to it, the same error.. btw the error is "Failed to connect to chromadb. Make sure your server is running and try again"

The only way I can connect is throug the browser remotely... I guess the issue is somehow with the ipv4/v6 or idk. mm hopefully it's enough info to understand what do I do wrong... Thank you.

Solved

2 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


moneydev1111
HOBBYOP

2 months ago

I guess I've figured it out...
for internal prod it should be like this

node backend

process.env.CHROMA_URL = chroma.railway.internal

	chroma = new ChromaClient({
		host: process.env.CHROMA_URL!,
		ssl: isProd ? false : true,
		port: isProd ? 8000 : 443,
	})

chroma container start command
chroma run --host :: --port 8000 --path /YOUR PATH TO DB


Status changed to Solved moneydev1111 2 months ago


Loading...