scoop icon indicating copy to clipboard operation
scoop copied to clipboard

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

Open alec-djinn opened this issue 9 years ago • 16 comments

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?

alec-djinn avatar Oct 17 '16 11:10 alec-djinn

+1

lmarti avatar Nov 16 '16 00:11 lmarti

+1

jasonzutty avatar Feb 28 '17 15:02 jasonzutty

+1 Same issue with Sierra as well.

nagapavan avatar May 31 '17 09:05 nagapavan

+1 any update?

oriontang avatar Jul 26 '17 21:07 oriontang

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

geeknees avatar Aug 05 '17 05:08 geeknees

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

benjaminpatrickevans avatar Dec 19 '17 02:12 benjaminpatrickevans

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.

stephunk avatar Dec 23 '17 19:12 stephunk

@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.

DMTSource avatar May 09 '18 14:05 DMTSource

Even in 2018 +1

icehongssii avatar Aug 13 '18 09:08 icehongssii

@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

xdthesun avatar Feb 20 '19 08:02 xdthesun

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

KeitelDOG avatar Mar 04 '19 16:03 KeitelDOG

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!

unnat5 avatar Mar 14 '19 06:03 unnat5

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

CHE1RON avatar Mar 15 '24 12:03 CHE1RON

@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.

KeitelDOG avatar Mar 17 '24 14:03 KeitelDOG

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

CHE1RON avatar Mar 19 '24 10:03 CHE1RON

@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.

KeitelDOG avatar Mar 21 '24 17:03 KeitelDOG