All Apps and Add-ons

error message: script exited with code 1

slea_splunk
Splunk Employee
Splunk Employee

Splunk is producing error message "script exited with code 1" for the following scripts: rlog.sh, time.sh, and lsog.sh

Tags (1)
0 Karma
1 Solution

slea_splunk
Splunk Employee
Splunk Employee

The user who had this question actually solved the issue already, so I'm posting the answer here on his behalf. Here is what he said:

Those scripts are all from the *nix add-on, and are enabled by default (and should be anyway). The scripts were running locally on our Splunk linux machines as the Splunk service account (which is should be). But, the Splunk service account needed some additional permissions and configurations then what we had set up originally, which is why I was seeing those problems.

I encountered these errors on the same scripts (and some other ones) on his other Splunk servers, and figured out how to fix them. Here is what I did:

rlog.sh — the splunk service account needs read and execute permissions on the directory /var/log/audit and read permissions on the file /var/log/audit/audit.log

time.sh and lsog.sh — the splunk service account needs the following additions to the its PATH variable: /sbin:/usr/sbin:/usr/local/sbin

So, I made the noted changes and those scripts are no longer throwing any errors.

View solution in original post

slea_splunk
Splunk Employee
Splunk Employee

The user who had this question actually solved the issue already, so I'm posting the answer here on his behalf. Here is what he said:

Those scripts are all from the *nix add-on, and are enabled by default (and should be anyway). The scripts were running locally on our Splunk linux machines as the Splunk service account (which is should be). But, the Splunk service account needed some additional permissions and configurations then what we had set up originally, which is why I was seeing those problems.

I encountered these errors on the same scripts (and some other ones) on his other Splunk servers, and figured out how to fix them. Here is what I did:

rlog.sh — the splunk service account needs read and execute permissions on the directory /var/log/audit and read permissions on the file /var/log/audit/audit.log

time.sh and lsog.sh — the splunk service account needs the following additions to the its PATH variable: /sbin:/usr/sbin:/usr/local/sbin

So, I made the noted changes and those scripts are no longer throwing any errors.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...