sonm-io / core

Decentralized Fog Computing Platform
https://sonm.com
GNU General Public License v3.0
360 stars 75 forks source link

Network Benchmarks Always Reporting 0B/s #1311

Open king-jam opened 6 years ago

king-jam commented 6 years ago

Components version

v0.4.8-7f2f38bf

Describe the bug net-bandwidth always reports zero

Step to reproduce Run benchmarks, bandwidth results will not connect to the server IP with iperf. Also went to Source to manually run the command without success. Did so with and without firewalls running.

Expected behavior Benchmarks to run and report near ISP bandwidth.

Screenshots and/or terminal logs N/A

Platform (please complete the following information):

Network:
  Incoming: false
  Overlay:  true
  In:       0B/s
  Out:      0B/s
  Benchmarks:
    net-download: 0
    net-upload: 
3Hren commented 6 years ago

Seems like neither connection failed error occurred nor something else, but it still failed. Can you do iperf -c 138.68.91.1 --tradeoff --format k --reportstyle C --time 15s and paste here the output?

king-jam commented 6 years ago
root@localhost:~# iperf -c 138.68.91.1 --tradeoff --format k --reportstyle C --time 15s
connect failed: Connection timed out
king-jam commented 6 years ago

I've tried both from home and via a server in AWS, I can't get a connection to work outbound. All firewalls and security off, etc.

king-jam commented 6 years ago

Suspect the service just died on the IP. I resolved it by changing the target IP. You should consider hardcoding a DNS entry and doing a DNS lookup for the IP. Then you can change the location of iperf servers or even DNS load balance.

  1. Downloaded this folder Source
  2. Changed the SERVER variable in the script to a local network machine running iperf -s
  3. Built the container from scratch locally and pushed to my own Dockerhub.
  4. Changed the sonm-worker.yml to use a local file for benchmarks Reference
  5. Changed the benchmark list List to point the net-download and net-upload tests to my own container.

FYI, the security of that benchmark is pretty bad. I could easily hardcode my network speeds that I want reported into a local container and advertise anything I wanted.

nikonov1101 commented 6 years ago

Hello, @king-jam! The iperf-based benchmark is no longer used for network measurement. The image referenced in the benchmarks list has been built from this sources and yes, it just a speedtest.

Yeah, we must fix the naming and drop old containers sources from the repo. :(

Can you run single benchmark by hand and show us the results?

docker run -it --rm sonm/net-bandwidth@sha256:e51c367c5ad56c9ea1dbe1497b4acc7d0839be0832d8b77986b931eedc766fc2