title: Pyro4: Failed to locate the nameserver
body: <p>I'm rather new to Python and Pyro4. So I try to follow the second example of this page <a href="https://pythonhosted.org/Pyro4/intro.html" rel="noreferrer">Pyro - Python Remote Objects - 4.41</a>, but when I run the server throw this exception:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;greeting-server.py&quot;, line 10, in &lt;module&gt;
      ns = Pyro4.locateNS()                  # find the name server
    File &quot;/usr/lib/python2.7/dist-packages/Pyro4/naming.py&quot;, line 344, in locateNS
      raise e
  Pyro4.errors.NamingError: Failed to locate the nameserver
  </code></pre>
  <p>Code Server:</p>
  <pre><code># saved as greeting-server.py
  import Pyro4
  
  class GreetingMaker(object):
      def get_fortune(self, name):
          return &quot;Hello, {0}. Here is your fortune message:\n&quot; \
                 &quot;Tomorrow's lucky number is 12345678.&quot;.format(name)
  
  daemon = Pyro4.Daemon()                # make a Pyro daemon
  ns = Pyro4.locateNS()                  # find the name server
  uri = daemon.register(GreetingMaker)   # register the greeting maker as a Pyro object
  ns.register(&quot;example.greeting&quot;, uri)   # register the object with a name in the name server
  
  print(&quot;Ready.&quot;)
  daemon.requestLoop()                   # start the event loop of the server to wait for calls
  </code></pre>
  <p>Run pyro-ns in another terminial first:</p>
  <pre><code>$pyro-ns
  *** Pyro Name Server ***
  Name server listening on: ('0.0.0.0', 9090)
  
  WARNING: daemon bound on hostname that resolves to loopback address 127.0.x.x 
  
  URI is: PYRO://127.0.1.1:9090/7f0001011d2a21ca9fb63702dd216e1143
  URI written to: /home/guille/Documents/pyro examples/Pyro4-master/examples/banks/Pyro_NS_URI
  Name Server started.
  </code></pre>
  <p><strong>Remark:</strong> I work on  Debian 8 and I've installed:</p>
  <ul>
  <li>sudo apt-get install pyro4</li>
  <li>sudo apt-get install python2-pyro4</li>
  <li>pip install <a href="https://pypi.python.org/packages/2.7/s/serpent/serpent-" rel="noreferrer">https://pypi.python.org/packages/2.7/s/serpent/serpent-</a>
  1.7-py2.py3-none-any.whl</li>
  </ul>
  <p>to run this example</p>
  <p>Maybe I missed something. Any ideas why this is not working, or things that I'm doing wrong?
  thanks in advance.</p>