Description

An error is reflected while attempting to add a secondary JSA node to work as high availability from Admin>System and License management tab:"[ERROR] Failed to start repartitioning on the replica host", this is triggered because the high availability was not properly formed and needs to be paired again. 

Symptoms

  • The error message "[ERROR] Failed to start repartitioning on the replica host" is visible in the JSA UI when attempting to add the JSA node.

 

  • You can find these errors in the /var/log/qradar-ha.log file from the JSA command line.

[ERROR] Failed to start repartitioning on the replica host

Oct 08 08:23:25: [] [RUN] [OUT]

Oct 08 08:23:28: [] No process is holding /store

Oct 08 08:23:28: [] /store is free from all processes

'/etc/fstab' -> '/etc/fstab.ha.backup'

ERROR: Failed to repair /dev/mapper/storerhel-store with return code: 1

Oct 08 14:24:27: [HA Setup (S-M----)] [ERROR] Failed to start repartitioning on the replica host

Solution

Important notes before running the solution: 

  1.  These changes can impact your JSA server fuctionality, if you have any concerns our doubts about the process, please contact JTAC support before running the steps.
  2. If you decide to run the steps on your own:
    1. You will need to have a  Backup JSA Configurations and Data, [JSA/STRM] Backup and Restore process and VM snapshots. 
    2. Please make sure that you are running the steps in the requested JSA node. 
    3. Run a session.logger in case of any problem, JTAC can help in determining why the procedure didn't work.

 

Solution: 

Primary JSA node:

1. The first step is to unpair the primary data node and secondary:

/opt/qradar/ha/bin/ha_setup.sh --uninstall is_primary=yes

2. We need to check if the primary and secondary JSA nodes have the same partitioning in /store/transient:

df -h
lsblk
3. If they are not equal you must re-partition the secondary node, so we need to capture the logical volume sizes of the store and transient partitions.
lvdisplay --units m /dev/mapper/storerhel-store
lvdisplay --units m /dev/mapper/storerhel-transient

Secondary JSA node:

 

[Option A]:

1. To get the primary-data-node-IP, we need to execute the below command in the primary data node:

ifconfig

2. To unpair the secondary data node and primary when the high availability was not properly formed, we need to run this command:

/opt/qradar/bin/ha_setup.sh --uninstall remote_ip=primary-data-node-IP is_primary=no
3. On Secondary, we need to delete all .ha_part_setup files:
rm -f /tmp/.ha_part_setup*
4 Unmount the store and transient partitions follow the steps below:
umount -v /store
umount -v /transient
lvremove /dev/mapper/storerhel-store
lvremove /dev/mapper/storerhel-transient
5. Create the logical volumes again for store and transient partitions in the secondary JSA node using the same size reflected in output #3 of the [Primary JSA node step 3].
lvcreate -L LV Size from primary m -n store storerhel
lvcreate -L LV Size from primary m -n transient storerhel
6. For reattempting the discovery the below scripts need to be run first:
rm -f /etc/.prepare_ha_done; /opt/qradar/setup/bin/prepare_ha.sh

[Option B]:

1.  If the steps haven't worked so far we need to run the below commands:
umount -v /store; mkfs.xfs -f /dev/mapper/storerhel-store
umount -v /transient; mkfs.xfs -f /dev/mapper/storerhel-transient
grep -qF "/dev/mapper/storerhel-transient" /etc/fstab || sed -i '/rootrhel-store/a /dev/mapper/storerhel-transient /transient\txfs\tinode64,logbsize=256k,noatime,nobarrier 0 0' /etc/fstab
2. Mount the store and transient partitions:
echo /dev/mapper/storerhel-transient /transient xfs inode64,logbsize=256k,noatime,nobarrier 1 2 >> /etc/fstab
echo /dev/mapper/storerhel-transient /transient xfs inode64,logbsize=256k,noatime 1 >> /etc/fstab
echo /dev/mapper/storerhel-store /store xfs inode64,logbsize=256k,noatime,nobarrier 1 2 >> /etc/fstab
echo /dev/mapper/storerhel-store /store xfs inode64,logbsize=256k,noatime 1 >> /etc/fstab
mount -av
3. For reattempting the discovery the below scripts need to be run first:
rm -f /etc/.prepare_ha_done; /opt/qradar/setup/bin/prepare_ha.sh

Console:

Note: There is a possibility that you may need to clear the Tomcat service cache in the JSA console CLI:

1. First, we need to follow this article on how to clear the Tomcat service cache.

2. We need to restart the hostcontext service in the console:

systemctl restart hostcontext

Final step: 

At this point, we can follow these instructions to create the HA cluster again. If the problem hasn't been resolved, please contact Juniper Support for further assistance.

Modification History

2024-10-16 : Article Created