https://prefect.io logo
#prefect-server
Title
# prefect-server
s

sebastian.clanzett

09/17/2020, 4:25 PM
if i try to connect to a local prefect server with a prefect agent inside a docker container by using: prefect agent start --api http://192.168.1.1:4200/graphql, no flow gets deployed to the server. is there anything i am missing?
d

Dylan

09/17/2020, 5:18 PM
Hi @sebastian.clanzett! Just to clarify, running an agent and registering a flow are two different actions. Once you register a Flow, you can schedule Flow Runs. Then, the agent should (in the case of a Docker agent) pull and run that Flow’s specified container to create a Flow Run
So, even if you have a Prefect Server instance and an Agent running, you still need to register your Flow with your Prefect Server instance
s

sebastian.clanzett

09/18/2020, 5:22 AM
I do know that. And of course i did register and trigger the flow. 😉
My guess is that this has something todo with running the agent inside the docker container while server is running on a different host
But i still dont have a clue
d

Dylan

09/18/2020, 1:32 PM
You may need to provide a URI to your agent to connect to server
s

sebastian.clanzett

09/18/2020, 2:38 PM
Thats what i did with --api . But i found the missing part. If i register a new flow the flow automatically gets a label with the name of the host where the flow has been created. So what i need to do is somehow alter this label so that the agent can pick up the job
d

Dylan

09/18/2020, 3:01 PM
Ah yes my apologies. For the local executor, we add labels with the name of your machine. If your local agent is also running on that machine, you can add a label with your machine’s name with
--labels
at agent start
I added a comment to this issue outlining the snag you ran into. We’ll do our best to make this process a bit clearer/easier: https://github.com/PrefectHQ/prefect/issues/3242
2 Views