Category Archives: aws-fargate

(EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "ae537564806a"

I have two container definations in single task defination in ECS. One is my Apache web server configured as load balancer and another is my spring-boot microservice running behind it.

The configuration was working with ECS EC2 model. Now I am trying to migrate it to ECS fargate. Here the problem is that the Apache doesnt start(Actually the task does start for sometime and get stopped with exit code 1. For microservice the exit code is 137.

The logs is as below:

2018-05-08 17:11:43 Configuration Failed
2018-05-08 17:11:43 [Tue May 08 11:41:43 2018] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "3cb0470d9ae4"
2018-05-08 17:11:43 httpd: apr_sockaddr_info_get() failed for 3cb0470d9ae4
2018-05-08 17:11:43 httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
2018-05-08 17:11:43 Ready to run httpd-foreground from: /root
2018-05-08 17:11:43 httpd (no pid file) not running
2018-05-08 17:11:43 httpd: apr_sockaddr_info_get() failed for 3cb0470d9ae4
2018-05-08 17:11:43 httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

I found some similar questions around this, which point to add your Ip address to /etc/hosts file. In case of Fargate the resource allocation is dynamic, So is there any way to solve this issue.