- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DBConnect: OSError: [Errno 2] No such file or directory validate java command: /usr/java/latest/bin/java.
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.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi , I have installed oracle JRE version 1.8 and done all the required configuration. When i go for the further configuration in Setting-> General -> JRE installation path( JAVE_HOME) and updates the path /usr/java/jre1.8.0_241-amd64/bin/ i am getting the below error.
OSError: [Errno 2] No such file or directory validate java command: /usr/java/jre1.8.0_241-amd64/bin/bin/java.
As i see in the following path /usr/java/jre1.8.0_241-amd64/bin/bin/java additional /bin/java got added automatically. Due to this i am unable to move on further steps.
Can any one help to fix the issue.
Thanks
Arun
,Hi , i have installed JRE 1.8 version and done all the required configuration. When i give JRE installation path ( JAVA_HOME) as /usr/java/jre1.8.0_241-amd64/bin/ i am getting the below error.
OSError: [Errno 2] No such file or directory validate java command: /usr/java/jre1.8.0_241-amd64/bin/bin/java.
I could see additional /bin/java added in it. Can any one help to me fix the issue ?
Thanks
Arun
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still not fixed - got the same issue.
Version 3.2.0 should provide the python compatibility for 2.x and 3.x as preparation for the 2.x support removal from Splunk Enterprise.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To "fix" it:
Use splunk_app_db_connect/bin/dbx2/jre_validator.py form version 3.1.4
OR change the code of the 3.2.0 version line 23:
if isinstance(command, basestring):
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that solves the problem I've been struggling with.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This worked for me!! I updated the script in 3.2 as you suggested.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This worked for me too.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Worked for me as well. Splunk 7.3.2 and DB connect version 3.2.0.
Changed that one line:
if isinstance(command, str):
if isinstance(command, basestring):
They need to fix this...
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Looks like this is still the case. I hope someone from dev part to see and fix.
Meantime let us know if there is some nice workaround.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

The only workaround that worked for me was using db_connect version 3.1.4
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

FWIW, my problem was caused not by the new DB connect version, but likely by using a Splunk App Repo on Windows, where executables might have lost there executable "x" right. Then no JDBC related java process was startet. When I reinstalled the DB connect App purely on Linux from scratch, installed the driver, restarted the Heavy Forwarder, then it was working, although the Configuration.General GUI still shows issues.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

First time user of DB connect here, we had the same problem on version 3.2 and reverted back to 3.1.4. The java path is now recognized (had to restart splunkd though.)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

agreed this is what it worked as well
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Yep, I'll add to that. Did not work with DBX 3.2 on Splunk 7.3.x. I had to revert back to 3.1.4, too. SH was running on RHEL.
Skalli
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Same problem, I roll back Splunk DB Connect, below the details about my environment:
- Splunk Enterprise 8
- Splunk DB Connect 3.1.3
- JAVA jdk1.8.0_181
Suppose bugs.
Regards,
Antonio
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this ended up being a red herring. Even though the error was appearing, I clicked through and things still worked as expected. Strange... So it looks like the error was a false positive.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of DB Connect are you using?
I had the exact same issue today after I updated to the latest version.
I rolled back to version 3.1.4 and everything worked perfectly again.
I suspect there is an issue with DB Connect version 3.2.0.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, I suspect it's the new DB Connect version. When I upgraded it, I got errors. I had 3.2 on SplEnt 8.0. When I rolled back everything is working again.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any luck on this? Encountering the same issue.
Error shows:
Cannot communicate with task server, please check your settings.
OSError: [Errno 2] No such file or directory validate java command: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/bin/java
I changed the server port from default 9998 to 9995 and hit save but it doesn't seem to be making the changes.
JRE Installation Path(JAVA_HOME)
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre
JVM Options
-Ddw.server.applicationConnectors[0].port=9995
Task Server Port
9995
Splunk DB Connect Version: 3.2.0
Splunk Enterprise Version: 8.0
Running alternatives --config java
Java installed shows -
java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/bin/java)
java -version
shows
openjdk version "1.8.0_232"
`
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Have you managed to solve this problem? I have SplEnt 8.0.1 and db_connect 3.2.0, and exactly same problem.
- Folder permissions Ok
- Path OK
- JAVA_HOME OK
- OpenJDK 8 (splunk db connect says it is supported)
I am lost.
TY.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I created a ticket with splunk support and they logged it as a defect with the latest version of DB connect. So a future release should resolve it. You can always revert to the previous version until then.
