Splunk Search

Adding search-server / CLI

kevinsikora
Explorer

I'm trying to add search servers to my search head. I'm using the following command:

./splunk add search-server -host 10.160.26.135:8089 -auth y:xxx -remoteUsername y -remotePassword xxx

I get the following error message after entering that command:

An error occurred:

Error while sending public key to search peer https://10.160.26.135:8089: Connect timed out.

I verified the following:

1) Splunk is running on both the local and remote machines.

2) The user ID's and passwords are correct.

3) I am able to ssh into the remote machine without a problem.

4) The password for both the local and remote machines are not changeme.

5) I am running the command on the local machine that I expect to the be search head.

6) Within the local server.conf, I have set the following under [general]: allowRemoteLogin=always

Has anyone encounterd this error before? Any ideas what might be causing this?

1 Solution

jbsplunk
Splunk Employee
Splunk Employee

It sounds like the problem is network related, most likely the connection to 8089 is failing. My guess is that if you try to telnet to 8089 on the indexer from your search head, you'll fail to connect. Maybe you've got an IPS/IDS/FW blocking or otherwise interfering with the conversation? In this case, I think TCPDUMP would be your friend.

View solution in original post

jbsplunk
Splunk Employee
Splunk Employee

It sounds like the problem is network related, most likely the connection to 8089 is failing. My guess is that if you try to telnet to 8089 on the indexer from your search head, you'll fail to connect. Maybe you've got an IPS/IDS/FW blocking or otherwise interfering with the conversation? In this case, I think TCPDUMP would be your friend.

kevinsikora
Explorer

Thanks for the replies. It turned out to be my firewall. I opened up the ports and everything is working. Thanks again.

0 Karma

kristian_kolb
Ultra Champion

Could there be a firewall issue? Have you tried tcpdump or netstat on the receiving end to see if the packets get through?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...