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

Incorrect IP to stdout on startup #1595

Closed
Kevsy opened this issue Jun 6, 2017 · 3 comments
Closed

Incorrect IP to stdout on startup #1595

Kevsy opened this issue Jun 6, 2017 · 3 comments
Assignees
Milestone

Comments

@Kevsy
Copy link

Kevsy commented Jun 6, 2017

Summary

Kolibri indicates the server is listening on 0.0.0.0:8080 on startup. This is not RFC 1122 compliant and is causing confusion to OpCos. Please can this be changed to the IP (or IPs):8080?

System information

Please specify the Kolibri version you were using and your operating system!

  • Version: kolibri-vf-v0.3.1
  • Operating system: Ubuntu
  • Browser: N/A

Traceback or relevant snippet from server.log or browser console

wrong_loopback

How to reproduce

  1. Start Kolibri
  2. Read the resulting stdout 'Engine serving on...' message

Real-life consequences (anything community should be aware of, for instance how it affects your deployment)

Confusion from network admins who cannot access that IP - per RFC 1122, 'This host on this network. MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its own IP address.' So any attenpt to access via a browser or other box will fail, as both proxys and routers will drop packets addressed this way.

@benjaoming
Copy link
Contributor

This is already solved in KA Lite with ifcfg, which is a third-party library we're the maintainers of on PyPi: https://github.com/ftao/python-ifcfg

I've updated so it doesn't depend on ifconfig anymore, but it would be nice to make it Windows compatible, too... so we don't need this (from KA Lite):

    if system.lower() in ["linux", "darwin", "macosx"]:
        # on Linux and OSX, use the ifcfg library to wrap ifconfig
        ips = [iface.get("inet") for iface in ifcfg.interfaces().values()]
    elif system.lower() == "windows":
        # on Windows, run ipconfig and parse the output
        ipconfig = os.popen("ipconfig /all").read()
        ips = [match[1] for match in re.findall("IP(v4)? Address[\.\: ]+([\d\.]+)", ipconfig)]
    else:
        ips = []

@benjaoming benjaoming added this to the 0.6.0 milestone Jun 27, 2017
@benjaoming benjaoming self-assigned this Jun 27, 2017
@benjaoming
Copy link
Contributor

benjaoming commented Jul 19, 2017

As suggested by @rtibbles we might add a command kolibri url to display the URLs of the server.

@rtibbles
Copy link
Member

Fixed in #1929

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

3 participants