Unable to run langgraph docker container due to license key verification failure #382

Closed
opened 2026-02-20 17:39:48 -05:00 by yindo · 7 comments
Owner

Originally created by @lowjiansheng on GitHub (Jan 6, 2025).

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

None

Error Message and Stack Trace (if applicable)

2025-01-06T09:17:02.271092Z [warning  ] No license key found, running in test mode with LangSmith API key. For production use, set LANGGRAPH_CLOUD_LICENSE_KEY in environment. [langgraph_license.validation] api_revision=ed92a0f api_variant=local
2025-01-06T09:17:02.323722Z [error    ] Error checking Langsmith access [langgraph_license.validation] api_revision=ed92a0f api_variant=local
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 207, in handle_async_request
    raise UnsupportedProtocol(
httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
...
httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
2025-01-06T09:17:02.334165Z [error    ] Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 693, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/local/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/api/langgraph_api/lifespan.py", line 19, in lifespan
ValueError: License verification failed. Please ensure proper configuration:
- For local development, set a valid LANGSMITH_API_KEY for an account with LangGraph Cloud access in the environment defined in your langgraph.json file.
- For production, configure the LANGGRAPH_CLOUD_LICENSE_KEY environment variable with your LangGraph Cloud license key.
Review your configuration settings and try again. If issues persist, contact support for assistance.

Description

To deploy the Langgraph server to my self-hosted server, I've built the Docker image using langgraph build. After building, I tried to run the image with the following command

docker run \
    --env-file .env \
    -p 8123:8000 \
    -e LANGSMITH_API_KEY="REDACTED" \
    -e DATABASE_URI="REDACTED" \
    -e REDIS_URI="REDACTED" \
    my-image

Unfortunately the container crashes almost immediately with the above error messages. This issue has been happening for past few versions of Langgraph, so it shouldn't be something new.

System Info

langchain_core: 0.3.28
langchain: 0.3.13
langchain_community: 0.3.13
langsmith: 0.2.7
langchain_anthropic: 0.3.1
langchain_fireworks: 0.2.6
langchain_openai: 0.2.14
langchain_text_splitters: 0.3.4
langgraph_api: 0.0.15
langgraph_cli: 0.1.65
langgraph_license: Installed. No version info available.
langgraph_sdk: 0.1.48
langgraph_storage: Installed. No version info available.

Originally created by @lowjiansheng on GitHub (Jan 6, 2025). ### Checked other resources - [X] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [X] I added a clear and detailed title that summarizes the issue. - [X] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [X] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. ### Example Code ```python None ``` ### Error Message and Stack Trace (if applicable) ```shell 2025-01-06T09:17:02.271092Z [warning ] No license key found, running in test mode with LangSmith API key. For production use, set LANGGRAPH_CLOUD_LICENSE_KEY in environment. [langgraph_license.validation] api_revision=ed92a0f api_variant=local 2025-01-06T09:17:02.323722Z [error ] Error checking Langsmith access [langgraph_license.validation] api_revision=ed92a0f api_variant=local Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions yield File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 394, in handle_async_request resp = await self._pool.handle_async_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 207, in handle_async_request raise UnsupportedProtocol( httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol. ... httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol. 2025-01-06T09:17:02.334165Z [error ] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 693, in lifespan async with self.lifespan_context(app) as maybe_state: File "/usr/local/lib/python3.11/contextlib.py", line 210, in __aenter__ return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/api/langgraph_api/lifespan.py", line 19, in lifespan ValueError: License verification failed. Please ensure proper configuration: - For local development, set a valid LANGSMITH_API_KEY for an account with LangGraph Cloud access in the environment defined in your langgraph.json file. - For production, configure the LANGGRAPH_CLOUD_LICENSE_KEY environment variable with your LangGraph Cloud license key. Review your configuration settings and try again. If issues persist, contact support for assistance. ``` ### Description To deploy the Langgraph server to my self-hosted server, I've built the Docker image using `langgraph build`. After building, I tried to run the image with the following command ``` docker run \ --env-file .env \ -p 8123:8000 \ -e LANGSMITH_API_KEY="REDACTED" \ -e DATABASE_URI="REDACTED" \ -e REDIS_URI="REDACTED" \ my-image ``` Unfortunately the container crashes almost immediately with the above error messages. This issue has been happening for past few versions of Langgraph, so it shouldn't be something new. ### System Info > langchain_core: 0.3.28 > langchain: 0.3.13 > langchain_community: 0.3.13 > langsmith: 0.2.7 > langchain_anthropic: 0.3.1 > langchain_fireworks: 0.2.6 > langchain_openai: 0.2.14 > langchain_text_splitters: 0.3.4 > langgraph_api: 0.0.15 > langgraph_cli: 0.1.65 > langgraph_license: Installed. No version info available. > langgraph_sdk: 0.1.48 > langgraph_storage: Installed. No version info available.
yindo closed this issue 2026-02-20 17:39:48 -05:00
Author
Owner

@vbarda commented on GitHub (Jan 8, 2025):

Is there any change you're defining LANGSMITH_ENDPOINT (or LANGCHAIN_ENDPOINT) in the .env file but omitting protocol? E.G. https://api.smith.langchain.com/ vs api.smith.langchain.com

@vbarda commented on GitHub (Jan 8, 2025): Is there any change you're defining `LANGSMITH_ENDPOINT` (or `LANGCHAIN_ENDPOINT`) in the .env file but omitting protocol? E.G. https://api.smith.langchain.com/ vs [api.smith.langchain.com](http://api.smith.langchain.com/)
Author
Owner

@lowjiansheng commented on GitHub (Jan 9, 2025):

LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"

Are these necessary in the .env file?

@lowjiansheng commented on GitHub (Jan 9, 2025): LANGSMITH_ENDPOINT="https://api.smith.langchain.com" LANGCHAIN_ENDPOINT="https://api.smith.langchain.com" Are these necessary in the .env file?
Author
Owner

@vbarda commented on GitHub (Jan 9, 2025):

no, they shouldn’t be necessary (unless you need to use EU instance)

@vbarda commented on GitHub (Jan 9, 2025): no, they shouldn’t be necessary (unless you need to use EU instance)
Author
Owner

@vbarda commented on GitHub (Jan 10, 2025):

Are you still running into an issue?

@vbarda commented on GitHub (Jan 10, 2025): Are you still running into an issue?
Author
Owner

@lowjiansheng commented on GitHub (Jan 10, 2025):

Removing them in my .env fixed the issue. Thank you @vbarda.

@lowjiansheng commented on GitHub (Jan 10, 2025): Removing them in my .env fixed the issue. Thank you @vbarda.
Author
Owner

@mehmetaltuntas commented on GitHub (Jan 31, 2025):

I am unable to run the app in Azure Container Apps where I simply deploy docker images. I do have a redis and postgres containers and I did deploy langgraph task-maistro sample docker image from langchain-academy course. I am getting the same error message. Has anyone attempted to deploy it into either Azure Container Apps or Kubernetes?

AZ CLI for redis

az containerapp create --name my-langgraph-redis-poc --resource-group XX --environment YY --image redis:6 --target-port 6379 --ingress external --min-replicas 1 --max-replicas 1

AZ CLI for postgres

az containerapp create --name my-langgraph-postgres-poc --resource-group XX --environment YY --image docker.io/postgres:16 --target-port 5432 --ingress external --min-replicas 1 --max-replicas 1 --env-vars "POSTGRES_USER=postgres" "POSTGRES_DB=postgres" "POSTGRES_PASSWORD=postgres"

AZ CLI for langgrap-api app

az containerapp create --name my-langgraph-api-poc-2 --resource-group XX --environment YY --image acr.azurecr.io/my-langgraph-api-4:0.1 --registry-server acr.azurecr.io --target-port 8123 --ingress external --min-replicas 1 --max-replicas 1 --env-vars "DATABASE_URI=postgres://postgres:postgres@my-langgraph-postgres-poc.io:5432/postgres?sslmode=disable" "REDIS_URI=redis://https://my-langgraph-redis-poc.io:6379" "LANGSMITH_API_KEY=api-key-xxxx"

Thanks

@mehmetaltuntas commented on GitHub (Jan 31, 2025): I am unable to run the app in Azure Container Apps where I simply deploy docker images. I do have a `redis` and `postgres` containers and I did deploy langgraph `task-maistro` sample docker image from langchain-academy course. I am getting the same error message. Has anyone attempted to deploy it into either Azure Container Apps or Kubernetes? AZ CLI for redis > `az containerapp create --name my-langgraph-redis-poc --resource-group XX --environment YY --image redis:6 --target-port 6379 --ingress external --min-replicas 1 --max-replicas 1` AZ CLI for postgres > ` az containerapp create --name my-langgraph-postgres-poc --resource-group XX --environment YY --image docker.io/postgres:16 --target-port 5432 --ingress external --min-replicas 1 --max-replicas 1 --env-vars "POSTGRES_USER=postgres" "POSTGRES_DB=postgres" "POSTGRES_PASSWORD=postgres"` AZ CLI for langgrap-api app > `az containerapp create --name my-langgraph-api-poc-2 --resource-group XX --environment YY --image acr.azurecr.io/my-langgraph-api-4:0.1 --registry-server acr.azurecr.io --target-port 8123 --ingress external --min-replicas 1 --max-replicas 1 --env-vars "DATABASE_URI=postgres://postgres:postgres@my-langgraph-postgres-poc.io:5432/postgres?sslmode=disable" "REDIS_URI=redis://https://my-langgraph-redis-poc.io:6379" "LANGSMITH_API_KEY=api-key-xxxx" ` Thanks
Author
Owner

@jmendiola222 commented on GitHub (Jun 2, 2025):

Removing them in my .env fixed the issue. Thank you @vbarda.

Same issue here, it worked when I removed those env settings. Which is not intuitive as the error is complaing for not having them (https & http). I think there is a bug there.

@jmendiola222 commented on GitHub (Jun 2, 2025): > Removing them in my .env fixed the issue. Thank you [@vbarda](https://github.com/vbarda). Same issue here, it worked when I removed those env settings. Which is not intuitive as the error is complaing for not having them (https & http). I think there is a bug there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#382