I'm trying to run prefect from docker, but can't g...
# prefect-community
l
I'm trying to run prefect from docker, but can't get the token through. Somehow I'm getting:
prefect.utilities.exceptions.ClientError: Malformed response received from Cloud - please ensure that you have an API token properly configured.
Anyone?
j
Hi @Lars Corneliussen what exactly do you mean running prefect from docker? And are you attempting to use server or Cloud?
l
Oh - I see I wasn't very specific. I'm using cloud. Running an agent from docker. Here is the pythonfile + dockerfile + compose. When I run py script the agent starts finde. Running it from docker leads to the error in the last screenshot.
j
I’m sure the actual token is blurred out but just to confirm in your docker compose where you have the auth token it looks like:
Copy code
PREFECT__CLOUD__AGENT__AUTH_TOKEN=<token>
l
yes
i generated a token from my user page
running on azure container services with a different token - same error
j
Oh it looks like the error is occurring when you’re trying to call .register? On that machine where you are registering you should either call
prefect auth login -t <user token>
or set the env var
Copy code
PREFECT__CLOUD__AUTH_TOKEN
l
That helped a little 🤣 Now i'm getting
Copy code
prefect.utilities.exceptions.ClientError: [{'path': ['project'], 'message': 'field "project" not found in type: \'query_root\'', 'extensions': {'path': '$.selectionSet.project', 'code': 'validation-failed', 'exception': {'message': 'field "project" not found in type: \'query_root\''}}}]
No debugging in the container. Still seems to have to do with authorization. The client in non-docker has a `__access__token`; the one in docker not.