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

dependency failed to start: container genai-stack-api-1 is unhealthy #142

Open
hsiehgeoVA opened this issue Mar 13, 2024 · 10 comments
Open

Comments

@hsiehgeoVA
Copy link

First ran into /data problem. Followed the thread #134 and implemented three changes: (a) chown /home/casev/../genai-stack/data directory to casev for userID and groupID. (2) added to /home/casev/.profile two statements: export USER_ID=$(id -u) and export GROUP_ID=$(id -g). (3) modified docker-compose.yml to set database: user: ${USER_ID}:${GROUP_ID}.
Next, run docker compose --profile linux up again. This time, the /data file error did not appear, and installation went further.
However, it still stopped with an error message: dependency failed to start: container genai-stack-api-1 is unhealthy.
Even after shutdown and restart, docker compose seemed to be stuck for hours displaying with different port numbers:
INFO: 127.0.0.1:xxxxxx - "GET / HTTP/1.1" 200 OK with different port numbers.

@hsiehgeoVA
Copy link
Author

Tried again and again. Finally the installation seemed to be OK even with the INFO messages which would stop after perhaps 30+.
Now I use nohup docker compose ... & to run it. Can get most of the demo apps working, except the support agent bot: able to get the web page. However, it only showed the section for Select RAG mode. Do not see a textbox for entering a prompt.

@HakunanMatatat
Copy link

HakunanMatatat commented Apr 16, 2024

I have installed genai stack many times but it has failed.

The error situation is as follows:

dependency failed to start: container genai-stack-database-1 exited (1)

dependency failed to start: container genai-stack-api-1 is unhealthy

api-1 | requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/all-MiniLM-L6-v2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ab84cd55f90>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: a385a3c1-472c-4be7-991c-f1d9f11e2d95)') dependency failed to start: container genai-stack-api-1 exited (1)

api-1 | File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 218, in newconn api-1 | raise NewConnectionError( api-1 | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ab84cd55f90>: Failed to establish a new connection: [Errno 101] Network is unreachable

How should we solve it?

@HakunanMatatat
Copy link

I am using a personal desktop computer and Clash, 127.0.0.1:7890
The attachment is my. env and yml configuration files
1)
Docker run it rm gpus all ubuntu nvidia smi
Display successful installation.
2)
Git clone https://github.com/docker/genai-stack
CD genai stack
3)
Docker compose -- profile linux-gpu up
env.txt
docker-compose.yml.txt

@HakunanMatatat
Copy link

HakunanMatatat commented Apr 16, 2024

image
There are some error messages above.

This is opening http://localhost:8501/
Screenshot 2024-04-16 191225

The display shows that Python 3.11 was not found locally (only Python 3.10 was found locally),
and it was not found in the Docker also.

I don't know where all the Python packages installed in the requirements.

@pwrose
Copy link

pwrose commented Jun 29, 2024

I'm also getting an "dependency failed to start: container genai-stack-api-1 is unhealthy" error on Mac M1 Max:

api-1         | /usr/local/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it run `pip install -U langchain-huggingface` and import as `from langchain_huggingface import HuggingFaceEmbeddings`.
api-1         |   warn_deprecated(
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container genai-stack-api-1 is unhealthy

@XuhaoZhao
Copy link

I encounter same problem !

/usr/local/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class HuggingFaceEmbeddingswas deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it runpip install -U langchain-huggingfaceand import asfrom langchain_huggingface import HuggingFaceEmbeddings. api-1 | warn_deprecated( Gracefully stopping... (press Ctrl+C again to force) dependency failed to start: container genai-stack-api-1 is unhealthy

@Nahee-Park
Copy link

Nahee-Park commented Aug 6, 2024

I was experiencing the same issue :(

api-1        | /usr/local/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it run `pip install -U langchain-huggingface` and import as `from langchain_huggingface import HuggingFaceEmbeddings`.
api-1        |   warn_deprecated(
api-1        | /usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_deprecation.py:131: FutureWarning: 'cached_download' (from 'huggingface_hub.file_download') is deprecated and will be removed from version '0.26'. Use `hf_hub_download` instead.
api-1        |   warnings.warn(warning_message, FutureWarning)
pdf_bot-1    | /usr/local/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it run `pip install -U langchain-huggingface` and import as `from langchain_huggingface import HuggingFaceEmbeddings`.
pdf_bot-1    |   warn_deprecated(
pdf_bot-1    | /usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_deprecation.py:131: FutureWarning: 'cached_download' (from 'huggingface_hub.file_download') is deprecated and will be removed from version '0.26'. Use `hf_hub_download` instead.
pdf_bot-1    |   warnings.warn(warning_message, FutureWarning)
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container genai-stack-api-1 is unhealthy

I managed to resolve this issue by using the Neo4j Sandbox.(https://sandbox.neo4j.com/) The same error persisted locally, but upon checking the detailed logs, it seemed that the problem was related to the NEO4J_URI. I created a Neo4j Sandbox, then updated the .env file with the generated URL, username, and password, which fixed the issue.

@Nahee-Park
Copy link

I just solved this issue!
You can set your .env file like below:

NEO4J_URI=neo4j://database:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=password

and then it works!
Also, if you visit http://localhost:7474/browser/ and use the following credentials:

bolt://0.0.0.0:7687
username: neo4j
password: password

then you can check your database :)

@aubrey-ford-nutrien
Copy link

I get the same issue. Setting those .env variables does not fix the issue. Those are the defaults. Your successful build was incidental.

@flyboyer
Copy link

have some one solve it? I encountered similar problems

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

7 participants