5

I was following this simple guide on installing Mesos locally https://mesosphere.com/2014/07/07/installing-mesos-on-your-mac-with-homebrew/

I was able to start a mesos master and was able to see the master's console perfectly fine at localhost:5050. However when I tried to start a new slave using sudo /usr/local/sbin/mesos-slave --master=127.0.0.1:5050 , it gave me

WARNING: Logging before InitGoogleLogging() is written to STDERR F0328 16:14:45.329051 2041414416 process.cpp:889] nodename nor servname provided, or not known * Check failure stack trace: *

Any help will be appreciated, thanks

neutralino
  • 339
  • 1
  • 7
  • 10
  • Could you please show us which IP the master has bound to? Should look somewhat like this: `I0329 16:22:33.670699 302264320 master.cpp:359] Master 20150329-162233-347252928-5050-20706 (hostname.domain.name) started on IP:PORT`. Is your hostname properly configured? What does this result to: `ping $(hostname -f)`? – Till Mar 29 '15 at 14:34

1 Answers1

5

This can also happen if you working on a Framework and attempting to connect to a Mesos Master. Mesos is attempting to resolve your computer's name via DNS and isn't finding an entry. This can happen if you've changed your Mac's hostname post setup ( as I did, and had this same error ).

To fix, run hostname -f, that will will give you the value of what OS/X thinks it's name is. Then simply ensure you've got 127.0.0.1 VALUE_OF_HOSTNAME_-F in your /etc/hosts file.

penland365
  • 525
  • 4
  • 13
  • This worked for me for launching Spark on a locale Mesos cluster. However, it still remains the annoying warning: `************************************************** Master bound to loopback interface! Cannot communicate with remote schedulers or slaves. You might want to set '--ip' flag to a routable IP address. **************************************************` Of course, the --ip flag is set... Thanks a lot – besil Jul 06 '15 at 08:19
  • The solution was to have `127.0.0.1 VALUE_OF_HOSTNAME` in `/etc/hosts`, no need for `-F`. – Armand Grillet Apr 25 '17 at 10:28