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

Error in python file generateconfig.py ! #854

Open
AbdelrahmanEmad12 opened this issue Feb 5, 2023 · 1 comment
Open

Error in python file generateconfig.py ! #854

AbdelrahmanEmad12 opened this issue Feb 5, 2023 · 1 comment

Comments

@AbdelrahmanEmad12
Copy link

  • echo ' MHN Configuration'
    MHN Configuration
  • echo ===========================================================
    ===========================================================
  • python generateconfig.py
    Traceback (most recent call last):
    File "generateconfig.py", line 184, in
    generate_config()
    File "generateconfig.py", line 32, in generate_config
    pub_ip = get_pub_ip()
    File "generateconfig.py", line 21, in get_pub_ip
    sock = urlopen('http://icanhazip.com/')
    File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
    File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
    File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
    File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
    File "/usr/lib/python2.7/urllib2.py", line 1235, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib/python2.7/urllib2.py", line 1208, in do_open
    r = h.getresponse(buffering=True)
    File "/usr/lib/python2.7/httplib.py", line 1178, in getresponse
    response.begin()
    File "/usr/lib/python2.7/httplib.py", line 452, in begin
    version, status, reason = self._read_status()
    File "/usr/lib/python2.7/httplib.py", line 408, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
    File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
    socket.error: [Errno 104] Connection reset by peer
@wrharding
Copy link
Collaborator

This looks like you have a firewall blocking outbound connections to http://icanhazip.com, which MHN uses to query you external IP initially. Your external IP is used as the default server address, unless you choose to change it in the step immediately following what you've posted.

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

No branches or pull requests

2 participants