Git Product home page Git Product logo

Comments (11)

kwquick avatar kwquick commented on August 24, 2024

Daniel,

This is typically caused by having an underspecified networking configuration: no specification of localhost or assignment of a hostname or domain. Unfortunately, in the current implementation there is no way to know which one, so could you please provide the results of running the following:

$ python3
>>> import socket
>>> hn = socket.gethostname()
>>> print(str(hn))
>>> fqdn = socket.getfqdn()
>>> print(str(fqdn))
>>> socket.getaddrinfo(None, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
>>> socket.getaddrinfo(hn, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
>>> socket.getaddrinfo(fqdn, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
>>> exit()
$ grep localhost /etc/hosts

I will update the code to provide more information on failure of any of the above in the future, but the above information will help diagnose this.

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

Hi Kevin,

thanks for the hint. Here is the output of the shell session on my machine:

dm@io:~ $ python3
Python 3.5.2 (default, Jun 29 2016, 13:43:58)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> hn = socket.gethostname()
>>> print(str(hn))
io
>>> fqdn = socket.getfqdn()
>>> print(str(fqdn))
103.1.168.192.in-addr.arpa
>>> socket.getaddrinfo(None, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('127.0.0.1', 0))]
>>> socket.getaddrinfo(hn, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('192.168.1.103', 0))]
>>> socket.getaddrinfo(fqdn, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
>>>
dm@io:~ $ grep localhost /etc/hosts
# localhost is used to configure the loopback interface
127.0.0.1   localhost
::1             localhost

As you can see, the line socket.getaddrinfo(fqdn, 0, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) seems to cause the problem that I have originally reported.

from thespian.

kwquick avatar kwquick commented on August 24, 2024

Hi Daniel,

It looks like your fqdn is invalid, but that shouldn't necessarily be a fatal problem for Thespian. I've pushed a commit to the Thespian repository that should just warn about this issue but attempt to continue. Please let me know if this works for you.

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

Hi Kevin, thanks for your quick fix. This worked for me.

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

Hi Kevin, do you have any plans to cut a 3.0.3 release? Rally, is nearing its first release where we use Thespian internally and I'd be great to spare users this issue. :)

from thespian.

kwquick avatar kwquick commented on August 24, 2024

Daniel, I should be able to get you a release sometime today. -Kevin

from thespian.

kwquick avatar kwquick commented on August 24, 2024

3.0.3 is released.

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

Many, many thanks Kevin for the quick release!

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

Well, this is embarrassing (on my part). I don't know how I was testing back then but unfortunately the issue is not fixed. I'll spare you further hassle and will create a PR very soon that really fixes the issue.

from thespian.

kwquick avatar kwquick commented on August 24, 2024

Thespian 3.0.4 is released and contains the latest update.

from thespian.

danielmitterdorfer avatar danielmitterdorfer commented on August 24, 2024

I just tested it; 3.0.4 works perfectly. Thanks again Kevin.

from thespian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.