aholzel / TA-dmarc

Splunk app for the processing and ingestion of DMARC RUA reports
4 stars 2 forks source link

Not Compatible with Splunk 8.1 #6

Closed miljw002 closed 3 years ago

miljw002 commented 3 years ago

Hi,

I've recently upgraded to Splunk 8.1 and since then this is no longer working. If I try and enter the config / setup screen it just hangs.

I've tried removing it and installing from scratch, but get an Internal Server Error 500.

If I look at the splunkd.log I see the following:

11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': The script at path=/opt/splunk/etc/apps/TA-dmarc/bin/setup_handler.py has thrown an exception=Traceback (most recent call last): 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "/opt/splunk/bin/runScript.py", line 82, in 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': exec(open(REAL_SCRIPT_NAME).read()) 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "", line 42, in 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "/opt/splunk/etc/apps/TA-dmarc/bin/splunklib/client.py", line 562 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': except Exception, e: 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': ^ 11-29-2020 04:32:20.274 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': SyntaxError: invalid syntax 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': Traceback (most recent call last): 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "/opt/splunk/bin/runScript.py", line 82, in 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': exec(open(REAL_SCRIPT_NAME).read()) 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "", line 42, in 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': File "/opt/splunk/etc/apps/TA-dmarc/bin/splunklib/client.py", line 562 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': except Exception, e: 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': ^ 11-29-2020 04:32:20.275 +1030 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python3.7 /opt/splunk/bin/runScript.py setup': SyntaxError: invalid syntax 11-29-2020 04:32:20.290 +1030 ERROR AdminManagerExternal - External handler failed with code '1' and output: ''. See splunkd.log for stderr output. 11-29-2020 04:32:20.292 +1030 ERROR SetupAdminHandler - Error while fetching url=/servicesNS/nobody/TA-dmarc/ta-dmarc/ta-dmarc_configure/main/?_strict=true;search=%20eai%3Aacl.app%3D%22%22%20OR%20eai%3Aacl.app%3D%22TA-dmarc%22

miljw002 commented 3 years ago

Okay, I’ve started to try and fix this myself. So far I’ve run 2to3 over the code, and fixed some of the tabbing in the mail_client.py. Not fully working yet, but closer.

aholzel commented 3 years ago

@miljw002 sorry for the late response....

I have created a new version that is python3, I have tested it on Splunk 8.1.1 and everything is working please check it out to see if it is working for you.

miljw002 commented 3 years ago

Hi,

No need for any apologies. I realise this is a community, and you have done this out of goodwill and sharing. I just appreciate your efforts, as I was very happy when I found this.

I ended up using a workaround of forcing Splunk to run with Python 2 as I couldn't get everything working myself.

I've now updated the app with your updates and switched Splunk back to 3.7. All looks to be working as expected.

Thanks again.

James