Cortex XSOAR: Hosts cannot form the HA group
3405
Created On 10/13/23 09:21 AM - Last Modified 09/17/24 03:10 AM
Symptom
- Host is not showing up in the host group inside the host settings in the UI
- The following messages are seen in the /var/log/demisto/server.log of the failing host:
Request failed in 1 out of 5 [error 'Failed to get license from main, got response status code 401
....
Failed getting license from main account [error 'Failed to get license from main, got response status code 401
.....
Failed to register host in main [error 'Failed to register host, got response status code 401 with error json: Unmarshal(non-pointer services.ErrorServices) (8924)']
.....
Host registration request failed, got response status code 401Environment
- Cortex XSOAR
- Supported XSOAR Versions
- High Availability(HA) deployments
Cause
- Newly built host have wrong or missing values of the API keys
- Obtain the API Keys from the main account and add them to one of the hosts in the otc.conf.json file
Resolution
- Go to Settings >About >Troubleshooting >Server Configuration on one of the hosts.
- Set “Host.HAGroups.GroupMasterAPIKeyOverrideEnabled” to true.
Note: If the User interface is not accessible, the modify the value under "/etc/demisto.conf ".
- Stop demisto service for each host on that host group systemctl stop demisto.
- Obtain the host group ID.
- Open up the developer's tool for the browser.
- Jump to the host group page and check the contents of the ha-groups response for the correct host group ID.
- Download the config using URL https://<Master-URL>/host/config/Host-Group-ID
- From the downloaded file, take the masterAPIKey, etAPIKey and master values.
- Then prepare and validate the JSON file as below.
{"masterAPIKey":"REPLACE_HERE_DATA_FROM_HOST_CONFIG_FILE","host":{"etAPIKey":"REPLACE_HERE_DATA_HOST_CONFIG_FILE","master":"REPLACE_HERE_DATA_HOST_CONFIG_FILE"}} - Save the JSON as otc.conf.json in /var/lib/demisto on the host where the host configuration was altered.
- Give ownership of the file to the demisto user chown demisto:demisto otc.conf.json
- Start the host with the OTC file and modified config.
- Check if the host will show up in the HA group in the UI.
- Check if the log mentions the removal of the OTC file.
- Check if license errors are missing.
- Set “Host.HAGroups.GroupMasterAPIKeyOverrideEnabled” to false
- Start other hosts located in the HA group and validate if they show up in the UI
Additional Information
High Availability Overview