Error while deploying flow: FileNotFoundError(2, "No such file or directory: 'ip'")
See original GitHub issueDescription
Using code snippet from https://docs.prefect.io/orchestration/tutorial/docker.html#persisting-your-flow-with-docker-storage
import prefect
from prefect import task, Flow
from prefect.environments.storage import Docker
@task
def hello_task():
logger = prefect.context.get("logger")
logger.info("Hello, Docker!")
flow = Flow("hello-docker", tasks=[hello_task])
flow.storage = Docker()
flow.register()
running it in the container ends up building proper image and registering the flow in local server:
...
---> 3d851b191d56
Successfully built 3d851b191d56
Successfully tagged hello-docker:2020-04-20t08-03-01-759322-00-00
Flow: http://localhost:8080/flow/5af6b16e-cbd1-44f0-b855-80e3420f4860
Then I start the agent prefect agent start docker
(inside the same container or different one, which joined the same docker network and has docker unix socket access via mounted volume).
The error I observe:
root@876bfe616714:~/flows# prefect agent start docker
____ __ _ _ _
| _ \ _ __ ___ / _| ___ ___| |_ / \ __ _ ___ _ __ | |_
| |_) | '__/ _ \ |_ / _ \/ __| __| / _ \ / _` |/ _ \ '_ \| __|
| __/| | | __/ _| __/ (__| |_ / ___ \ (_| | __/ | | | |_
|_| |_| \___|_| \___|\___|\__| /_/ \_\__, |\___|_| |_|\__|
|___/
[2020-04-20 08:09:06,297] INFO - agent | Starting DockerAgent with labels []
[2020-04-20 08:09:06,298] INFO - agent | Agent documentation can be found at https://docs.prefect.io/cloud/
[2020-04-20 08:09:06,299] INFO - agent | Waiting for flow runs...
[2020-04-20 08:09:42,514] INFO - agent | Found 1 flow run(s) to submit for execution.
[2020-04-20 08:09:42,589] INFO - agent | Deploying flow run b86a2022-4e17-49cb-b5d2-266c6adf3593
[2020-04-20 08:09:42,601] ERROR - agent | Logging platform error for flow run b86a2022-4e17-49cb-b5d2-266c6adf3593
[2020-04-20 08:09:42,702] ERROR - agent | Error while deploying flow: FileNotFoundError(2, "No such file or directory: 'ip'")
Expected Behavior
Pick the flow and execute it.
Reproduction
- Start prefect stack locally (docker compose)
- Start additional container and join the compose network, e.g.
docker run -it --rm -v $(pwd)/flows:/root/flows -v /var/run/docker.sock:/var/run/docker.sock --network "prefect-server" prefecthq/prefect:latest /bin/bash
- Init the env:
export PREFECT__BACKEND=server
export PREFECT__SERVER__HOST=http://docker.for.mac.host.internal
- Register the flow (see above)
- Run agent (see above)
Environment
OSX, Docker Desktop Community 2.2.0.5
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11
Top Results From Across the Web
I'm getting storage errors when running flows from ...
I'm getting storage errors when running flows from deployments using DockerFlowRunner (FileNotFoundError: [Errno 2] No such file or ...
Read more >Python FileNotFoundError: [Errno 2] No such file or directory ...
This error tells you that you are trying to access a file or folder that does not exist. To fix this error, check...
Read more >How to solve "FileNotFoundError: [Errno 2] No such file or ...
How to solve "FileNotFoundError: [Errno 2] No such file or directory: '/code/static" when deploying a django app to heroku? - Stack Overflow. ...
Read more >xilinx-finn/community - Gitter
My current error I am getting with both the cnv_end2end_example and the tfc_end2end_example is ... FileNotFoundError: [Errno 2] No such file or directory: ......
Read more >Troubleshooting | Moldflow Adviser
System Error: 2 "No such file or directory" Make sure the license ... Nov 11 2021 - During a Flow + Warp analysis...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@joshmeek I will try to reset the environment today, reproduce the issue and share the details here to be able to move forward.
@joshmeek looks good to me! I hope it doesn’t shoot back in other weird use-cases, but so far - exactly what would help us! thanks a lot!