wifinigel / wiperf_poller

Polling engine for the wiperf utility
Other
3 stars 5 forks source link

Error - Duplicated 'http_target_x' in section 'HTTP_test' #16

Closed lealog closed 3 years ago

lealog commented 3 years ago

When using the latest version, it is not possible to run the tests because the default config.ini file has duplicated parameter - http_target_1

Traceback (most recent call last): File "/usr/share/wiperf/wiperf_run.py", line 4, in import wiperf_poller.main as agent File "/usr/local/lib/python3.7/dist-packages/wiperf_poller/main.py", line 53, in config_vars = read_local_config(config_file, file_logger) File "/usr/local/lib/python3.7/dist-packages/wiperf_poller/helpers/config.py", line 24, in read_local_config config.read(config_file) File "/usr/lib/python3.7/configparser.py", line 696, in read self._read(fp, filename) File "/usr/lib/python3.7/configparser.py", line 1091, in _read fpname, lineno) configparser.DuplicateOptionError: While reading from '/etc/wiperf/config.ini' [line 404]: option 'http_target_1' in section 'HTTP_test' already exists

On the config.ini you have the following. [HTTP_test] ; yes = enabled, no = disabled enabled: yes ; ; Number of HTTP targets we'd like to test http_targets_count: 2 ; ; First HTTP target ; target URL http_target_1: https://google.com ; select IPv4/IPv6 (IPv4 if no arg provided) http_target_1: ipv4 ; additonal commands to pass to curl (advanced option) http_target_curl_args_1:

; ; Second HTTP target http_target_2: https://facebook.com http_target_2: ipv4 http_target_curl_args_2:

wifinigel commented 3 years ago

nice spot - looks like a copy & pasted issue by me. Config file now fixed and pushed to repo.

Tested by installing & running a fresh instance of wiperf and issue now resolved.

lealog commented 3 years ago

tested and it's OK