Deployment Architecture

How to add a new search head to an existing SHC?

ram254481493
Explorer

Hello , we are planning to add a new search head to our existing search head cluster.
What are the steps I need to follow to properly to add a new member to our existing search head cluster?
We are pushing configs through deployer, so what is a command that I can use to update the new member with existing deployer and other search head settings?

0 Karma

amitm05
Builder

You need to initialize and then Add this instance to the cluster. This can be done by running the following commands on your new instance

To initialize, run the below command and restart-

splunk init shcluster-config -auth <username>:<password> -mgmt_uri <URI>:<management_port> -replication_port <replication_port> -replication_factor <n> -conf_deploy_fetch_url <URL>:<management_port> -secret <security_key> -shcluster_label <label>  
splunk restart 

To Add instance to Cluster, run this command -

splunk add shcluster-member -current_member_uri <URI>:<management_port>

Let me know if this helps

harsmarvania57
Ultra Champion

ram254481493
Explorer

Thanks i found the commands to update the configs here for SHC settings but didnt find the resync command to update the deployer configs .

0 Karma

harsmarvania57
Ultra Champion

You do not require to resync, when you add new SH to SHC it will automatically get configuration bundle from Deployer and then it will contact Captain & download replicated config tarball.

rafiq_rehman
Explorer

I followed these steps to add new box to existing SHC, everything looks fine on the SHC side but kvstore status has been 'status : starting' since, and it's been over an hour. Is this normal or I missed something?

0 Karma

isoutamo
SplunkTrust
SplunkTrust
No it’s not normal. Usually it should be ready quite quickly. Anything in your internal logs?
0 Karma

rafiq_rehman
Explorer

See these events in splunkd:

05-22-2025 21:07:58.608 -0400 ERROR KVStoreAdminHandler [1848035 TcpChannelThread] - An error occurred.
05-22-2025 21:07:36.668 -0400 ERROR KVStoreIntrospection [1848033 TcpChannelThread] - failed to get introspection data
05-22-2025 21:07:19.587 -0400 WARN KVStoreConfigurationProvider [1845927 MainThread] - Action scheduled, but event loop is not ready yet

Tried cleaning up kvstore by running "splunk clean kvstore --local --answer-yes" but that didn't change anything, status is still stuck in starting.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Anything on mongodb.log?
Normally you shouldn’t do any “fixing” activities before you know what and why it’s broken! Those fix could get the situation even worse!
0 Karma

rafiq_rehman
Explorer

My bad 🙂

I removed Splunk and just rebuilt it fresh. Still same issue, kvstore has been in starting status. This is what I see in mongod.log:

2025-05-29T03:22:15.751Z I  CONTROL  [LogicalSessionCacheReap] Failed to reap transaction table: NotYetInitialized: Replication has not yet been configured
 2025-05-29T03:22:15.747Z I  CONTROL  [LogicalSessionCacheRefresh] Sessions collection is not set up; waiting until next sessions refresh interval: Replication has not yet been configured

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Are you sure you're adding the same Splunk version and kvstore version (and engine) instance as the rest of the SHC?

0 Karma

isoutamo
SplunkTrust
SplunkTrust

You are adding it as a new member like @Prewin27 shows?

And you are using correct and same format for host names than you are used for those other nodes like FQDN, short names or IPs?

0 Karma

Prewin27
Communicator

@rafiq_rehman 
Most probably no captain or kvstore port blocked on this new member.

the KVStore cannot reach "Ready" unless a captain is elected and cluster coordination is healthy. If there’s no captain or communication is broken, KVStore remains in "starting"

or kvstore default port 8191 might be blocked. If this port is blocked/network issues, KVStore cannot synchronize and will not start


Regards,
Prewin 
Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a kudos. Thanks!

0 Karma

rafiq_rehman
Explorer

It's the existing SHC, just trying to add new member. Captain is working and 8191 port is also opened. This is what I see in mongod log:

2025-05-29T03:22:15.751Z I  CONTROL  [LogicalSessionCacheReap] Failed to reap transaction table: NotYetInitialized: Replication has not yet been configured
 2025-05-29T03:22:15.747Z I  CONTROL  [LogicalSessionCacheRefresh] Sessions collection is not set up; waiting until next sessions refresh interval: Replication has not yet been configured
0 Karma

Prewin27
Communicator

@rafiq_rehman 
These errors mean the new member’s KV Store is still in standalone mode.


Initialize SHC Config on the New Member


splunk init shcluster-config \
-auth <admin_user>:<admin_pass> \
-mgmt_uri https://<new_member_host>:8089 \
-replication_port <replication_port> \
-replication_factor <factor> \
-conf_deploy_fetch_url https://<deployer_host>:8089 \
-secret <pass4SymmKey> \
-shcluster_label <label>

Add the New Member to the Cluster
splunk add shcluster-member -current_member_uri https://<existing_member_or_captain>:8089

Confirm pass4SymmKey and mgmt_uri in $SPLUNK_HOME/etc/system/local/server.conf

0 Karma
Get Updates on the Splunk Community!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...