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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...