wazuh-packages icon indicating copy to clipboard operation
wazuh-packages copied to clipboard

Packages can't be downloaded with slow internet connection - Offline

Open davidcr01 opened this issue 1 year ago • 0 comments

Wazuh version Install type Action performed Platform
4.9.0 Wazuh stack Packages download Any

Description

While working on https://github.com/wazuh/wazuh-packages/issues/1422, I noticed a strange behavior in the Wazuh packages offline download: the indexer package could not be downloaded, and it takes too much time to be completely downloaded.

After debugging the behavior, I found that the Wazuh indexer package downloaded was interrupted because of the --max-time 300 option specified in the curl command. This provokes another retry to download the package, and then, another interruption:

> bash wazuh-install.sh -dw rpm -v
...
12/12/2023 18:25:15 DEBUG: Downloading Wazuh indexer package...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 70  673M   70  472M    0     0  1614k      0  0:07:07  0:05:00  0:02:07  959k
Warning: Transient problem: timeout Will retry in 5 seconds. 5 retries left.
Throwing away 495950754 bytes
 60  673M   60  405M    0     0  1385k      0  0:08:17  0:04:59  0:03:18  869k
Warning: Transient problem: timeout Will retry in 5 seconds. 4 retries left.
Throwing away 425675682 bytes
 20  673M   20  139M    0     0  1086k      0  0:10:34  0:02:11  0:08:23  994k^C
Do you want to remove the ongoing installation?[Y/N]

Notice that the indexer package is only 70% downloaded, and 60% downloaded. The indexer package is the largest package of Wazuh, taking 1GB approximately.

:bulb: We should consider incrementing the --max-time 300 parameter to allow downloading the packages with slow internet connections.

Tasks

  • [ ] Investigate a fix
  • [ ] Apply the fix
  • [ ] Validate the fix: the packages are downloaded even with slow connection.

davidcr01 avatar Dec 12 '23 18:12 davidcr01