Skip to content

Conversation

@CarlosALgit
Copy link
Member

Related issue

Description

The aim of this PR is to fix the Offline Download method of the Wazuh Installation Assistant.

To fix this, a new variable has been created that contains the Filebeat version and it is only used in the Offline Download method. With this, we can change this variable as requested without affecting the Online Installation Assistant.

Tests

Ubuntu 22 x86_64:

Environment:

root@ip-172-31-46-132:/home/ubuntu# cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@ip-172-31-46-132:/home/ubuntu# uname -a
Linux ip-172-31-46-132 5.19.0-1025-aws #26~22.04.1-Ubuntu SMP Mon Apr 24 01:58:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
root@ip-172-31-46-132:/home/ubuntu# sudo bash wazuh-install.sh -dw deb -da amd64 -d pre-release -v
22/04/2025 08:22:05 INFO: Starting Wazuh installation assistant. Wazuh version: 4.12.0
22/04/2025 08:22:05 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/04/2025 08:22:05 DEBUG: APT package manager will be used.
22/04/2025 08:22:05 DEBUG: Installing check dependencies.
22/04/2025 08:22:18 DEBUG: Checking Wazuh installation.
22/04/2025 08:22:20 INFO: Using Filebeat template from master branch.
22/04/2025 08:22:20 DEBUG: Checking system architecture.
22/04/2025 08:22:20 DEBUG: System architecture: x86_64
22/04/2025 08:22:20 INFO: Verifying that your system meets the recommended minimum hardware requirements.
22/04/2025 08:22:20 DEBUG: CPU cores detected: 4
22/04/2025 08:22:20 DEBUG: Free RAM memory detected: 7847
22/04/2025 08:22:20 INFO: --- Download Packages ---
22/04/2025 08:22:20 INFO: Starting Wazuh packages download.
22/04/2025 08:22:20 INFO: Downloading Wazuh deb packages for amd64.
22/04/2025 08:22:20 DEBUG: Wazuh manager package revision fetched.
22/04/2025 08:22:21 DEBUG: Filebeat package revision fetched.
22/04/2025 08:22:22 DEBUG: Wazuh indexer package revision fetched.
22/04/2025 08:22:22 DEBUG: Wazuh dashboard package revision fetched.
22/04/2025 08:22:22 DEBUG: Downloading Wazuh manager package...
22/04/2025 08:22:33 INFO: The manager package was downloaded.
22/04/2025 08:22:33 DEBUG: Downloading Wazuh filebeat package...
22/04/2025 08:22:35 INFO: The filebeat package was downloaded.
22/04/2025 08:22:35 DEBUG: Downloading Wazuh indexer package...
22/04/2025 08:23:00 INFO: The indexer package was downloaded.
22/04/2025 08:23:00 DEBUG: Downloading Wazuh dashboard package...
22/04/2025 08:23:05 INFO: The dashboard package was downloaded.
22/04/2025 08:23:05 INFO: The packages are in wazuh-offline/wazuh-packages
22/04/2025 08:23:05 INFO: Downloading configuration files and assets.
22/04/2025 08:23:05 DEBUG: Downloading https://packages.wazuh.com/key/GPG-KEY-WAZUH...
22/04/2025 08:23:05 INFO: The resource https://packages.wazuh.com/key/GPG-KEY-WAZUH was downloaded.
22/04/2025 08:23:05 DEBUG: Downloading https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml...
22/04/2025 08:23:05 INFO: The resource https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml was downloaded.
22/04/2025 08:23:05 DEBUG: Downloading https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json...
22/04/2025 08:23:05 INFO: The resource https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json was downloaded.
22/04/2025 08:23:05 DEBUG: Downloading https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz...
22/04/2025 08:23:06 INFO: The resource https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz was downloaded.
22/04/2025 08:23:06 INFO: The configuration files and assets are in wazuh-offline.tar.gz
22/04/2025 08:23:54 INFO: You can follow the installation guide here https://documentation.wazuh.com/current/deployment-options/offline-installation.html

Filebeat download URL:

