Users may find that the patch upgrade is failing with the " Patch pretest 'Validate deployment hostnames' failed. (validate_hostname.sh) " error on Juniper Secure Analytics (JSA).
Patch pretest 'Validate deployment hostnames' failed. (validate_hostname.sh)
This article explains that the upgrade may fail when the FQDN for the console or the managed hosts is incorrect and lists the steps to be performed to correct the FQDN.
The patch upgrade for JSA fails with the following error. The error message is seen under /var/log/setup-xxxx-xx.xxxx/patches.log :
/var/log/setup-xxxx-xx.xxxx/patches.log
[INFO](testmode) Running pretest 7/11: Validate deployment hostnames ERROR: The hostnames in the deployment failed validation. - Failed to validate full hostname for jsa-ec01: 'Hostname is not fully qualified (no domain).' ERROR: The hosts with the invalid hostname must be renamed using the qchange_netsetup command before patching. [ERROR](testmode) Patch pretest 'Validate deployment hostnames' failed. (validate_hostname.sh) [INFO](testmode) Running pretest 8/11: Check for QIF appliances in deployment
This issue is caused when one of the managed hosts in the deployment is without a proper FQDN in the /etc/hostname file.
/etc/hostname
You can check the FQDN in the managed hosts by running the following command:
cat /etc/hostname
On larger deployments, you can use the all_server.sh command to find the hostname for the entire deployment.
all_server.sh
/opt/qradar/support/all_servers.sh -Ck "echo '-> hostname -f'; hostname -f; echo '-> /etc/hostname'; cat /etc/hostname; echo '-> hostnamectl'; hostnamectl | grep hostname" 10.11.12.2 -> jsa-console01.test.local Appliance Type: 3199 Product Version: 2019.14.5.20200929154613 20:50:34 up 10:43, 1 user, load average: 1.56, 1.36, 1.41 ------------------------------------------------------------------------ -> hostname -f jsa-console01.test.local -> /etc/hostname jsa-console01.test.local -> hostnamectl Static hostname: jsa-console01.test.local 10.11.12.3 -> jsa-ep01.test.local Appliance Type: 1699 Product Version: 2019.14.5.20200929154613 20:50:34 up 13:38, 0 users, load average: 0.54, 0.60, 0.79 ------------------------------------------------------------------------ -> hostname -f jsa-ep01.test.local -> /etc/hostname jsa-ep01.test.local -> hostnamectl Static hostname: jsa-ep01.test.local 10.11.12.4 -> jsa-ec01 Appliance Type: 1599 Product Version: 2019.14.5.20200929154613 20:50:34 up 13:29, 0 users, load average: 0.28, 0.53, 0.61 ------------------------------------------------------------------------ -> hostname -f jsa-ec01 -> /etc/hostname jsa-ec01 -> hostnamectl Static hostname: jsa-ec01
To correct this issue, the administrator needs to set the FQDN in the affected managed host.
Note: The instructions in this article are meant to address only the patch pre-check on managed hosts. These instructions do not apply when the console or the app host is the one without an FQDN.
To perform any network-related tasks such as changing hostname, IP address, or subnet, the administrator must use the qchange_netsetup utility.
qchange_netsetup
Press Enter until the patch screen session is closed.
SSH into the managed host that is without the FQDN.
ssh <managed_host_ip>
Run the following command to set the FQDN.
hostnamectl set-hostname <fqdn>
Example: hostnamectl set-hostname jsa-ec01.test.local
Example:
hostnamectl set-hostname jsa-ec01.test.local
Verify that the FQDN is set properly by running the following commands:
hostname -f jsa-ec01.test.local cat /etc/hostname jsa-ec01.test.local
Run the installer again on the console:
/media/updates/installer
The patch should now update successfully. If the patch upgrade fails even now, contact Support .