soravux / scoop

SCOOP (Scalable COncurrent Operations in Python)
https://github.com/soravux/scoop
GNU Lesser General Public License v3.0
635 stars 87 forks source link

gaierror: [Errno 8] nodename nor servname provided, or not known #47

Open alec-djinn opened 8 years ago

alec-djinn commented 8 years ago

I have a problem running scoop with OSX El Capitan.

Here the self-explanatory output I get:

import sys
print sys.version

2.7.12 (default, Oct 14 2016, 15:23:34) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)]

from scoop import futures

gaierror Traceback (most recent call last)

in () ----> 1 from scoop import futures /Users/username/Homebrew/lib/python2.7/site-packages/scoop/futures.py in () 24 25 import scoop ---> 26 from ._types import Future, CallbackType 27 from . import _control as control 28 from .fallbacks import ( /Users/username/Homebrew/lib/python2.7/site-packages/scoop/_types.py in () 21 import greenlet 22 import scoop ---> 23 from scoop._comm import Communicator, Shutdown 24 25 # Backporting collection features /Users/username/Homebrew/lib/python2.7/site-packages/scoop/_comm/__init__.py in () 20 21 if scoop.CONFIGURATION.get('backend', 'ZMQ') == 'ZMQ': ---> 22 from .scoopzmq import ZMQCommunicator as Communicator 23 else: 24 from .scooptcp import TCPCommunicator as Communicator /Users/username/Homebrew/lib/python2.7/site-packages/scoop/_comm/scoopzmq.py in () 29 30 import scoop ---> 31 from .. import shared, encapsulation, utils 32 from ..shared import SharedElementEncapsulation 33 from .scoopexceptions import Shutdown, ReferenceBroken /Users/username/Homebrew/lib/python2.7/site-packages/scoop/shared.py in () 22 import time 23 ---> 24 from . import encapsulation, utils 25 import scoop 26 from .fallbacks import ensureScoopStartedProperly, NotStartedProperly /Users/username/Homebrew/lib/python2.7/site-packages/scoop/utils.py in () 41 42 localHostnames.extend([ ---> 43 ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] 44 if not ip.startswith("127.")][:1] 45 ) gaierror: [Errno 8] nodename nor servname provided, or not known Any clue?
lmarti commented 7 years ago

+1

jasonzutty commented 7 years ago

+1

nagapavan commented 7 years ago

+1 Same issue with Sierra as well.

oriontang commented 7 years ago

+1 any update?

geeknees commented 7 years ago

Same issue with Sierra. I just put 127.0.0.1 MacBook-Pro.local on `/etc/hosts, it may help.

benjaminpatrickevans commented 6 years ago

Any update on this? High Sierra here, and line above didnt work

stephunk commented 6 years ago

I had the same issue. The root of the problem is that there is no mapping between the name of he local host and an IP address. To solve the issue the name of your host (network name of the machine) needs to be added in /etc/hosts pointing to a local ip 127.0.01 <host name>. Bonus fact, having emojis in the name of the host will not be recognised even if added in the host file.

DMTSource commented 6 years ago

@mgka got me there with their suggestion. However it required me to find my <hostname> as it was different from the example, as I expect @ben-ix experienced. In my OS I was able to get this via terminal using: hostname. In my case I had to add, as admin to /etc/host, 127.0.0.1 MyName-MacBook-Pro.local and now scoop is back to working.

icehongssii commented 6 years ago

Even in 2018 +1

xdthesun commented 5 years ago

@mgka got me there with their suggestion. However it required me to find my <hostname> as it was different from the example, as I expect @ben-ix experienced. In my OS I was able to get this via terminal using: hostname. In my case I had to add, as admin to /etc/host, 127.0.0.1 MyName-MacBook-Pro.local and now scoop is back to working.

yes,it is working well , thanks

KeitelDOG commented 5 years ago

@DMTSource thanks. executing hostname in terminal gave me MyNames-MacBook-Pro.local, like the MyName is contraction to Myname's Macbook Pro.

unnat5 commented 5 years ago

So in 2019 I still had this problem: Steps to solve this are as follows: First, write hostname in the terminal to get your local device hostname and copy it. Then type sudo nano /etc/hosts and then input password to open nano editor then type this 127.0.0.1 hostnamethis hostname is the one which we got earlier by typing hostname in the terminal, then control+x and Y to save. Problem solved!

CHE1RON commented 7 months ago

Unfortunately, this remains a problem in 2024 .. any solutions yet? 😕

KeitelDOG commented 7 months ago

@CHE1RON have you tried to open /private/etc/hosts and try adding new host:

127.0.0.1 [YourName]s-MacBook-Pro.local ?

My Account name is Keitel, and mine was 127.0.0.1 Keitels-MacBook-Pro.local.

CHE1RON commented 7 months ago

Yeah, I added all kinds of hostnames, both with trailing .local and without 😕

KeitelDOG commented 7 months ago

@CHE1RON last thing I can tell you is to double check your hostname, cause it is different according to macOS version. In terminal type: hostname and see what is printed. In my old macOS, it was Keitels-MacBook-Pro.local , but now it returns Keitels-MBP.

If nothing works, then you should check if this file is ever used, as if its permission access allow it, or not overridden by another file, I don't know.