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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...