Splunk Search

did something change in 4.3.3 or recently around setup.xml?

sideview
SplunkTrust
SplunkTrust

I haven't tested the setup.xml workflows in my apps in a while but for some reason they all seem to be broken now, even with configurations that I know used to work.

I also tried the example from the docs page but I couldn't get that one to work anymore either.
http://docs.splunk.com/Documentation/Splunk/latest/Developer/SetupXML

Long story short: in some of them I get the error 500 KeyError: Elements, that at least some people have run into in april/may/june of this year.

http://splunk-base.splunk.com/apps/22296/real-time-license-usage

In other configurations the setup buttons/links redirect to a URL that returns 404.

In yet other configurations the setup screen loads fine for a few seconds, then redirects to a page that says I don't have permissions to access this configuration.

Before I investigate further, does anyone know of any recent changes around setup.xml? There also doesn't seem to be any way to debug this problem, or at least I don't see anything informative in the web_service.log...

thanks in advance.

UPDATE: I figured out the redirect-to-permissions-error message issue; that was an issue in my own code. The other more serious problems - the "KeyError: elements", and the setup links being broken, I'm a little mystified still. My response right now, unless someone has an answer reassuring me that all this stuff didn't just break, is that I'm going to have to remove setup.xml from all of my apps, which is a pain.

Tags (1)

sideview
SplunkTrust
SplunkTrust

One answer I've discovered for "KeyError: elements", is that if you're using a custom REST handler in your setup.xml, and there's an exception thrown in that REST handler, you'll get a "KeyError:elements" thrown from deep within the admin.py python. I think what happened is some custom rest handler code in 4.2.X and earlier worked fine but as of some release it threw an exception and instead of seeing the nice exception you get KeyError:Elements.

If anyone else is debugging setup.xml, be aware that you have to look for errors in splunkd.log, also in stdout.log apparently, and depending on what you're debugging, possibly also in splunk_web_service.log.

phoenixdigital
Builder

Thanks for this Nick. I was trying to debug add some code to a REST handler and had no clue what was going wrong until I started to look at splunkd.log

0 Karma

sideview
SplunkTrust
SplunkTrust

D'oh. Thanks Drainy.

0 Karma

Drainy
Champion

I have had a whole world of problems with setup.xml since.. 4.2.5 I think? Everything feels a little delicate if I make any changes sometimes with wonderful KeyError elements errors thrown up. I've also found that different links sometimes throw errors while others don't (Between the setup link in manage apps, setup app button from the launcher app or from setup this app now when you install a new app)

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...