The nodejs request interface on the container docker server reports error: getaddrinfo ENOTFOUND xxx.xxxx.com xxx.xxxx.com:443.
Reason:
The current server cannot be connected to the request you want to request.
Solution:
1. Ping xxx.xxxx.com on the current server to see if it can be pinged (If the ping fails, it is a proxy problem, add xxxx xxx.xxxx.com in the hosts file.)
2. If it can be pinged, use the curl command to request the path to see if it can be called
3. If you are using the ip path interface, the call may be unsuccessful or the default port is not opened (80 is the default port of http, 443 is https)
4. If it can be pinged and the interface can be successfully called by using the curl command on the server, but it cannot be called in the project, it may be that the hosts file has been modified but did not take effect. Solution for this situation: add hosts in the container or inherit the hosts when starting the container (inherit hosts: when starting the docker container, add a sentence $(cat /etc/hosts|awk -F ”'{if(NR>2 ){print “–add-host “$2”:”$1}}’), you can integrate the host’s hosts file)
docker run --restart=always $(cat /etc/hosts|awk -F ' ' '{if(NR>2){print "--add-host "$2":"$1}}') -d -p 主机端口:容器端口 --name 指定容器名字 仓库/容器
Read More:
- Error: EACCES: permission denied, unlink ‘xxxx/xxxx/xxxx‘ [How to Solve]
- [How to Solve] Too many authentication failures for xxxx_username
- SSH Connect Service Error: Could not connect to ‘xxx.xxx.xx.xx‘ (port 22): Connection failed.
- [Solved] svn: OPTIONS of ‘https://xxx/svn/xxx’: SSL handshake failed: SSL error: Key usage violation in certificate has been detected.
- [Solved] Cannot run program “svn” (in directory “D: xxxx”): CreateProcess error=2, the system cannot find the specified file.
- [Solved] Failed to connect to 127.0.0.1 port XXXX: Connection refused
- [Solved] E xx: xxxx:xx ERR thread 0x536753929472 setscheduler failed Operation not permitted
- ls: cannot access /com: Host is down
- [Solved] Docker Filed to Start Container: Error response from daemon: network XXX not found
- [Solved] curl: (6) Could not resolve host: harbor.od.com; Unknown error
- [docker][issue]Error response from daemon: mkdir xxx: file exists: unknown
- Initializing the Kubernetes master node ERROR: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0
- [Solved] SSH Error: ECDSA host key for xxx has changed and you have requested strict checking.
- [Solved] error: src refspec [email protected] does not match any
- [Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443
- Github Clone Failed SSL_ERROR_SYSCALL in connection to github.com:443
- [Solved] shc -f xxx.sh shc: invalid first line in scrip
- [Solved] Xshelln Connect to Local VM linux Error: Could not connect to ‘XXX.168.122.1‘ (port 22): Connection failed
- scp Command: Unable to negotiate with xxx.xx.xx.xx port 22: no matching cipher found.
- [Solved] Git Error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443