Closed zandr closed 2 years ago
Thank you, btw, for a great tool. This is fantastic for automating an annoying problem.
@zandr Thank you very much for using it! Sorry you're facing issues. I don't have a lot of time today to go through and fix the underlying problem. My best guess is that the problem occurs because I haven't pinned any of the project dependencies. Anyway, it's very good that you have the CSV and here's how you can generate the heatmap.
If you have already installed nr-wg-mtu-finder
using pip
, then you can create a my_plot.py
file with the following contents. Then run the file with python my_plot.py
# my_plot.py
from nr_wg_mtu_finder.plot import plot_log
plot_log(
log_filename='/path/to/my_log.csv',
plot_filename='/path/to/my_plot.png'
)
If that doesn't work either, then you can have a look at the issue #2 for how the generation of heatmap works and feel free to clone the git repo and alter the source code of nr_wg_mtu_finder/plot.py
to generate your heatmap.
I will keep this issue open to find the root cause of the issue later and also to make sure to create a CLI tool for heatmap generation in case anyone else faces the same issue.
Let me know if I can help with versions of any of the deps. Both machines are 20.04.4 LTS, the peer was installed fresh today, the server was updated today. nr-wg-mtu-finder was installed on both ends today from github.
The snippet works a treat for manually generating the heatmap. Thanks!
Thanks for the offer! But, I think I have an old environment for the project somewhere which contains a working version of the project and I'll just get the versions of all the dependencies from there in one go 👍
@zandr If possible, would you be able to share your heatmap (only if you want to). I am really curious about how MTUs behave. I have a created an issue where you can share it - #4
Running a full sweep now, will post heatmaps in a few hours.
Hi everybody, have the same problem... How to resolve it? and create heatmap?
Pinging server to establish connection : SUCCESS Send peer ready for next loop to server : SUCCESS Pinging server to establish connection : SUCCESS Waiting for server init and status : FAILED, SERVER_STATUS: NOT_INITIALIZED, Retrying... Waiting for server init and status : Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.8/http/client.py", line 1256, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output self.send(msg) File "/usr/lib/python3.8/http/client.py", line 951, in send self.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 187, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xffff99e75760>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='10.2.0.1', port=5000): Max retries exceeded with url: /server/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff99e75760>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/parallels/.local/bin/nr-wg-mtu-finder", line 8, in
And this is log from server
Serving Flask app 'nr_wg_mtu_finder.sync_server' (lazy loading)
@krstik I'm currently on vacation and will fix the underlying problem once I'm back.
However it appears you were able to successfully create the log file on the peer according to the logs you pasted:
creating log file: wg_mtu_finder_peer_20220615T180040.csv: SUCCESS
This means your run has finished successfully but failed only at the final heatmap generation phase. You can generate the heatmap manually by following the instructions I wrote in an earlier comment on this issue. The instructions worked for Zandar.
If you happen to be successful in generating the heatmap, I'd appreciate it if you could upload the heatmap image with some addtional details to issue #4.
I was able to replicate the error that was reported @zandr @krstik . I have a released a new version (0.2.0
) that fixes this issue by pinning the dependencies.
You can now install the project directly from Pypi now with pip install nr-wg-mtu-finder==0.2.0 --upgrade
I have also added a new script nr-wg-mtu-finder-heatmap
which will allow you to generate heatmaps from partial log files in case the original script (i.e. nr-wg-mtu-finder
) crashes mid way and doesn't finish before the heatmap is generated.
Thanks for reporting the issue! I will close it for now.
I've been trying to dial in a WG connection between two sites that are about 200ms apart, with one end using PPPoE. I'm running Ubuntu in a Parallels VM on the peer side and in Boot Camp on an old mac on the server side.
I seem to get a good test run, with the right number of rows written to the .csv, but at the end of the run both sides throw errors. On the peer I get:
and on the server I get
It looks like the data is there, though. Is there a way to manually process the CSV into a heatmap?