We have a part of our Java application that needs to determine what the local hostname is.
But whenever we try to get them via
InetAddress.getLocalhost().getHostName()
we get:
org.quartz.JobExecutionException: java.net.UnknownHostException: 22e51fd8a6fb: 22e51fd8a6fb [See nested exception: java.net.UnknownHostException: 22e51fd8a6fb: 22e51fd8a6fb]
When we do this via ec2 instances, it seems to work fine. Is there some kind of limitation on fargate, or potentially some configuration that could be tweaked?
Verify "DNS hostnames" is set as "Enabled" in you VPC settings. This should fix the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With