Hi all, I’m try to deploy an orion agent - I’m get...
# ask-community
l
Hi all, I’m try to deploy an orion agent - I’m getting the following error:
Copy code
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<https://api.prefect.cloud/work_queues/>'
Not sure if I have my api url wrong or some other configuration incorrect
1
It first failed when trying to create a work queue:
Copy code
19:51:19.313 | ERROR   | prefect.agent - Failed to create work queue 'dev'.
s
I think it might need to be in this format:
'<https://api.prefect.cloud/api/accounts/abc-123-456/workspaces/xyz-987-654>'
l
I’m not making this api call
Copy code
spec:
      containers:
      - name: agent
        command: [ "prefect", "agent", "start", "-q", "dev" ]
I’m using a helm chart to deploy the agent
(btw im on verison 2.3.0)
Full traceback:
Copy code
agent Starting v2.3.0 agent connected to <https://api.prefect.cloud>...
agent
agent   ___ ___ ___ ___ ___ ___ _____     _   ___ ___ _  _ _____
agent  | _ \ _ \ __| __| __/ __|_   _|   /_\ / __| __| \| |_   _|
agent  |  _/   / _|| _|| _| (__  | |    / _ \ (_ | _|| .` | | |
agent  |_| |_|_\___|_| |___\___| |_|   /_/ \_\___|___|_|\_| |_|
agent
agent
agent Agent started! Looking for work from queue(s): dev...
agent 19:51:19.313 | ERROR   | prefect.agent - Failed to create work queue 'dev'.
agent Traceback (most recent call last):
agent   File "/usr/local/lib/python3.10/site-packages/prefect/agent.py", line 88, in get_work_queues
agent     work_queue = await self.client.create_work_queue(name=name)
agent   File "/usr/local/lib/python3.10/site-packages/prefect/client.py", line 835, in create_work_queue
agent     response = await <http://self._client.post|self._client.post>("/work_queues/", json=data)
agent   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1842, in post
agent     return await self.request(
agent   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1527, in request
agent     return await self.send(request, auth=auth, follow_redirects=follow_redirects)
agent   File "/usr/local/lib/python3.10/site-packages/prefect/client.py", line 279, in send
agent     response.raise_for_status()
agent   File "/usr/local/lib/python3.10/site-packages/prefect/client.py", line 225, in raise_for_status
agent     raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
agent prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<https://api.prefect.cloud/work_queues/>'
agent For more information check: <https://httpstatuses.com/404>
z
What is your
PREFECT_API_URL
set to in the agent’s container? Serina is correct that it appars to be incorrectly specified.
You can see the value you should use by running
prefect cloud login --key …
then
prefect config view
l
l
Ah
Let me try that
z
@Serina can you look into adding documentation for this? Some inline comments there would probably be helpful in addition to a prose guide.
👍 1
l
These values aren’t considered secrets are they?
c
your workspace / account are sensitive, but not exactly secrets
your API key is secret
l
Right
c
generally, by default if you’re deploying with a helm chart, values.yaml should be checked for default overriding behavior, in this case, everyones API url will be different, and should be set at runtime, they will never match per person
👍 1
l
I’ve made the change in my configmap, but it looks like since the deployment was unchanged the process is still restarting
c
Hi Leon, I would recommend tearing down the helm install, and installing fresh, supplying it with values.yaml, or even overriding it with a custom <something.yaml> and passing it in directly
I don’t think I’ve ever personally had to update the configmap
These are configured using the prefect agent manifest (not helm), but the end result is the same with the deployment
l
I just restarted the deployment, it looks good now
thanks all - appreciate the help
🎉 1