Nuno Silva
09/07/2020, 3:31 PMprefect agent start --api http://<url>:4200
but in code doesn't:
from prefect.agent.local import LocalAgent
agent = LocalAgent(agent_address="http://<url>:4200")
agent.start()
fails with:
/tornado/netutil.py", line 174, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
Any idea? thanksnicholas
agent_address as an arg to the *Agent() constructor tells Prefect to start an agent at that url/port. To set the endpoint that the Agent polls against, you'll instead want to set server.endpoint in your ~/.prefect/config.toml .Nuno Silva
09/07/2020, 4:02 PMos.environ["PREFECT__SERVER__ENDPOINT"] = f"{prefect_url}:4200"
thank younicholas