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.
Yeah, reverting to 3.1.4 fixed it for me.
Ok thanks for the answer. Previous version works fine. Upvoted
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.
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
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.
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.