Hi there. I am having trouble with the docker agen...
# prefect-community
p
Hi there. I am having trouble with the docker agent. Here is the error I am getting when the agent tries to run the flow:
Copy code
[2020-10-01 19:07:39,119] ERROR - agent | Error while deploying flow: APIError(HTTPError('400 Client Error: Bad Request for url: <http+docker://localhost/v1.40/containers/create'>))
I think it's related to the
tls_config
argument which defaults to
False
. Is it possible to set this in the command line?
n
Hi @Pedro Machado - I don't think there's a flag for that on the command line but you can modify that on your docker storage object when you define it for your flow
p
I had that issue when registering the flow and it got solved when I set that option but now the agent is having the same problem.
n
Hm ok, generally the docker daemon authentication should happen external to Prefect; in this case you can probably specify your TLS cert from the Docker CLI. I'm not sure the exact command but it'll be something like
docker --tlsverify
and then some flags for telling it where the certs are located
p
The thing is I haven't done anything special to my local docker. I am running on WSL 2. The error I see in the prefect UI is different from what I see on the terminal:
Copy code
400 Client Error: Bad Request ("invalid IP address in add-host: """)
Does that right a bell?
n
Hm, can you confirm which version of docker you're on with
docker --version
?
p
Docker version 19.03.13, build 4484
n
Ah I think this could actually be a docker bug, see this issue here: https://github.com/docker/cli/issues/2664
But not totally sure of that, still looking into it
p
The error is the one reported on this issue https://github.com/PrefectHQ/prefect/issues/2781
but I am not running inside another container
n
Got it, then can I ask you to add a comment to that issue with your setup and what you're seeing? I think this might be bigger than a slack thread can get to the bottom of .
And it'll let us aggregate the problem to a hopefully solvable level
p
I added
--no-docker-interface
and the flow ran.
I updated the issue
Thanks for your help!
n
Interesting, thanks for updating that, very odd that that flag solved your problem but i'm happy you're unblocked!