All Apps and Add-ons

DBConnect: OSError: [Errno 2] No such file or directory validate java command: /usr/java/latest/bin/java.

Branden
Builder

Hi. I'm trying to configure DBConnect on my Splunk instance (Splunk 7.2.4 on RHEL). I can't make any progress because of this error:

OSError: [Errno 2] No such file or directory validate java command: /usr/java/latest/bin/java.

That is the correct location of java. It's Oracle java version 1.8.0_231.

JAVA_HOME is set:

echo $JAVA_HOME
/usr/java/latest

The splunk user ('splunk') has full rights to access this installation of java.

-rwxr-xr-x. 1 root root 8534 Oct  5 06:15 /usr/java/latest/bin/java

As you can see, it has wide-open read/execute permissions, and I've manually verified that the splunk user can use java.

I then ran this command:

/opt/splunk//bin/splunk cmd python -c "import os; print(os.environ)"

And see that JAVA_HOME is set:

{'USER': 'splunk', 'LOGNAME': 'splunk', 'JAVA_HOME': '/usr/java/latest', .......

What am I missing here? I've seen similar posts with this question, but no good solutions.

Thank you in advance.

Ranazar
Path Finder

Yeah, reverting to 3.1.4 fixed it for me.

0 Karma

falcalde
Explorer

Ok thanks for the answer. Previous version works fine. Upvoted

0 Karma

gaurav_maniar
Builder

Hi,
In the DBConnect > Configuration > Settings > General, apart for JRE Installation Path are correct,

JVM Option - -Ddw.server.applicationConnectors[0].port=9998
Task Server Port - 9998

and they try to Save & Restart RPC service.

If still, it doesn't work, provide some more error logs.

0 Karma

arunkg
New Member

OSError: [Errno 2] No such file or directory validate java command: /usr/java/latest/bin/bin/java.

I am getting the above error even though the suggested steps has been performed.

Thanks
Arun

0 Karma

richgalloway
SplunkTrust
SplunkTrust

What do you get when you run which java? It's possible DBX doesn't like links so if /usr/java/latest is a link try setting $JAVA_HOME in DBX to the real java location.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Branden
Builder

Thank you for your response.
I thought of that, so I tried the actual path (/usr/java/jdk1.8.0_231-amd64/jre) but it still didn't work.

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk Enterprise 9.4: Tools for Digital Resilience

What’s New in Splunk Enterprise 9.4: Tools for Digital ResilienceTune in to What’s New in Splunk Enterprise ...

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...