Blogger Maotouhu () takes you to Go to New World?
Maotouhu recommends a list of necessary technology stacks for programmers:
Cloud native technology Cloud Native:
- Golang
- Docker
- Kubernetes
- ? Helm
- Serverless
- ?AWS Lambda
- Google Cloud Functions
- Microservices
- Envoy
- Istio
- Prometheus
Blog homepage:
- Maotouhu’s blog
- “Complete Column of Interview Questions” Articles with pictures and texts Vivid images Simple and easy to learn! Everyone is welcome to step in~
- “IDEA Development Cheats Column” Learn the common operations of IDEA and double your work efficiency~
- “Master Golang in 100 Days (Basic Introduction)” Learn the Golang language, play cloud native, and travel to large and small factories~
I hope this article can bring you some help The article is superficial, please criticize and correct me!
Article directory
- Resolved Error response from daemon: driver failed programming external connectivity on endpoint
-
- Summary ?
- Introduction
- Text ♂?
-
- Bug cause analysis
- Solution
-
- 1. Check for port conflicts
- 2. Check network configuration
- 3. Restart the Docker daemon
- Avoid encountering this problem again
- Summarize
- References
- Original statement
Resolved Error response from daemon: driver failed programming external connectivity on endpoint
Abstract
Hi, everyone, I am the blogger of Cat Head Tiger! Today I want to share with you a troublesome bug that often appears in the cloud native field. This bug caused an error response, prompting “Error response from daemon: driver failed programming external connectivity on endpoint”. In this blog, I will delve into this issue, explain the cause of the bug in detail, provide solutions, and share how to avoid encountering this annoying problem again. Let’s explore together!
Introduction
In cloud native application development, containerization technology has become standard. Docker is one of the most popular containerization tools, but sometimes, you may encounter some unforeseen problems while using Docker. One of the common problems is the “Error response from daemon: driver failed programming external connectivity on endpoint” error when trying to run a container.
This error message usually causes the container to fail to start normally, affecting the deployment and operation of the application. Fortunately, there is a solution to this problem, and there are steps we can take to prevent it from happening again. In the following text, I will explain the cause of this bug in detail and provide solutions and preventive measures.
Text ♂?
Bug cause analysis
First, let’s dig into the cause of this bug. “Error response from daemon: driver failed programming external connectivity on endpoint” error is usually caused by the following factors:
-
Port conflict: The container attempts to use a port on the host, but the port may already be occupied by another application, causing a conflict.
-
Network configuration issue: Docker network configuration may cause this error. For example, a container might not be able to access external networks or communicate with other containers.
-
Docker daemon issues: Sometimes, there can be issues with the Docker daemon itself that prevents the container from running properly.
Solution
Now, let’s see how to solve this vexing problem. Here are some workarounds:
1. Check port conflicts
First, check the port occupancy on the host using the following command:
netstat -tuln | grep LISTEN
If you find a port conflict, you can choose to modify the container’s port mapping or stop the application occupying the port.
2. Check network configuration
Make sure Docker’s network is configured correctly. You can check the network configuration using the following command:
docker network ls docker network inspect <network_name>
If you find problems, you can try to recreate the network or adjust the network configuration.
3. Restart the Docker daemon
Sometimes, restarting the Docker daemon solves the problem:
sudo systemctl restart docker
Avoid encountering this problem again
To avoid encountering the “Error response from daemon: driver failed programming external connectivity on endpoint” error again, you can take the following precautions:
-
Regularly clean up unused containers and images to reduce resource usage and potential conflicts.
-
Use a container orchestration tool, such as Docker Compose or Kubernetes, to manage containers to ensure network configuration is correct and easy to maintain.
-
Update Docker and related components regularly to get the latest bug fixes and security updates.
Summary
In cloud native application development, encountering bugs is inevitable. “Error response from daemon: driver failed programming external connectivity on endpoint” is a common but troublesome problem. By deeply analyzing the cause of the bug, we can take appropriate solutions and also prevent it from happening again. In this blog, we discuss how to diagnose and fix this problem, as well as how to avoid it. I hope this information can help you develop containerized applications more smoothly!
Reference materials
Here are some reference materials about Docker and containerization for further learning:
- Docker official documentation
- Docker Compose official documentation
- Kubernetes official documentation
If you have additional questions or need further assistance, please feel free to ask in the comments. May your containerization journey be smooth sailing!
Original Statement
======= ·
- Original author: Maotouhu
- Edit: GoCloudNative
Author wx: [libin9iOak]
Public account: Maotouhu technical team
Study | Review |
---|---|
? | ? |
This article is an original article and the copyright belongs to the author. Reprinting, duplication or quotation without permission is prohibited.
The author guarantees the authenticity and reliability of the information,but does not assume responsibility for its accuracy or completeness.
Commercial use without permission is prohibited.
If you have questions or suggestions, please contact the author.
Thank you for your support and respect.
Click on the
business card below
to join the IT technology core learning team. Explore the future of technology together and grow together.