All Apps and Add-ons
Highlighted

DB Connect: Cannot communicate with task server

Hello,

We are trying to install DB Connect 3.1.4 on a new Splunk instance (Splunk Entreprise 7.2.6 on Linux RedHat server).
We previously installed java 1.8 (jre1.8.0211-amd64), the path to the jre is /usr/java/jre1.8.0211-amd64/ the directory is owned by the user that launches the Splunk service.
It's not the first time we are installing DB Connect, we already did it twice on Splunk 7.2.1 and followed the same configurations.

So after installing the app DB Connect we get the error "Cannot communicate with task server, please check your settings".

  • Using task server port 9998 or 1025 doesn't change anything (and "netstat -an | grep 9998" or "netstat -an | grep 1025" returns nothing).
  • The JRE installation path used in DB Connect setting was detected automatically after installing the app, it is set to "/usr/java/jre1.8.0_211-amd64" (which is the correct path)
  • We can't find a lot of information by searching: index=_internal sourcetype=dbx*, only logs like 2019-06-11T17:21:04+0200 [INFO] [settings.py], line 121: update java path file [/splunk/etc/apps/splunk_app_db_connect/linux_x86_64/bin/customized.java.path] Telling us that we are editing the java path.

We tried restarting Splunk or installing a whole JDK instead of JRE, we don't know what to do anymore.
Does anyone have any ideas?

Thank you for your help!

0 Karma

Re: DB Connect: Cannot communicate with task server

Champion

Hi performancemonitoring,

Did you set $JAVA_HOME?

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

We have set JAVAHOME with "/usr/java/jre1.8.0211-amd64", restarted Splunk and tried to communicate with the task server but it didn't work.

Also it seems we didn't set $JAVA_HOME for our 2 previous instances and yet it worked for them, so this is a bit confusing.

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

SplunkTrust
SplunkTrust

Hi @performancemonitoring,

Check this out :
https://answers.splunk.com/answers/702333/dbconnect-cannot-communicate-with-task-server.html

Set JDK path not JRE.

Cheers,
David

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

So we installed a JDK, set the $JAVAHOME and the JRE Installation Path in DB Connect to "/usr/java/jdk1.8.0191-amd64", saved the settings (here we get the usual error "Failed to restart task server.") and then restarted Splunk as mentioned in the thread but it still doesn't work after that.

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

SplunkTrust
SplunkTrust

From this error : "DBX Server is not available, please make sure it is started and listening on 9998 port" it seems that firewalld might be blocking your port... try to allow it using firewall-cmd.

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

SplunkTrust
SplunkTrust
0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

Update

We looked into the Monitoring Console to perform a healtcheck of the app DB Connect. Basically we get some expected errors for inputs/outputs/lookups/identities/connections/drivers because DBX Server is not available, please make sure it is started and listening on 9998 port or consult documentation for details..

And then we get what seems to be the main problem at the step Java Server configuration: The bootstrap conditions of the Java Server fail. The modular input to start the Java Server failed to be registered to Splunk

Also it seems the JVM installation is correct according to the healthcheck (correct version and java path is correctly set by DB Connect commands and server).

0 Karma
Highlighted

Re: DB Connect: Cannot communicate with task server

Splunk Employee
Splunk Employee

Simple:-

1) Open:-  vim /etc/profile 

export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/"

export PATH=$JAVA_HOME/bin:$PATH

save the above two lines

2) source /etc/profile

The above command will update in OS or logout and login to ssh.

3) restart splunkd service

4) Now go to UI, splunk_db_connect, configuration, general, 

JRE Installation Path(JAVA_HOME) -> /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre

save, it will work 

0 Karma