Hi, i have a problem every time i run my flow with docker show de message before starting the flow and the following error showing:
DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied')) The above exception was the direct cause of the following exception: RuntimeError: Could not connect to Docker.
The flow build with sucess.
prefect deployment build HOTSPOTS/hotspots.py:flow_function --name 'hotspot-docker' --work-queue 'hotspots' --storage-block 'local-file-system/local-storage' --path 'HOTSPOTS' --infra-block docker-container/hotspot-container
Does anybody know how to solve this?
r
Ryan Peden
02/22/2023, 7:01 PM
When I've seen this happen, it's usually been because my user account didn't have sufficient permissions to access the Docker API.
p
Pedro Henrique
02/23/2023, 6:24 PM
so where can I configure this, is it in the blocks? or just having the login configured on the server would be enough?
Pedro Henrique
02/23/2023, 6:26 PM
I set up a registry docker block but I wasn't successful
r
Ryan Peden
02/23/2023, 7:48 PM
This is something you can't configure in the block, because the issue occurs outside of Prefect; it depends on the permissions of the Linux user account you use to run your agent. That user needs to have sufficient privileges to access the local Docker API.
Ryan Peden
02/23/2023, 7:49 PM
So, changing the permissions of the user (or configuring Docker to allow connections from that user) should fix the problem.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.