Deployment Architecture

Can the DB Connect Java_home variable use wildcards in the path?

mcronkrite
Splunk Employee
Splunk Employee

According to the documentation here http://docs.splunk.com/Documentation/DBX/1.1.5/DeployDBX/Installtheconnector
the JAVA_HOME path needs to be set, like this echo $JAVA_HOME to see the path, such as, "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre"

But having recently upgraded JAVA due to standard patching, my new path was "/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64/jre”

Is there any way to add a wildcard path in the config for the attribute home, located at $SPLUNK_HOME/etc/apps/dbx/local/java.conf?

[java]
home = JAVA_HOME path

0 Karma

bishopolis
Path Finder

To reiterate what @martin_mueller said:

  • typically NO path statement takes wildcards
  • typically you'll need a symlink to point to the correct one
  • you're on Enterprise Linux: you'll have the links managed for you when you install the proper package,
  • your JAVA_HOME is just /usr/lib/jvm/jre and it never changes

so, simply

install -m755 <(echo export JAVA_HOME=/usr/lib/jvm/jre) /etc/profile.d/javahome.sh

.. and you're done.

Extra credit: add that into the RPM you use to pull in the JRE, but remember that we don't have a yum repo yet so don't link in db-connect as a dependency if you do.

(Check out https://answers.splunk.com/answers/33933 for the trivial repo question; it shouldn't be long, now)

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

The usual way is to have a symlink that points to whatever your current java versioned directory is, and have that symlink path in the JAVA_HOME variable. When you update java you update the symlink when finished.

Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...