marathon icon indicating copy to clipboard operation
marathon copied to clipboard

marathon can't resolve hostnames locally after adding long line in /etc/hosts

Open aaaler opened this issue 10 years ago • 4 comments

Marathon can't resolve hostnames locally after adding long line in /etc/hosts. versions:

  • Marathon 0.13.0 (also checked 0.8.2)
  • Mesos 0.25.0
  • docker 1.9.1

steps to reproduce:

  1. add long (more than 3kb) line in /etc/hosts
  2. add your zk hostnames to /etc/hosts
  3. run marathon in docker container with --net=host (so docker will mount /etc/hosts from host)

Now, marathon cycling forever in Zookeper connection cycle, just can't resolve their names. As described in issue #1345

If i pass ZK ip address instead hostnames (or zk hostnames not mentioned in hosts), marathon can start, but can't resolve anything mentioned in /etc/hosts.

aaaler avatar Dec 18 '15 17:12 aaaler

Hi @aaaler,

Thanks for your bug report. At first read, this sounds rather like a Docker issue rather than a Marathon-specific issue.

As I don't have access to your exact configuration, can you try testing this and verifying that Docker containers are normally able to resolve names from such a line /etc/hosts?

philipnrmn avatar Dec 21 '15 12:12 philipnrmn

I think this problem is related to the OS or the JVM you are running. My suggestion is to use shorter host names. There is nothing we can do in Marathon.

aquamatthias avatar Dec 21 '15 13:12 aquamatthias

testing this and verifying that Docker containers are normally able to resolve names from such a line /etc/hosts?

  1. the problem is, that marathon can't resolve any hostname mentioned in /etc/hosts. Not only names from long line.
  2. yes, i can resolve that hostnames in marathon's container.

How i can check hosts names resolving with JVM?

aaaler avatar Dec 23 '15 14:12 aaaler

Hey @aaaler I guess if you screw your local hostname resolver, you can not resolve any hostnames. Your question how to resolve hostnames with the JVM can be answered with google pretty well: http://lmgtfy.com/?q=How+i+can+check+hosts+names+resolving+with+JVM%3F

aquamatthias avatar Dec 23 '15 15:12 aquamatthias