Invalid License key
shanumas opened this issue · 25 comments
2024-06-27 22:45:27 langgraph-api-1 | 2024-06-27 20:45:27,485:INFO:uvicorn.error Started server process [1]
2024-06-27 22:45:25 langgraph-postgres-1 | The files belonging to this database system will be owned by user "postgres".
2024-06-27 22:45:25 langgraph-postgres-1 | This user must also own the server process.
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | The database cluster will be initialized with locale "en_US.utf8".
2024-06-27 22:45:27 langgraph-api-1 | 2024-06-27 20:45:27,485:INFO:uvicorn.error Waiting for application startup.
2024-06-27 22:45:25 langgraph-postgres-1 | The default database encoding has accordingly been set to "UTF8".
2024-06-27 22:45:27 langgraph-api-1 | Not enough segments
2024-06-27 22:45:27 langgraph-api-1 | 2024-06-27 20:45:27,486:ERROR:uvicorn.error Traceback (most recent call last):
2024-06-27 22:45:27 langgraph-api-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 732, in lifespan
2024-06-27 22:45:27 langgraph-api-1 | async with self.lifespan_context(app) as maybe_state:
2024-06-27 22:45:25 langgraph-postgres-1 | The default text search configuration will be set to "english".
2024-06-27 22:45:27 langgraph-api-1 | File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:27 langgraph-api-1 | return await anext(self.gen)
2024-06-27 22:45:27 langgraph-api-1 | ^^^^^^^^^^^^^^^^^^^^^
2024-06-27 22:45:25 langgraph-postgres-1 | Data page checksums are disabled.
2024-06-27 22:45:27 langgraph-api-1 | File "/api/langgraph_api/lifespan.py", line 18, in lifespan
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
2024-06-27 22:45:27 langgraph-api-1 | ValueError: License key is not valid
2024-06-27 22:45:25 langgraph-postgres-1 | creating subdirectories ... ok
2024-06-27 22:45:27 langgraph-api-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | selecting dynamic shared memory implementation ... posix
2024-06-27 22:45:27 langgraph-api-1 | 2024-06-27 20:45:27,486:ERROR:uvicorn.error Application startup failed. Exiting.
2024-06-27 22:45:25 langgraph-postgres-1 | selecting default max_connections ... 100
2024-06-27 22:45:25 langgraph-postgres-1 | selecting default shared_buffers ... 128MB
2024-06-27 22:45:25 langgraph-postgres-1 | selecting default time zone ... Etc/UTC
2024-06-27 22:45:25 langgraph-postgres-1 | creating configuration files ... ok
2024-06-27 22:45:25 langgraph-postgres-1 | running bootstrap script ... ok
2024-06-27 22:45:25 langgraph-postgres-1 | performing post-bootstrap initialization ... ok
2024-06-27 22:45:25 langgraph-postgres-1 | initdb: warning: enabling "trust" authentication for local connections
2024-06-27 22:45:25 langgraph-postgres-1 | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2024-06-27 22:45:25 langgraph-postgres-1 | syncing data to disk ... ok
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | Success. You can now start the database server using:
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | waiting for server to start....2024-06-27 20:45:25.813 UTC [48] LOG: starting PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.817 UTC [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.830 UTC [51] LOG: database system was shut down at 2024-06-27 20:45:25 UTC
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.836 UTC [48] LOG: database system is ready to accept connections
2024-06-27 22:45:25 langgraph-postgres-1 | done
2024-06-27 22:45:25 langgraph-postgres-1 | server started
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2024-06-27 22:45:25 langgraph-postgres-1 |
2024-06-27 22:45:25 langgraph-postgres-1 | waiting for server to shut down...2024-06-27 20:45:25.921 UTC [48] LOG: received fast shutdown request
2024-06-27 22:45:25 langgraph-postgres-1 | .2024-06-27 20:45:25.927 UTC [48] LOG: aborting any active transactions
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.928 UTC [48] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.928 UTC [49] LOG: shutting down
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.932 UTC [49] LOG: checkpoint starting: shutdown immediate
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.960 UTC [49] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.008 s, sync=0.005 s, total=0.033 s; sync files=2, longest=0.003 s, average=0.003 s; distance=0 kB, estimate=0 kB; lsn=0/14EA208, redo lsn=0/14EA208
2024-06-27 22:45:25 langgraph-postgres-1 | 2024-06-27 20:45:25.963 UTC [48] LOG: database system is shut down
2024-06-27 22:45:26 langgraph-postgres-1 | done
2024-06-27 22:45:26 langgraph-postgres-1 | server stopped
2024-06-27 22:45:26 langgraph-postgres-1 |
2024-06-27 22:45:26 langgraph-postgres-1 | PostgreSQL init process complete; ready for start up.
2024-06-27 22:45:26 langgraph-postgres-1 |
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.042 UTC [1] LOG: starting PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.043 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.043 UTC [1] LOG: listening on IPv6 address "::", port 5432
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.051 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.060 UTC [62] LOG: database system was shut down at 2024-06-27 20:45:25 UTC
2024-06-27 22:45:26 langgraph-postgres-1 | 2024-06-27 20:45:26.066 UTC [1] LOG: database system is ready to accept connections
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.888 UTC [1] LOG: received fast shutdown request
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.892 UTC [1] LOG: aborting any active transactions
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.894 UTC [1] LOG: background worker "logical replication launcher" (PID 65) exited with exit code 1
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.894 UTC [60] LOG: shutting down
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.898 UTC [60] LOG: checkpoint starting: shutdown immediate
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.925 UTC [60] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.008 s, sync=0.004 s, total=0.031 s; sync files=2, longest=0.003 s, average=0.002 s; distance=0 kB, estimate=0 kB; lsn=0/14EA280, redo lsn=0/14EA280
2024-06-27 22:45:27 langgraph-postgres-1 | 2024-06-27 20:45:27.927 UTC [1] LOG: database system is shut down
I encountered the same situation.
@rxyshww I think it is for langsmith, the tracing part. I think it is optional. Could you please remove langchain/langsmith credentials from your env-variables and check if it works ? I think it will be better if we share our progress here. I need some help with this too
@allenlawson you do not have the same problem. It looks like your port is is use
@shanumas When I use 'langgraph test', it can work properly. But when I use langgraph up
, it still gives an error: ValueError: License key is not valid
. After I updated the langgraph-cli
, the prompt when running is:
For local development, an environment variable LANGSMITH_API_KEY with access to the LangGraph Cloud closed beta is required.
For production use, a license key in the environment variable LANGGRAPH_CLOUD_LICENSE_KEY is required.
Then I went to check the documentation: https://langchain-ai.github.io/langgraph/cloud/reference/env_var/
It told me that I need to set LANGGRAPH_AUTH_TYPE to noop. However, after setting it, it still gives the error ValueError: License key is not valid
. I'm about to give up.
Hold on! Don't give up. Are you on discord ? Please add me, I think I am close. add me on discord: shanumas
Lets get into a call
Or my email: shanumas@gmail.com
I think, I can help, may be we can hack this together.
@rxyshww I think you are too close. I think "langgraph up" is for langgraph-cloud only. Maybe to run locally you should just do "langgraph test" ?
After running "langgraph test", please run the frontend "yarn" and "yarn dev". I think it should work.
@shanumas langgraph test api
The langgraph test only supports one interface, but the front end called other interfaces of the SDK. When I started the langgraph test locally, the front end couldn't make normal requests.
I don't have Discord. I'll go and see how to register and then add you.
@rxyshww No need for discord. Just send me a zoom/hangout meeting link. Lets help each other shanumas@gmail.com
@rxyshww How can we get access to this file ? File "/api/langgraph_api/lifespan.py", line 18, in lifespan
@rxyshww When I ran "langgraph test" I got this error. I think the same error is kicking-in which causes the "License key is not valid" issue in "langgraph up" ?
Did not find openai_api_key, please add an environment variable
OPENAI_API_KEYwhich contains it, or pass
openai_api_key as a named parameter. (type=value_error)
@rxyshww It it this issue ? langchain-ai/langsmith-sdk#315
@shanumas yes。It seems that an email needs to be sent to ask them for it? But it may not be given to everyone. I'll give it a try first.
@rxyshww Are you going to ask darthShana ? or the other guy "siddiky" ?
@rxyshww Are you going to ask darthShana ? or the other guy "siddiky" ?你要问达斯莎娜吗?还是另一个人“siddiky”?
It's related to this: langchain-ai/langgraph#889
Hi all - we do not have a timeframe on a solution for local only workflows.
As to the Cloud licensing (LANGGRAPH_CLOUD_LICENSE_KEY
), we are currently in closed beta and access requires either a license key or the service being enabled in your LangSmith instance.
Please submit a request to the waitlist and someone will reach out to review your use case. Thanks everyone for your collective interest!
As a followup to this; if you are approved to use langgraph cloud, simply including a LANGSMITH_API_KEY connecting to the approved org should permit you to locally develop with langgraph up)