Splunk Search

Not able to add forward-server on splunk universal forwarder

porasm1998
New Member

This is what happening, 

/opt/splunkforwarder/bin # ./splunk add forward-server <splunk-server-ip>:9997

it asks for credentials after that it says "Can't create directory "/opt/splunk/.splunk ": No such file or directory

 

How to fix this ? Please help.

Labels (1)
Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @porasm1998,

what is the user you're using to run this command?

anyway, you can reach the same result modifying the outputs.conf file in $SPLUNK_HOME/etc/system/local:

[tcpout]
defaultGroup = default-autolb-group

[tcpout-server://XX.XX.XX.XXX:9997]
[tcpout-server://YY.YY.YY.YYY:9997]

[tcpout:default-autolb-group]
server = XX.XX.XX.XXX:9997,YY.YY.YY.YYY:9997
disabled=false

Or (better) creating a dedicated App (called e.g. (TA_Forwarders) containing this file.

Ciao.

Giuseppe

0 Karma

porasm1998
New Member

Hi @gcusello , Thanks for your response. I am using the root user. I've gone through $SPLUNK_HOME/etc/system/local: but in the local there only 2 files are showing up: 
1. server.conf.  2. README

There's no output.conf file here.

Thanks,
Poras

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @porasm1998,

it's normal, you have to create it, giving the same rights or the other conf files.

Then you have to restart Splunk on that machine.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...