+ set +x
++ common_curl -sSo wazuh-offline/wazuh-packages/filebeat_7.10.2-1_amd64.deb https://packages-dev.wazuh.com/pre-release/apt/pool/main/f/filebeat/filebeat_7.10.2-1_amd64.deb --max-time 300 --retry 5 --retry-delay 5 --fail
+ output='++ '\''['\'' -n '\'''\'' '\'']'\''
++ retries=0
++ eval '\''curl -sSo'\'' wazuh-offline/wazuh-packages/filebeat_7.10.2-1_amd64.deb https://packages-dev.wazuh.com/pre-release/apt/pool/main/f/filebeat/filebeat_7.10.2-1_amd64.deb --max-time 300 --retry 5 --retry-delay 5 --fail
+++ curl -sSo wazuh-offline/wazuh-packages/filebeat_7.10.2-1_amd64.deb https://packages-dev.wazuh.com/pre-release/apt/pool/main/f/filebeat/filebeat_7.10.2-1_amd64.deb --max-time 300 --retry 5 --retry-delay 5 --fail
++ e_code=0
++ '\''['\'' 0 -eq 7 '\'']'\''
++ return 0'
+ common_logger 'The filebeat package was downloaded.'
Ubuntu 22 aarch64:

Environment:

root@ip-172-31-83-34:/home/ubuntu# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@ip-172-31-83-34:/home/ubuntu# uname -a
Linux ip-172-31-83-34 6.2.0-1012-aws #12~22.04.1-Ubuntu SMP Thu Sep  7 16:00:15 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
root@ip-172-31-83-34:/home/ubuntu# sudo bash wazuh-install.sh -dw deb -da arm64 -d pre-release -v
22/04/2025 08:35:52 INFO: Starting Wazuh installation assistant. Wazuh version: 4.12.0
22/04/2025 08:35:52 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/04/2025 08:35:52 DEBUG: APT package manager will be used.
22/04/2025 08:35:52 DEBUG: Installing check dependencies.
22/04/2025 08:36:11 DEBUG: Checking Wazuh installation.
22/04/2025 08:36:13 INFO: Using Filebeat template from master branch.
22/04/2025 08:36:13 DEBUG: Checking system architecture.
22/04/2025 08:36:13 DEBUG: System architecture: aarch64
22/04/2025 08:36:13 INFO: Verifying that your system meets the recommended minimum hardware requirements.
22/04/2025 08:36:13 DEBUG: CPU cores detected: 4
22/04/2025 08:36:13 DEBUG: Free RAM memory detected: 7768
22/04/2025 08:36:13 INFO: --- Download Packages ---
22/04/2025 08:36:13 INFO: Starting Wazuh packages download.
22/04/2025 08:36:13 INFO: Downloading Wazuh deb packages for arm64.
22/04/2025 08:36:14 DEBUG: Wazuh manager package revision fetched.
22/04/2025 08:36:15 DEBUG: Filebeat package revision fetched.
22/04/2025 08:36:16 DEBUG: Wazuh indexer package revision fetched.
22/04/2025 08:36:16 DEBUG: Wazuh dashboard package revision fetched.
22/04/2025 08:36:16 DEBUG: Downloading Wazuh manager package...
22/04/2025 08:36:26 INFO: The manager package was downloaded.
22/04/2025 08:36:26 DEBUG: Downloading Wazuh filebeat package...
22/04/2025 08:36:27 INFO: The filebeat package was downloaded.
22/04/2025 08:36:27 DEBUG: Downloading Wazuh indexer package...
22/04/2025 08:36:54 INFO: The indexer package was downloaded.
22/04/2025 08:36:54 DEBUG: Downloading Wazuh dashboard package...
22/04/2025 08:36:59 INFO: The dashboard package was downloaded.
22/04/2025 08:36:59 INFO: The packages are in wazuh-offline/wazuh-packages
22/04/2025 08:36:59 INFO: Downloading configuration files and assets.
22/04/2025 08:36:59 DEBUG: Downloading https://packages.wazuh.com/key/GPG-KEY-WAZUH...
22/04/2025 08:36:59 INFO: The resource https://packages.wazuh.com/key/GPG-KEY-WAZUH was downloaded.
22/04/2025 08:36:59 DEBUG: Downloading https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml...
22/04/2025 08:37:00 INFO: The resource https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml was downloaded.
22/04/2025 08:37:00 DEBUG: Downloading https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json...
22/04/2025 08:37:00 INFO: The resource https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json was downloaded.
22/04/2025 08:37:00 DEBUG: Downloading https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz...
22/04/2025 08:37:00 INFO: The resource https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz was downloaded.
22/04/2025 08:37:00 INFO: The configuration files and assets are in wazuh-offline.tar.gz
22/04/2025 08:37:54 INFO: You can follow the installation guide here https://documentation.wazuh.com/current/deployment-options/offline-installation.html
Amazon Linux 2023 x86_64:

