All Apps and Add-ons

Splunk DB Connect: How to resolve error "JRE Status: OSError: [Errno 2] No such file or directory"?

svercelli
Path Finder

I've just installed Splunk on a new Linux Redhat instance, I'm not particularly familiar with Linux, but I believe everything to be working fine. The one thing that has become problematic is with Splunk DB Connect.

While setting it up, I've put in the path for Java I got with pwd just to make sure /usr/java/jdk1.8.0_102/

I've tried putting this as /usr/java/jdk1.8.0_102/jre as well, but I keep getting an error saying

JRE Status: OSError: [Errno 2] No such file or directory

Anyone know where I should start looking for the problem?

0 Karma

hardikJsheth
Motivator

Did you set up environment variable named JAVA_HOME ? If not try setting it to /usr/java/jdk1.8.0_102/

0 Karma

svercelli
Path Finder

It is, echo $JAVA_HOME reads /usr/java/jdk1.8.0_102

0 Karma

hardikJsheth
Motivator

Did you complete the setup of the DB Connect app? There also we need to define JAVA_HOME as shown in the docs
http://docs.splunk.com/Documentation/DBX/2.3.0/DeployDBX/Singleserverdeployment#Set_up_Splunk_DB_Con...

0 Karma

svercelli
Path Finder

This is what I'm doing. This error I'm getting is when i'm trying to input the JRE Installation path in the setup.

0 Karma

hardikJsheth
Motivator

In that case did you verify access rights for the JDK folder?

0 Karma

svercelli
Path Finder

Assuming Splunk would have the same privileges as root in this case then yes all permissions are there.

0 Karma

hardikJsheth
Motivator

Hope we are referring to correct jdk ..

Can you run following command and see if it points to same value as the value JAVA_HOME in DB connect app

which java

0 Karma

svercelli
Path Finder
which java

/usr/bin/java

whereis java

java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1

[root@DC2VTS01 java]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/java/jre1.8.0_101/bin/java
*+ 2           /usr/java/jdk1.8.0_102/jre/bin/java
0 Karma

jonesnadiam
Path Finder

Hi svercelli - Did you ever figure this out? I am having a similar issue.

0 Karma

svercelli
Path Finder

I did not. Ive been operating under the assumption that since splunk was installed as root, I wouldn't need to modify the rights. Like I said, I'm fairly new to Linux. Mind walking me through?

0 Karma

hardikJsheth
Motivator

I will try.

First check the owner of your splunk folder using following command:

ls -lh

Use same command to verify the ownership for JDK folder, if both are same then you don't have a problem else either update the ownership of JDK folder or grant 777 access to the JDK home using following command, if this machine is just for testing purpose.

chmod +R 777 /usr/java/jdk1.8.0_102

0 Karma

svercelli
Path Finder

The users were different, so i used chown to change the java ownership to the splunk user. checked and it shows that the ownership is now with splunk. It hasn't fixed the issue though, still getting the same error.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...