genai-stack icon indicating copy to clipboard operation
genai-stack copied to clipboard

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

Open hsiehgeoVA opened this issue 1 year ago • 12 comments

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 avatar Mar 13 '24 22:03 hsiehgeoVA

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.

hsiehgeoVA avatar Mar 14 '24 15:03 hsiehgeoVA

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 avatar Apr 16 '24 11:04 HakunanMatatat

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 avatar Apr 16 '24 11:04 HakunanMatatat

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.

HakunanMatatat avatar Apr 16 '24 11:04 HakunanMatatat

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

pwrose avatar Jun 29 '24 06:06 pwrose

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

XuhaoZhao avatar Jul 27 '24 09:07 XuhaoZhao

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 avatar Aug 06 '24 15:08 Nahee-Park

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 :)

Nahee-Park avatar Aug 07 '24 02:08 Nahee-Park

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

aubrey-ford-nutrien avatar Aug 22 '24 00:08 aubrey-ford-nutrien

have some one solve it? I encountered similar problems

flyboyer avatar Aug 29 '24 09:08 flyboyer

Hi Team, I also encountered the same problem. Any pointers on how to resolve this issue?

phumlani-mbabela avatar Feb 16 '25 16:02 phumlani-mbabela