All Apps and Add-ons

How to resolve Unable to initialize modular input "server" defined inside the app "splunk_app_db_connect"

teddyidc1101
Communicator

I installed splunk db following the docs available in my local instance and getting message:

Unable to initialize modular input "server" defined inside the app "splunk_app_db_connect": Introspecting scheme=server: script running failed (exited with code -1073740940).

upon accessing the app

Can not communicate with task server, please check your settings.
and
Unable to establish a secure connection to DBX Server, please make sure it is started and listening on 9998 port or consult documentation for details.

Need help correcting this to be able to use the app. Thanks!

Labels (1)
1 Solution

mkocak
Explorer

Figured it out, the default 3.02 app install points DB Connect to a JRE Path it should be pointed to the JDK Path !

You need to specify the JDK Install path rather than keeping the default string value that points to JRE Path

Configuration / Settings / General under JRE Installation path remove what's there and add the path for JDK instead, then restart the SPLUNKD service

View solution in original post

dhirendra761
Contributor

It is due to JAVA_HOME env variable. Set the correct value by mapping with JRE location in C drive.

and just restart the splunkd.

0 Karma

kamaljagga
Path Finder

I installed first jre & then jdk and updated the JAVA_HOME variable with the values along with splunkd restart. None of them worked.

Somehow, dbconnect is not loading the drivers. Also, I am getting "The modular input to start the Java Server failed to be registered to Splunk" error during health check in Monitoring Console.

0 Karma

dhirendra761
Contributor

It is due to JAVA_HOME env variable. Set the correct value by mapping with JRE location in C drive.

and just restart the splunkd.

Tags (1)
0 Karma

alexsayegh
Explorer

I know this doesn't explain the error and why it is happening, but I got this solved by purging OpenJDK and replacing it with Oracle's JDK8.

https://askubuntu.com/questions/84483/how-to-completely-uninstall-java

Then you just install the JDK:

sudo add-apt-repository ppa:webupd8team/java -y &&
sudo apt-get update &&
sudo apt-get install oracle-java8-installer &&
java -version

You can also set the JAVA_HOME (check the correct path for you):

#cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
0 Karma

rafamss
Contributor

Hi @teddyidc1101,

I've passed for the same problem and I resolved this issue enabling the port (9998 or any that you want) in the firewall in my CentOS 7.

firewall-cmd --zone=public --add-port=9998/tcp --permanent

I hope help you.

[ ]s
Rafael Martins

0 Karma

mkocak
Explorer

Figured it out, the default 3.02 app install points DB Connect to a JRE Path it should be pointed to the JDK Path !

You need to specify the JDK Install path rather than keeping the default string value that points to JRE Path

Configuration / Settings / General under JRE Installation path remove what's there and add the path for JDK instead, then restart the SPLUNKD service

dm1
Contributor

what if I installed just JRE and not JDK ?

0 Karma

mpechnerle
Engager

For the noob like me. Configuration / Settings / General is accessed by launching the Splunk DB Connect application. Took a few minutes to figure this out.
I just installed 7.1.6, it found it automagically. OH, be careful. This specific version did not accept AWS Corretto. Had to use openjdk.

0 Karma

mkocak
Explorer

You need to specify the JDK Install path rather than keeping the default string value that points to JRE Path

Configuration / Settings / General under JRE Installation path remove what's there and add the path for JDK instead, then restart the SPLUNKD service

0 Karma

bmas10
Explorer

FYI JRE is the standard Java Runtime Envieonment. JDK is for development and not standard for running java applets. Glad it is working now for you!

0 Karma

mkocak
Explorer

Thanks yep I know this already 🙂

0 Karma

bmas10
Explorer

Make sure java is installed, that was my issue.

sarnagar
Contributor

Im also getting this:

DBX Server is not available, please make sure it is started and listening on 9998 port or consult documentation for details.

0 Karma

iyesdendeni
New Member

I have the same issue, and I cannot find this general setting anywhere

0 Karma

teddyidc1101
Communicator

Sorry for the delayed response...thank all for the help!
Its working now 🙂

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...