Eureka server DNS config

289 views
Skip to first unread message

ache...@gmail.com

unread,
Sep 12, 2018, 2:26:36 PM9/12/18
to eureka_netflix
Hi All,
I am trying to setup a Eureka server with DNS config and I am having trouble setting this up. Below is my config.

eureka:
datacenter: cloud
instance:
nonSecurePort: ${server.port}
client:
fetchRegistry: true
eurekaServerURLContext: eureka
region: us-east-1
eurekaServerPort: 8761
useDnsForFetchingServiceUrls: true
eurekaServerDNSName: dev.domain.com
registerWithEureka: true
server:
renewalPercentThreshold: 0.49
enableSelfPreservation: false

These are the TXT records I have configured

TXT Records
txt.us-east-1.dev.domain.com -> txt.us-east-1b.dev.domain.com; txt.us-east-1d.dev.domain.com
txt.us-east-1b.dev.domain.com -> eureka-us-east-1b.dev.domain.com
txt.us-east-1d.dev.domain.com -> eureka-us-east-1d.dev.domain.com

A-Record:
eureka-us-east-1b.dev.domain.com -> xx.xxx.xxx.xxx
eureka-us-east-1d.dev.domain.com -> xx.xxx.xxx.xxx

When I start the app the eureka UI comes up fine; however, I see the below on the logs.

[11/09/18 22:19:49:600 UTC] INFO support.DefaultLifecycleProcessor: Starting beans in phase 0
[11/09/18 22:19:49:602 UTC] INFO serviceregistry.EurekaServiceRegistry: Registering application data-discovery-service with eureka with status UP
[11/09/18 22:19:49:615 UTC] INFO server.EurekaServerBootstrap: Setting the eureka configuration..
[11/09/18 22:19:49:655 UTC] INFO http11.Http11NioProtocol: Starting ProtocolHandler ["http-nio-8761"]
[11/09/18 22:19:49:687 UTC] INFO server.EurekaServerBootstrap: isAws returned true
[11/09/18 22:19:49:699 UTC] INFO net.NioSelectorPool: Using a shared selector for servlet write/read
[11/09/18 22:19:49:775 UTC] ERROR aws.EIPManager: Cannot bind to EIP
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.lang.String.substring(String.java:1967) ~[?:1.8.0_181]
at com.netflix.eureka.aws.EIPManager.getEIPsFromServiceUrls(EIPManager.java:360) ~[eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.EIPManager.getEIPsForZoneFromDNS(EIPManager.java:394) ~[eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.EIPManager.getCandidateEIPs(EIPManager.java:316) ~[eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.EIPManager.isEIPBound(EIPManager.java:165) ~[eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.EIPManager.handleEIPBinding(EIPManager.java:141) [eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.EIPManager.start(EIPManager.java:106) [eureka-core-1.9.2.jar!/:1.9.2]
at com.netflix.eureka.aws.AwsBinderDelegate.start(AwsBinderDelegate.java:43) [eureka-core-1.9.2.jar!/:1.9.2]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.initEurekaServerContext(EurekaServerBootstrap.java:147) [spring-cloud-netflix-eureka-server-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.contextInitialized(EurekaServerBootstrap.java:83) [spring-cloud-netflix-eureka-server-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration$1.run(EurekaServerInitializerConfiguration.java:71) [spring-cloud-netflix-eureka-server-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

I would like to know why Eureka is trying to use EIP when I am using the DNS configuration ? Also, on the UI page, the 'available replicas' row is empty and the instance shows in 'unavailable replicas'. Appreciate any clues on what I might be missing here.

Thanks.

Reply all
Reply to author
Forward
0 new messages