Issue
I've created a fresh droplet on digitalocean, deployed my docker container, tested the endpoint via curl ip:dockerPort
from my local computer and everything went fine.
Later on i've connected to another test machine via ssh and tried to connect to digital ocean via curl ip:dockerPort
as well but got an couldn't connect to host
error. I've connected from my test machine to digitalocean droplets in the past. Do i have to wait for the DNS even if i'm using curl ip:port
?
EDIT: pinging the server from the test machine works well:
8 packets transmitted, 8 packets received, 0.0% packet loss
Solution
The error occurred due to slow DNS updates of the test network. I could successfully connect to the freshly created instance after i've added googles DNS server 8.8.8.8
to the settings.
The DNS got finally refreshed after a 48 hours and i was able to remove googles dns again.
Answered By - Jörn Answer Checked By - Mary Flores (WPSolving Volunteer)