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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...