Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Name or service not known #1936

Closed
githubpaul opened this issue Aug 5, 2015 · 5 comments
Closed

Name or service not known #1936

githubpaul opened this issue Aug 5, 2015 · 5 comments

Comments

@githubpaul
Copy link

I install mesos-0.22.1 in the directory "/usr/local/mesos", when I start marathon, it show the exception as below:

MESOS_NATIVE_LIBRARY, MESOS_NATIVE_JAVA_LIBRARY set to '/usr/local/mesos/lib/libmesos.so'
[2015-08-05 17:57:14,590] INFO Starting Marathon 0.9.0 (mesosphere.marathon.Main$:87)
Exception in thread "main" java.net.UnknownHostException: master: master: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1496)
at mesosphere.marathon.MarathonConf$$anonfun$hostname$1.apply(MarathonConf.scala:47)
at mesosphere.marathon.MarathonConf$$anonfun$hostname$1.apply(MarathonConf.scala:47)
at org.rogach.scallop.Scallop$$anonfun$get$5$$anonfun$apply$35.apply(Scallop.scala:543)
at org.rogach.scallop.Scallop$$anonfun$get$5$$anonfun$apply$35.apply(Scallop.scala:543)
at scala.Option.orElse(Option.scala:289)
at org.rogach.scallop.Scallop$$anonfun$get$5.apply(Scallop.scala:543)
at org.rogach.scallop.Scallop$$anonfun$get$5.apply(Scallop.scala:537)
at scala.Option.map(Option.scala:146)
at org.rogach.scallop.Scallop.get(Scallop.scala:537)
at org.rogach.scallop.Scallop$$anonfun$verify$17.apply(Scallop.scala:623)
at org.rogach.scallop.Scallop$$anonfun$verify$17.apply(Scallop.scala:614)
at scala.collection.immutable.List.foreach(List.scala:381)
at org.rogach.scallop.Scallop.verify(Scallop.scala:614)
at org.rogach.scallop.ScallopConf.verify(ScallopConf.scala:274)
at org.rogach.scallop.ScallopConf.afterInit(ScallopConf.scala:504)
at mesosphere.chaos.App$class.initConf(App.scala:26)
at mesosphere.marathon.MarathonApp.initConf(Main.scala:17)
at mesosphere.chaos.App$class.run(App.scala:30)
at mesosphere.marathon.MarathonApp.run(Main.scala:17)
at mesosphere.marathon.MarathonApp.runDefault(Main.scala:88)
at mesosphere.marathon.Main$.delayedEndpoint$mesosphere$marathon$Main$1(Main.scala:96)
at mesosphere.marathon.Main$delayedInit$body.apply(Main.scala:95)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at mesosphere.marathon.MarathonApp.main(Main.scala:17)
at mesosphere.marathon.Main.main(Main.scala)
Caused by: java.net.UnknownHostException: master: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:922)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1316)
at java.net.InetAddress.getLocalHost(InetAddress.java:1492)
... 31 more

@rasputnik
Copy link
Contributor

Is 'master' not the name of your mesos master? It's just failing to connect and saying that name doesn't resolve.

@aldipower
Copy link
Contributor

Hi, could you give some additional information, like your OS, which Marathon package/source you use and the command you start marathon?

@githubpaul
Copy link
Author

More information about my Env.
[root@master marathon-0.9.0]# uname -a
Linux master 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@master marathon-0.9.0]# cat /etc/redhat-release
CentOS release 6.6 (Final)

Mesos master is running with zookeeper.I can view webpage http://192.168.0.4:5050.
[root@master marathon-0.9.0]# mesos-master --ip=192.168.0.4 --work_dir=/var/lib/mesos --zk=zk://192.168.0.4:2181/mesos --quorum=1 > /dev/null 2>&1 &

I use this command line to start marathon,but it is not work.
[root@master marathon-0.9.0]# MESOS_NATIVE_JAVA_LIBRARY=/usr/local/mesos/libmesos.so ./bin/start --master zk://192.168.0.4:2181/mesos --zk zk://192.168.0.4:2181/marathon

@githubpaul
Copy link
Author

Thank you , I have resolve this problem via adding hostname ip pair to /etc/hosts, but I don't know why .

@sepiroth887
Copy link

Yea i stumbled on this as well and the docs have a PR pending to explain that. Somehow marathons jni bindings require the hostname to resolve.

@d2iq-archive d2iq-archive locked and limited conversation to collaborators Mar 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants