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

Failing to deploy own build of LibreChat #3

Open
larsrinn opened this issue Aug 21, 2023 · 9 comments
Open

Failing to deploy own build of LibreChat #3

larsrinn opened this issue Aug 21, 2023 · 9 comments

Comments

@larsrinn
Copy link

First of all, thanks for preparing all of this. This has helped me to deploy LibreChat much quicker. However, I'm struggling to change the image to one from an internal registry. Do you have an idea why this is the case? I managed to set everything up:

  • Push to our container registry
  • The web app deployment pulls from that registry

Now, during startup, we get the error logs:

2023-08-21T11:06:10.961Z INFO  - docker run -d --expose=80 --name librechatapp859rfpgz_1_ce5fcae7 -e PORT=80 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=80 -e WEBSITE_SITE_NAME=librechatapp859rfpgz -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=librechatapp859rfpgz.azurewebsites.net -e WEBSITE_INSTANCE_ID=1944b9e704a67460698ada12dadb81e86917d687076fd3f004bf1d7a730f9805 -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False nodeenergy.azurecr.io/librechat:node.energy  

2023-08-21T11:06:13.962Z INFO  - Initiating warmup request to container librechatapp859rfpgz_1_ce5fcae7_msiProxy for site librechatapp859rfpgz
2023-08-21T11:06:14.055Z INFO  - Container librechatapp859rfpgz_1_ce5fcae7_msiProxy for site librechatapp859rfpgz initialized successfully and is ready to serve requests.
2023-08-21T11:06:14.056Z INFO  - Initiating warmup request to container librechatapp859rfpgz_1_ce5fcae7 for site librechatapp859rfpgz
2023-08-21T11:06:14.068Z ERROR - Container librechatapp859rfpgz_1_ce5fcae7 for site librechatapp859rfpgz has exited, failing site start
2023-08-21T11:06:14.077Z ERROR - Container librechatapp859rfpgz_1_ce5fcae7 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

I have already tried to change the setting WEBSITES_PORT to 3080 but no success so far.


The command I'm using to build the image is:

docker build --tag $IMAGE_NAME --file Dockerfile.multi --target api-build .

(inspired from line 37 here: https://github.com/danny-avila/LibreChat/blob/main/.github/workflows/dev-images.yml )

@thunderbug1
Copy link
Owner

did you change PORT + WEBSITES_PORT + configured the webapp to listen to the configured port?
Everything needs to fit together for a working system.

@larsrinn
Copy link
Author

My assumption was: If I take the docker build command from the GitHub action, this is the which builds the images which are used. So the images should be identical (apart from the slight modification in the code I made, of course). So I should be able to just swap the images without changing anything else.

Changing the WEBSITES_PORT to 3080 was just an idea to check whether this error message will disappear. I came up with it, because this is the exposed port.

Do you have an idea why port 80 is working for the ghcr.io/danny-avila/librechat-dev-api:latest?

@thunderbug1
Copy link
Owner

port 80 is the default port for azure web apps, so unless you explicitly change it, it defaults to that.

@larsrinn
Copy link
Author

I think I have a decent knowledge in Docker and DevOps but am really struggling here. Can you explain how this makes sense:

DOCKER_REGISTRY_SERVER_URL          = "https://index.docker.io"
DOCKER_CUSTOM_IMAGE_NAME            = "ghcr.io/danny-avila/librechat-dev-api:latest"

The image name let's me presume the image is hosted on GitHub's container registry. But it claims it should use the one from Dockerhub. On Dockerhub, I don't find an image with a matching name.

Also, did you see the note on moving these settings to the application stack block in the Azure provider documentation?

grafik

@thunderbug1
Copy link
Owner

Yeah It might very well be that DOCKER_REGISTRY_SERVER_URL is actually superfluous or on the wrong place here. I didn't really look into that since I didn't have a problem with that.

@Pwd9000-ML
Copy link

Pwd9000-ML commented Jan 21, 2024

I have the same issue, and for the life of me cannot figure it out!
I am pulling the latest image from ghcr.io/danny-avila/librechat-dev-api:latest
All the ports are set to 80 but the container just wont start up. Got the same diagnostic error cannot respond to pings on HTTP port 80

@thunderbug1
Copy link
Owner

debugging failing docker image starts can be quite tricky in azure webapps since you don't get any useful logs out of it.
Can you try to run the docker image locally with the same environment variables to see if it starts there?
maybe the latest version had a breaking change at some point and doesn't start because of that.

@Pwd9000-ML
Copy link

Pwd9000-ML commented Jan 22, 2024

I get these errors:
App error:

2024-01-22T11:51:05.151465431Z 2024-01-22 11:51:05 [31merror�[39m: [31mThere was an uncaught error: The Authorization header is missing. It must use the bearer authorization method.�[39m

and platform error:

2024-01-22T11:50:45.350Z INFO - docker run -d --expose=80 --name librechatapp2698_1_00260834 -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e DOCKER_CUSTOM_IMAGE_NAME=ghcr.io/danny-avila/librechat-dev-api:latest -e PORT=80 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=80 -e WEBSITE_SITE_NAME=librechatapp2698 -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=librechatapp2698.azurewebsites.net -e WEBSITE_INSTANCE_ID=ca73f7ceb97227cd443fc5fb5ee6f8bbafbaa7f2ca5a209c491ad2b7e83c8c35 -e HTTP_LOGGING_ENABLED=1 ghcr.io/danny-avila/librechat-dev-api:latest 2024-01-22T11:50:49.126Z INFO - Initiating warmup request to container librechatapp2698_1_00260834_msiProxy for site librechatapp2698 2024-01-22T11:50:49.282Z INFO - Container librechatapp2698_1_00260834_msiProxy for site librechatapp2698 initialized successfully and is ready to serve requests. 2024-01-22T11:50:49.290Z INFO - Initiating warmup request to container librechatapp2698_1_00260834 for site librechatapp2698 2024-01-22T11:51:05.650Z INFO - Waiting for response to warmup request for container librechatapp2698_1_00260834. Elapsed time = 16.5240623 sec 2024-01-22T11:51:05.842Z ERROR - Container librechatapp2698_1_00260834 for site librechatapp2698 has exited, failing site start 2024-01-22T11:51:05.864Z ERROR - Container librechatapp2698_1_00260834 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging. 2024-01-22T11:51:06.152Z INFO - Stopping site librechatapp2698 because it failed during startup.

@Pwd9000-ML
Copy link

Pwd9000-ML commented Jan 22, 2024

UPDATE: When I remove Meilisearch integration the app works fine, I feel that the integration of Meilisearch in the Libre app integration may be what's causing the issues as that uses a docker image as well and affecting the Libre Image from starting up properly. The errors are misleading a bit.

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

3 participants