Elastic Beanstalk EC2 instance unknown host issue

690 views Asked by At

I have a Tomcat environment running on Amazon Elastic Beanstalk (within a VPC). Right of the bet after uploading my tomcat war file, I got

java.net.UnknownHostException: ip-10-1-1-293: ip-10-1-1-293: unknown error.

After a bit of research, I found the solution to this is to add a line on my /etc/hosts file, something like so by doing ssh into the ec2 instance:

127.0.0.1   ip-10-1-1-293

My question is, wouldn't my auto-scaling instances run into the same issue? If so, my environment will auto-scale but there will be no benefit. What will be a right way to set things up?

0

There are 0 answers