我正在尝试在 AWS ECS 中部署我的 Spring Boot 微服务。我能够将 Eureka 容器作为一项任务运行,并且运行良好。但是当我使用 AWS Fargate 运行任何其他 micoservice 时,它的日志显示
[ main] c.n.e.transport.JerseyReplicationClient : Cannot find localhost ip
java.net.UnknownHostException: 4terdtrtxxx: 53543xxxxd: Name does not resolve
at java.net.InetAddress.getLocalHost(InetAddress.java:1505) ~[na:1.8.0_151]
...
. 我认为问题是当我使用 AWS Fargate 运行时,springboot 无法识别它的 IP 地址以在 Eureka 中注册。我该如何解决这个问题?