GithubHelp home page GithubHelp logo

pyrad + python3.6 about pyrad HOT 6 OPEN

pyradius avatar pyradius commented on August 15, 2024
pyrad + python3.6

from pyrad.

Comments (6)

GIC-de avatar GIC-de commented on August 15, 2024 2

Please try with latest version from master which should support IPv6 as well and close issue if working.

from pyrad.

rbricheno avatar rbricheno commented on August 15, 2024

It looks like the computer where you are running python can't resolve localhost.

I expect if you run this python snippet you will receive the same error:

import socket

print(socket.gethostbyname("localhost"))

Troubleshoot that before looking at pyrad (e.g. is there an entry for localhost in your hosts file? what happens when you run a command like nslookup localhost?)

from pyrad.

velopokatun avatar velopokatun commented on August 15, 2024

~$ python2.7

import socket
print(socket.gethostbyname("localhost"))
127.0.0.1

~$ python3.6

import socket
print(socket.gethostbyname("localhost"))
127.0.0.1

~$ nslookup localhost
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
Name: localhost
Address: 127.0.0.1
`

from pyrad.

rbricheno avatar rbricheno commented on August 15, 2024

Thank you, that's quite interesting. The only way I could replicate your problem was by breaking my ability to resolve localhost. I'd like to try and find a minimal case that still breaks for you. Does this break, or does it work?

import socket

my_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
my_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
my_socket.sendto(b'a', ("localhost", 1812))

That should be very close to what pyrad is doing (and works for me with no error).

Also, could you comment about what platform you are using please? E.g. windows, mac, linux distribution / version?

from pyrad.

velopokatun avatar velopokatun commented on August 15, 2024

Sorry for the late response. The project slowed down a bit and the problem moved to the second row. The platform used Ubuntu 64 16.04 LTS

from pyrad.

velopokatun avatar velopokatun commented on August 15, 2024

I still replace one feature that I'm sorry, did not specify. The problem arises if the address is specified in IPV6. When IPV4 everything is working fine

from pyrad.

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.