aramperes/onetun

An iperf session never finishes

mmoya opened this issue · 1 comments

mmoya commented

An iperf session never finishes with 0.3.4

onetun run as ./onetun-linux-amd64 --endpoint-addr endpoint-host:endpoint-port --endpoint-public-key endpoint-pubkey --private-key-file wg0-private.key --source-peer-ip 192.168.177.6 --keep-alive 25 8888:192.168.177.1:6697

A nc conversation works ok (server cmdline = nc -4lknv 192.168.177.1 6697, client cmdline nc 127.0.0.1 8888) so the tunnel is working.

iperf server: iperf3 -s -p 6697
iperf client: iperf3 -c 127.0.0.1 -p 8888

The logs

 2022-09-28T11:31:53.050Z INFO  onetun::tunnel > Tunneling TCP [127.0.0.1:8888]->[192.168.177.1:6697] (via [endpoint-host:endpoint-port] as peer 192.168.177.6)                                                                                                                                        
 2022-09-28T11:32:42.095Z INFO  onetun::tunnel::tcp > [[28378:TCP]] Incoming connection from 127.0.0.1:40152                                                                                                                                                                                
 2022-09-28T11:32:42.405Z INFO  onetun::tunnel::tcp > [[22848:TCP]] Incoming connection from 127.0.0.1:40154                                                                                                                                                                                
 2022-09-28T11:32:42.950Z ERROR onetun::events      > Failed to read event bus from endpoint #2                                                                                                                                                                                             
 2022-09-28T11:32:42.950Z ERROR onetun::events      > Failed to read event bus from endpoint #3                                                                                                                                                                                             
 2022-09-28T11:32:42.950Z ERROR onetun::events      > Failed to read event bus from endpoint #5                                                                                                                                                                                             
 2022-09-28T11:32:42.950Z ERROR onetun::events      > Failed to read event bus from endpoint #0                                                                                                                                                                                             
 2022-09-28T11:32:42.950Z ERROR onetun::events      > Failed to read event bus from endpoint #3                                                                                                                                                                                             
 2022-09-28T11:32:44.823Z ERROR onetun::events      > Failed to read event bus from endpoint #3                                                                                                                                                                                             
...

and then the endpoint #3 message keeps repeating forever.

iperf client reports a big sender bitrate (like if data were being piped to an infinite buffer) but 0.00 bits/sec from receiver. The iperf server always reports 0 bytes transferred.

Debug logs are in https://pastebin.com/XzGjpaDE.

Not sure if this is related to #29. It's definitely related to #9.

Thanks for all the details and analysis. I'll make sure to use iperf for further performance testing. Sounds like onetun can't keep up with it.