All Apps and Add-ons

Splunk DB Connect - KeyError 'Elements' on setup

ezempel
Path Finder

I just installed a new copy of splunk and immediately installed the DB Connect app after initial setup. I am getting an Error 500: KeyError 'Elements' when I try to go through the setup the first time.

1 Solution

ezempel
Path Finder

Java Runtime Environment was not installed. Turns out it is not installed by default on OSX 10.8. To install, run the following command:

Java -version

This will result in a prompt to install Java.

I found this by combing the internal splunk log:

04-23-2013 16:40:53.648 -0400 ERROR AdminManager - Stack trace from python handler:\nTraceback (most recent call last):\n  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/admin.py", line 70, in init\n    hand.execute(info)\n  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/admin.py", line 488, in execute\n    if self.requestedAction == ACTION_LIST:     self.handleList(confInfo)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/config.py", line 289, in handleList\n    self.process_list(output)\n  File "/Applications/Splunk/etc/apps/dbx/bin/rest_handler_dbx_setup.py", line 32, in process_list\n    output['java']['home'] = spp.java.autodetect_java_home()\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 185, in autodetect_java_home\n    return autodetect_java_home_osx()\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 197, in autodetect_java_home_osx\n    v = get_java_version(path)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 172, in get_java_version\n    return JavaEnv(java_home=java_home).get_version(overrideOpts = overrideOpts)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 59, in __init__\n    raise JavaVersionException("JAVA_HOME directory %s does not exist" % JAVA_HOME)\nJavaVersionException: JAVA_HOME directory /System/Library/Frameworks/JavaVM.framework/Home does not exist\n

View solution in original post

ezempel
Path Finder

Java Runtime Environment was not installed. Turns out it is not installed by default on OSX 10.8. To install, run the following command:

Java -version

This will result in a prompt to install Java.

I found this by combing the internal splunk log:

04-23-2013 16:40:53.648 -0400 ERROR AdminManager - Stack trace from python handler:\nTraceback (most recent call last):\n  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/admin.py", line 70, in init\n    hand.execute(info)\n  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/admin.py", line 488, in execute\n    if self.requestedAction == ACTION_LIST:     self.handleList(confInfo)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/config.py", line 289, in handleList\n    self.process_list(output)\n  File "/Applications/Splunk/etc/apps/dbx/bin/rest_handler_dbx_setup.py", line 32, in process_list\n    output['java']['home'] = spp.java.autodetect_java_home()\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 185, in autodetect_java_home\n    return autodetect_java_home_osx()\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 197, in autodetect_java_home_osx\n    v = get_java_version(path)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 172, in get_java_version\n    return JavaEnv(java_home=java_home).get_version(overrideOpts = overrideOpts)\n  File "/Applications/Splunk/etc/apps/dbx/bin/spp/java/__init__.py", line 59, in __init__\n    raise JavaVersionException("JAVA_HOME directory %s does not exist" % JAVA_HOME)\nJavaVersionException: JAVA_HOME directory /System/Library/Frameworks/JavaVM.framework/Home does not exist\n

splunkIT
Splunk Employee
Splunk Employee

When specifying java home, make sure path does not include bin directory.

Incorrect java home path:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/bin

Correct java home path:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/

chrisboy68
Contributor

I'm struggling figuring this out on Yosemite. I did the below, but it does not work. Any ideas?

[java]
home = /usr/bin/java

Thank you,

Chris

0 Karma

chrisboy68
Contributor

Figured it out for anyone else out there:

Here is the path that worked for me in Yosemite.

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

Thanks

Chris

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!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...