Environment:

[root@ip-172-31-46-46 ec2-user]# cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.6.20241010"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2028-03-15"
[root@ip-172-31-46-46 ec2-user]# uname -a
Linux ip-172-31-46-46.ec2.internal 6.1.112-122.189.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct  8 17:02:11 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
[root@ip-172-31-46-46 ec2-user]# sudo bash wazuh-install.sh -dw rpm -da x86_64 -d pre-release -v
22/04/2025 08:40:43 INFO: Starting Wazuh installation assistant. Wazuh version: 4.12.0
22/04/2025 08:40:43 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/04/2025 08:40:43 DEBUG: YUM package manager will be used.
22/04/2025 08:40:43 DEBUG: Installing check dependencies.
22/04/2025 08:40:43 INFO: --- Dependencies ---
22/04/2025 08:40:43 INFO: Installing curl.
22/04/2025 08:40:43 DEBUG: Checking Wazuh installation.
22/04/2025 08:40:44 INFO: Using Filebeat template from master branch.
22/04/2025 08:40:44 DEBUG: Checking system architecture.
22/04/2025 08:40:44 DEBUG: System architecture: x86_64
22/04/2025 08:40:44 INFO: Verifying that your system meets the recommended minimum hardware requirements.
22/04/2025 08:40:44 DEBUG: CPU cores detected: 4
22/04/2025 08:40:44 DEBUG: Free RAM memory detected: 7811
22/04/2025 08:40:44 INFO: --- Download Packages ---
22/04/2025 08:40:44 INFO: Starting Wazuh packages download.
22/04/2025 08:40:44 INFO: Downloading Wazuh rpm packages for x86_64.
22/04/2025 08:40:44 DEBUG: Wazuh manager package revision fetched.
22/04/2025 08:40:45 DEBUG: Filebeat package revision fetched.
22/04/2025 08:40:45 DEBUG: Wazuh indexer package revision fetched.
22/04/2025 08:40:46 DEBUG: Wazuh dashboard package revision fetched.
22/04/2025 08:40:46 DEBUG: Downloading Wazuh manager package...
22/04/2025 08:40:57 INFO: The manager package was downloaded.
22/04/2025 08:40:57 DEBUG: Downloading Wazuh filebeat package...
22/04/2025 08:40:58 INFO: The filebeat package was downloaded.
22/04/2025 08:40:58 DEBUG: Downloading Wazuh indexer package...
22/04/2025 08:41:23 INFO: The indexer package was downloaded.
22/04/2025 08:41:23 DEBUG: Downloading Wazuh dashboard package...
22/04/2025 08:41:31 INFO: The dashboard package was downloaded.
22/04/2025 08:41:31 INFO: The packages are in wazuh-offline/wazuh-packages
22/04/2025 08:41:31 INFO: Downloading configuration files and assets.
22/04/2025 08:41:31 DEBUG: Downloading https://packages.wazuh.com/key/GPG-KEY-WAZUH...
22/04/2025 08:41:31 INFO: The resource https://packages.wazuh.com/key/GPG-KEY-WAZUH was downloaded.
22/04/2025 08:41:31 DEBUG: Downloading https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml...
22/04/2025 08:41:31 INFO: The resource https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml was downloaded.
22/04/2025 08:41:31 DEBUG: Downloading https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json...
22/04/2025 08:41:31 INFO: The resource https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json was downloaded.
22/04/2025 08:41:31 DEBUG: Downloading https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz...
22/04/2025 08:41:31 INFO: The resource https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz was downloaded.
22/04/2025 08:41:31 INFO: The configuration files and assets are in wazuh-offline.tar.gz
22/04/2025 08:42:18 INFO: You can follow the installation guide here https://documentation.wazuh.com/current/deployment-options/offline-installation.html
Amazon Linux 2023 aarch64:

Environment:

