Code Monkey home page Code Monkey logo

Comments (6)

NiteshKant avatar NiteshKant commented on June 9, 2024

Curious whether you tried with the actual TXT record having a comma between
entries as suggested by the wiki? If yes, does that work?

On Fri, Jun 14, 2013 at 4:34 AM, OskarKjellin [email protected]:

I ran into some issues when I tried to setup multiple zones with eureka.
According to the wiki, the txt records should be separated with ','.
However, it seems like the code is using the whitespace character?
Wiki page I am referring to:
https://github.com/Netflix/eureka/wiki/Configuring-Eureka-in-AWS-Cloud

But on this line it splits using whitespace:

https://github.com/Netflix/eureka/blob/master/eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java#L1366

This would be fine if it was as simple as a code->wiki mismatch. But when
there is a whitespace within a txt record it returns it as "eu-west1a
eu-west1b", instead of with comma as eu-west1a,eu-west1b (hard to
illustrate but in the first case it returns a string containing actual
quotation marks). So when it splits it winds up with:

  • "eu-west1a
  • eu-west1b"

Which of course causes problems.

Am I the only one who ran into this issue? Like the way that the
TXT-records and automatic assigning of EIPs but it's very fragile to have
only one eureka server.


Reply to this email directly or view it on GitHubhttps://github.com//issues/22
.

from eureka.

OskarKjellin avatar OskarKjellin commented on June 9, 2024

@NiteshKant Well yeah, that was the first thing I tried. That ended up just like trying to connect to
"ec2-54-216-23-251.eu-west-1.compute.amazonaws.com,ec2-54-216-23-251.eu-west-1.compute.amazonaws.com:8080"

which of course didn't work which was when I started stepping through the code and found that it was actually splitting on a whitespace:

String[] cnames = txtRecord.split(" ");

from eureka.

karthik-vn avatar karthik-vn commented on June 9, 2024

Hi,

Yes - the wiki has to be fixed. I think you are probably getting the format of the TXT record wrong. I think the TXT records should be similar to this

"eu-west-1a" "eu-west-1b".

Can you try this and let me know?

from eureka.

OskarKjellin avatar OskarKjellin commented on June 9, 2024

@karthik-vn It ends up the same. Tries to query like
txt."eu-west1.mydomain.com

Which doesn't work. According to the route53 documentation, multiple values should be one per line. But that doesn't work either. I had a fix before that just did value.replace(""", "") which worked. But I should be able to use your jars and not need to modify my code.

from eureka.

karthik-vn avatar karthik-vn commented on June 9, 2024

Not sure what is going wrong in your case. Our route53 configuration works perfectly.

For eg. here is the TXT record for our test environment.

http://www.dnswatch.info/dns/dnslookup?la=en&host=txt.us-east-1.discoverytest.netflix.net&type=TXT&submit=Resolve

from eureka.

OskarKjellin avatar OskarKjellin commented on June 9, 2024

@karthik-vn thanks. The issue was the setup in route53 that I had made. The test link helped me narrow down the issue with my configuration. It's working now.

The wiki should be updated to match our discussion here

from eureka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.