https://prefect.io logo
p

Pedro Machado

10/01/2020, 7:11 PM
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

nicholas

10/01/2020, 7:22 PM
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

Pedro Machado

10/01/2020, 7:23 PM
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

nicholas

10/01/2020, 7:36 PM
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

Pedro Machado

10/01/2020, 8:00 PM
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

nicholas

10/01/2020, 8:03 PM
Hm, can you confirm which version of docker you're on with
docker --version
?
p

Pedro Machado

10/01/2020, 8:05 PM
Docker version 19.03.13, build 4484
n

nicholas

10/01/2020, 8:05 PM
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

Pedro Machado

10/01/2020, 8:07 PM
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

nicholas

10/01/2020, 8:08 PM
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

Pedro Machado

10/01/2020, 8:12 PM
I added
--no-docker-interface
and the flow ran.
I updated the issue
Thanks for your help!
n

nicholas

10/01/2020, 8:13 PM
Interesting, thanks for updating that, very odd that that flag solved your problem but i'm happy you're unblocked!