[root@ip-172-31-93-251 ec2-user]# cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.6.20241010"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2028-03-15"
[root@ip-172-31-93-251 ec2-user]# uname -a
Linux ip-172-31-93-251.ec2.internal 6.1.112-122.189.amzn2023.aarch64 #1 SMP Tue Oct  8 17:01:34 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
[root@ip-172-31-93-251 ec2-user]# sudo bash wazuh-install.sh -dw rpm -da aarch64 -d pre-release -v
22/04/2025 08:46:37 INFO: Starting Wazuh installation assistant. Wazuh version: 4.12.0
22/04/2025 08:46:37 INFO: Verbose logging redirected to /var/log/wazuh-install.log
22/04/2025 08:46:37 DEBUG: YUM package manager will be used.
22/04/2025 08:46:37 DEBUG: Installing check dependencies.
22/04/2025 08:46:37 INFO: --- Dependencies ---
22/04/2025 08:46:37 INFO: Installing curl.
22/04/2025 08:46:38 DEBUG: Checking Wazuh installation.
22/04/2025 08:46:38 INFO: Using Filebeat template from master branch.
22/04/2025 08:46:38 DEBUG: Checking system architecture.
22/04/2025 08:46:38 DEBUG: System architecture: aarch64
22/04/2025 08:46:38 INFO: Verifying that your system meets the recommended minimum hardware requirements.
22/04/2025 08:46:38 DEBUG: CPU cores detected: 4
22/04/2025 08:46:38 DEBUG: Free RAM memory detected: 7768
22/04/2025 08:46:38 INFO: --- Download Packages ---
22/04/2025 08:46:38 INFO: Starting Wazuh packages download.
22/04/2025 08:46:38 INFO: Downloading Wazuh rpm packages for aarch64.
22/04/2025 08:46:39 DEBUG: Wazuh manager package revision fetched.
22/04/2025 08:46:39 DEBUG: Filebeat package revision fetched.
22/04/2025 08:46:40 DEBUG: Wazuh indexer package revision fetched.
22/04/2025 08:46:41 DEBUG: Wazuh dashboard package revision fetched.
22/04/2025 08:46:41 DEBUG: Downloading Wazuh manager package...
22/04/2025 08:46:50 INFO: The manager package was downloaded.
22/04/2025 08:46:50 DEBUG: Downloading Wazuh filebeat package...
22/04/2025 08:46:51 INFO: The filebeat package was downloaded.
22/04/2025 08:46:51 DEBUG: Downloading Wazuh indexer package...
22/04/2025 08:47:15 INFO: The indexer package was downloaded.
22/04/2025 08:47:15 DEBUG: Downloading Wazuh dashboard package...
22/04/2025 08:47:23 INFO: The dashboard package was downloaded.
22/04/2025 08:47:23 INFO: The packages are in wazuh-offline/wazuh-packages
22/04/2025 08:47:23 INFO: Downloading configuration files and assets.
22/04/2025 08:47:23 DEBUG: Downloading https://packages.wazuh.com/key/GPG-KEY-WAZUH...
22/04/2025 08:47:23 INFO: The resource https://packages.wazuh.com/key/GPG-KEY-WAZUH was downloaded.
22/04/2025 08:47:23 DEBUG: Downloading https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml...
22/04/2025 08:47:24 INFO: The resource https://packages-dev.wazuh.com/4.12/tpl/wazuh/filebeat/filebeat.yml was downloaded.
22/04/2025 08:47:24 DEBUG: Downloading https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json...
22/04/2025 08:47:24 INFO: The resource https://raw.githubusercontent.com/wazuh/wazuh/main/extensions/elasticsearch/7.x/wazuh-template.json was downloaded.
22/04/2025 08:47:24 DEBUG: Downloading https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz...
22/04/2025 08:47:24 INFO: The resource https://packages-dev.wazuh.com/pre-release/filebeat/wazuh-filebeat-0.4.tar.gz was downloaded.
22/04/2025 08:47:24 INFO: The configuration files and assets are in wazuh-offline.tar.gz
22/04/2025 08:48:18 INFO: You can follow the installation guide here https://documentation.wazuh.com/current/deployment-options/offline-installation.html

@CarlosALgit CarlosALgit requested a review from a team April 22, 2025 09:30
@CarlosALgit CarlosALgit self-assigned this Apr 22, 2025
@CarlosALgit CarlosALgit linked an issue Apr 22, 2025 that may be closed by this pull request
@c-bordon c-bordon merged commit 7cc765b into 4.12.0 Apr 22, 2025
2 of 4 checks passed
@c-bordon c-bordon deleted the bug/313-offline-download-fails-when-downloading-filebeat-package branch April 22, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offline download fails when downloading Filebeat package

5 participants