Problem phenomenon
An error is reported when an interface request is initiated in Jenkins container:
Analysis
Report that the host cannot be obtained. Ping the host domain name in the Jenkins container (if Ping is not installed, install the Ping tool first). If the Ping fails, it indicates that the network connection configuration is wrong
Solution:
A new line of configuration is added to/etc/hosts in Jenkins container. The format is: host IP address domain name
If necessary, check testerhome Com initiates a request, first use the ping command to determine the IP, and then edit it into the hosts file
Precautions
After restarting the container each time, the hosts file will be initialized, resulting in the invalidation of the previously added configuration. You can continue to add
after restarting
docker exec -it -u root 647bf755ba2e /bin/bash -c "echo -e $loccalhost_ip $domain1 $domain2 >> /etc/hosts"
Similar Posts:
- php_network_getaddresses: getaddrinfo failed
- An error is reported when the docker command is executed in Jenkins
- Docker OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caus
- [Solved] OCI runtime exec failed……executable file not found in $PATH”: unknown
- Docker Unable to load the service index for source https://api.nuget.org/v3/index.json
- Solution to pod error “back off restarting failed container”
- [Solved] OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: “/bin/bash”: stat /bin/bash: no such file or directory: unknown
- The docker container reports an error when using the systemctl command
- Install a docker container in centos7 that can log in SSH
- ubuntu apache2: apr_sockaddr_info_get() failed