HelloZeroNet / HelloZeroNet/ZeroNet

Upnp router configuration

未关闭
#223 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
18.8k
派生
2.3k
PR 合并指标
30 天内没有已合并 PR

描述

Hi,
I tried ZeroNet on a computer, and it opened Upnp ports on the connected router
Then I tried ZeroNet on another computer behind the same router
and it was not able to open ports for this other IP address,
so I was not able to distribute the network,
so I removed the old UPnP configuration on my router,
and I reloaded ZeroNet, and it opened the ports of the new IP address.

;)

Hope it helps to improve the software

Error logs :

[mardi 8 décembre 2015, 12:58:47 (UTC+0100)] ZeroNet is starting
- Starting ZeroNet...
[12:58:48] - Version: 0.3.2 r494, Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2], Gevent: 1.1b7.dev0
[12:58:48] - OpenSSL loaded, version: 01000106F
[12:58:48] - Creating FileServer....
[12:58:48] - Creating UiServer....
[12:58:51] - Removing old SSL certs...
[12:58:51] - Starting servers....
[12:58:51] Ui.UiServer --------------------------------------
[12:58:51] Ui.UiServer Web interface: http://127.0.0.1:43110/
[12:58:51] Ui.UiServer --------------------------------------
[12:58:52] FileServer Checking port 15441 using portchecker.co...
[12:58:54] FileServer [BAD :(] Port closed: Port 15441 is closed.
[12:58:54] FileServer Checking port 15441 using canyouseeme.org...
[12:59:07] FileServer [BAD :(] Port closed: Error: I could not see your service on 86.195.53.48 on port (15441) Reason: Connection timed out
[12:59:07] FileServer Trying to open port using UpnpPunch...
**[12:59:07] - Unhandled exception
Traceback (most recent call last):**
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 523, in run
result = self._run(_self.args, *_self.kwargs)
File "src/util/UpnpPunch.py", line 171, in _send_soap_request
return _parse_for_errors(response)
File "src/util/UpnpPunch.py", line 139, in _parse_for_errors
err_dom = parseString(soap_response.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
**ExpatError: no element found: line 1, column 0
Traceback (most recent call last):**
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 523, in run
result = self._run(_self.args, *_self.kwargs)
File "src/util/UpnpPunch.py", line 171, in _send_soap_request
return _parse_for_errors(response)
File "src/util/UpnpPunch.py", line 139, in _parse_for_errors
err_dom = parseString(soap_response.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
**xml.parsers.expat.ExpatError: no element found: line 1, column 0
[12:59:07] - Unhandled exception
Traceback (most recent call last):**
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 523, in run
result = self._run(_self.args, *_self.kwargs)
File "src/util/UpnpPunch.py", line 171, in _send_soap_request
return _parse_for_errors(response)
File "src/util/UpnpPunch.py", line 139, in _parse_for_errors
err_dom = parseString(soap_response.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
ExpatError: no element found: line 1, column 0
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 523, in run
result = self._run(_self.args, *_self.kwargs)
File "src/util/UpnpPunch.py", line 171, in _send_soap_request
return _parse_for_errors(response)
File "src/util/UpnpPunch.py", line 139, in _parse_for_errors
err_dom = parseString(soap_response.read())
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
**xml.parsers.expat.ExpatError: no element found: line 1, column 0**
[12:59:11] FileServer Checking port 15441 using portchecker.co...
[12:59:13] FileServer [BAD :(] Port closed: Port 15441 is closed.
[12:59:13] FileServer Checking port 15441 using canyouseeme.org...
[12:59:21] FileServer [BAD :(] Port closed: Error: I could not see your service on YOU_PUBLIC_IP_ADDRESS on port (15441) Reason: Connection timed out
[12:59:21] FileServer Upnp mapping failed :( Please forward port 15441 on your router to your ipaddress`

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start with src/util/UpnpPunch.py, especially _parse_for_errors at line 139 and _send_soap_request at line 171, then review the reported UPnP failure when a second computer uses the same router. Reproduce the two-computer setup if possible and verify that the failure no longer produces an unhandled ExpatError and that the port-mapping result is reported correctly.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
networking
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。