Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alec-djinn opened this issue Oct 17, 2016 · 16 comments
Open

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

alec-djinn opened this issue Oct 17, 2016 · 16 comments

Comments

@alec-djinn
Copy link

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
Copy link

lmarti commented Nov 16, 2016

+1

1 similar comment
@jasonzutty
Copy link

+1

@nagapavan
Copy link

+1
Same issue with Sierra as well.

@oriontang
Copy link

+1 any update?

@geeknees
Copy link

geeknees commented Aug 5, 2017

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

@benjaminpatrickevans
Copy link

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

@stephunk
Copy link

stephunk commented Dec 23, 2017

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
Copy link

@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
Copy link

Even in 2018 +1

@xdthesun
Copy link

@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
Copy link

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

@unnat5
Copy link

unnat5 commented Mar 14, 2019

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
Copy link

CHE1RON commented Mar 15, 2024

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

@KeitelDOG
Copy link

@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
Copy link

CHE1RON commented Mar 19, 2024

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

@KeitelDOG
Copy link

KeitelDOG commented Mar 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests