ChrisYounger / git_for_splunk

Simple versioning for your Splunk environment
https://splunkbase.splunk.com/app/4182
Apache License 2.0
36 stars 10 forks source link

Unable to initialize modular input #9

Open Shtark opened 3 years ago

Shtark commented 3 years ago

Hi Chris, I've installed this on my Windows laptop to test it out but after restarting Splunk I get a 500 server error. I've tried installing via the UI as well as directly copying the app into /etc/apps, same everytime. The only thing I can see jumping out in the logs is

ERROR ModularInputs - Unable to initialize modular input "gitforsplunk" defined in the app "git_for_splunk": Introspecting scheme=gitforsplunk: Unable to run ""C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\git_for_splunk\bin\gitforsplunk.py" --scheme": child failed to start: The parameter is incorrect..

Any ideas? I've had the issue on both Splunk 8.0.7 & 8.1

Cheers, Adrian.

ChrisYounger commented 3 years ago

Hmm I can't think of anything obvious as to why this would be failing like this. My first thought is that it is a system-wide python issue. Are you having trouble with any other apps, such as apps that have been created with the "Splunk Addon builder"? Does my "Config Explorer" https://splunkbase.splunk.com/app/4353/ app install and work properly? I will try a fresh install myself on 8.1 but any extra information you can provide would be helpful.

Shtark commented 3 years ago

Hi Chris, thanks for the quick response. Config Explorer & DB Connect (https://splunkbase.splunk.com/app/2686/) both worked fine but Webtools (https://splunkbase.splunk.com/app/4146/) caused a similar issue and logged the same error for 2 of its modular inputs.

ChrisYounger commented 3 years ago

Hi Shtark, have you had any luck getting this to work? Can you try to run this command manually:

C:\Program Files\Splunk>bin\splunk.exe cmd python "C:\Program Files\Splunk\etc\apps\git_for_splunk\bin\gitforsplunk.py" --scheme

Shtark commented 3 years ago

Hi Chris, no luck. Did anything jump out to you based on the other apps that do and don't work?

I ran both "C:\Program Files\Splunk\bin\splunk.exe" cmd python "C:\Program Files\Splunk\etc\apps\git_for_splunk\bin\gitforsplunk.py" --scheme & "C:\Program Files\Splunk\bin\splunk.exe" cmd "C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\git_for_splunk\bin\gitforsplunk.py" --scheme and they both completed without throwing any errors.

ChrisYounger commented 3 years ago

Sorry I am really out of ideas. The only idea i have is that its related to system permissions on Windows. Have you done anything out of the ordinary to change the user that runs the splunk service? Have you set all the folder permissions correctly? I dont normally use splunk on windows but I know this can be a headache.

The error "The parameter is incorrect" seems to be what windows is reporting, and some googling is leading me to think its permission related issues.