My Ubuntu EC2 worked fine and then I rebooted it. Now I get the following error on trying pretty much anything:
sudo: unable to resolve host ip-xxx-xx-xx-xxx: Resource temporarily unavailable
where the xxx is the private IP address.
As an example, it happens for this command:
sudo systemctl restart logstash.service
I have
verified in the EC2 dashboard that both the private and public IP address have not changed.
I can access the server both with Ftp and SSH.
The EC2's VPC has both DNS hostnames and DNS resolution enabled.
I checked the contents of hostname with:
cat /etc/hostname
It contains the same ip-xxx-xx-xx-xxx as in the error message.