After deploying an customized app to all the clustered search head members via Deployer using the below command and the app got successfully deployed but I am getting the following message in the forwarder management console,
Search peer searchhead1.xxx.com has the following message: Failed to synchronize configuration with KVStore cluster. replSetReconfig should only be run on PRIMARY, but my state is SECONDARY; use the "force" argument to override
By executing the show cluster status we could see that searchhead2 is assigned as captain.
/opt/splunk/bin/splunk show shcluster-status -auth admin:xxxx