All Apps and Add-ons

Splunk DB Connect: How to resolve "Can not communicate with task server, check your settings" error message?

Engager

I have installed Splunk 6.5.2 enterprise and installed the Splunk DB Connect 3.0 app from the tgz file. When I logon to Splunk and go to Splunk DB Connect, I get an error message at the top that says, 'Can not communicate with task server, check your settings'. I have tried changing the Task server port but that did not help.

Any suggestions/solutions would help.

Thanks

1 Solution

Contributor

Hi All,

I have gone though all the answers and done all required changes in config but nothing will happend.
Finally, I use below steps to reslove this issue.

  1. Backup your files, if exist, ex: db_input.conf and drivers
  2. Stop splunk. Remove db_connect app from app folder.
  3. Restart Splunk.
  4. Upgrade your splunk with just new version.
  5. install > db connect app

check your db it will be okay now.

Happy Splunking !..

0 Karma

Engager

made sure you had JAVAHOME set properly to the jre 8 path as well as adding %JAVAHOME%/bin to the Path

0 Karma

Splunk Employee
Splunk Employee

There is one file in DBconnect app which is used to configure app:
/opt/splunk/etc/apps/splunkappdbconnect/config/dbxtask_server.yml

There is one stanza in inputs.conf in app's default folder which is used this above file to configure app (including port 9998 for JAVA) so if the inputs are disabled in the app then the app will not able to get the file "/opt/splunk/etc/apps/splunkappdbconnect/config/dbxtask_server.yml" and it will show the error "Can not communicate with task server, check your settings".

Below is the stanza in inputs.conf:

[server://default]
configfile = ${SPLUNKHOME}/etc/apps/splunkappdbconnect/config/dbxtaskserver.yml
interval = 5
keystore
password = *****
startbyshell = false

It may be issue with the inputs of DBconnect app.
I have tested above steps and it works fine that by enabling the inputs issue has been resolved.

Contributor

Hello,
I took me a great amount of time to get to what you shared here. My inputs.conf reads like below. The question is how you enable/disable this .conf file? Does the keystore_password matter (* or changeme)?

Thank you,

[splunk@splunkserver default]$ cat inputs.conf
[server://default]
configfile = ${SPLUNKHOME}/etc/apps/splunkappdbconnect/config/dbxtaskserver.yml
interval = 5
keystore
password = changeme
startbyshell = false

[dbxquery://default]
configfile = ${SPLUNKHOME}/etc/apps/splunkappdbconnect/config/dbxqueryserver.yml
interval = 5
keystorepassword = changeme
start
by_shell = false

0 Karma

Path Finder

I have uninstalled DB connect completely, and then made sure I had JAVAHOME set properly to the jre 8 path as well as adding %JAVAHOME%/bin to the Path. Then I installed DB Connect and it worked. I read this somewhere (sorry probably on answers but I forget the link). But it seems to be essential that JAVAHOME set along with the reference in the path _before installing DB Connect.

Motivator

Since this is a top hit on Google, I will just add that Java was updated in the background unbeknownst to me. Our auto-updater puts the version in the directory name so I was able to take the above advice, update the Java path for DB Connect and restart to resolve the problem.

Cheers,
Jacob
0 Karma

Builder

Using port 1025 solved, thanks guys 🙂

0 Karma

Contributor

This is the key to resolve the nasty issue - port 1025.

THANK YOU.

0 Karma

Splunk Employee
Splunk Employee

I got the same error for dbx 3.1.4 for splunk 7.1.4 and splunk 6.6.11 in Windows. I installed the brand new splunk and copy paste my old splunkappdb_connect folder to the splunk/etc/apps/ to 'install' the app. I restart splunk and got the same error message.

My solution is to refresh the Settings under Configuration tab in dbx app. You may need to change the JRE Installation Path by one letter and change it back. Then you click the save on the right. The task server will restart. After a few seconds, it will say task server restart successfully. Then you are ready to go! I didn't change any of the setting but just trigger the refresh task server.

0 Karma

Engager

I got this error as well because the java jre path was removed or changed. The Java on my standalone dev Splunk server got updated by our SysAdmins and I was getting the "Can not communicate with task server, check your settings" error. It had been working just fine.
I went to settings and reviewed them. I verified the java path with what was on the server and sure enough the old java path was gone. I updated the java path to the new java path and saved. It attempted the restart of the task server but failed. I restarted splunk and everything came up working like normal.

Explorer

You may also see this error if you've specified the full path for the JRE Installation Path setting:

Example:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre

If Java is patched, this will break the task server when Splunk is restarted. If you are using package manager, distributions may maintain symbolic links can be referenced to avoid this breaking often due to patching.

0 Karma

Path Finder

I have this same error on a Windows install. However, I don't have this file at all

C:\Program Files\Splunk\etc\apps\splunkappdbconnect\default\dbxtask_server.yml

As far as the 'dbx' prefix is concerned I only have dbxlogging and dbxsettings in my C:\Splunk\etc\apps\splunkappdb_connect\default folder ... this thread is 6.5.3 though, and I am running Splunk 7.1.2 - same error though folks, but no file as referenced here.

Any idea how to fix this? Thanks.

0 Karma

SplunkTrust
SplunkTrust

Look for the following path:

$SPLUNK_HOME\splunk_app_db_connect\config\dbx_task_server.yml
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

Path Finder

Thanks. You mean JAVA_HOME in that file, or something else? Thanks again, I really appreciate it.

0 Karma

Path Finder

The top of my dbxtaskserver.yml reads:

server:
rootPath: /api/
applicationConnectors:
- type: http
port: 9998

I can't find any /api/ path in the Splunk directories. Perhaps this is the issue?

0 Karma

Engager

I had the same problem and search using index=_internal sourcetype="dbx"* gave out the real error which was a permission issue.

0 Karma

New Member

Error : Task Server not started

first we keep port 1025 (or 1030) any port save it this will still not working
restart splunk

we can see splunk db connect working fine , go to configuration you will see its using the port which
we have given like 1025 in our case

now we can change port again to 9998 , save and task server working fine

done ,first we keep port 1025 (or 1030 any port ) save , this will still show task server not started
now

restart splunk

we found its working now , however port is what we have given , like 1025 in our case

now we can change port again to 9998 , and can see task server working fine

Done

0 Karma

New Member

its works for me thank u .

0 Karma

Contributor

Hi

I did the change to 1025 - it didn't work. and I turned it again to 9998 - same result.
In both cases, when I start Splunk I have the following output:

[splunk@srvsplunk bin]$ ./splunk start

 Splunk> CSI: Logfiles.

 Checking prerequisites...
     Checking http port [8000]: open
     Checking mgmt port [8089]: open
     Checking appserver port [127.0.0.1:8065]: open
     Checking kvstore port [8191]: open
     Checking configuration...  Done.
     Checking critical directories...    Done
     Checking indexes...
         Validated: _audit _internal _introspection _telemetry _thefishbucket history main omega_ca_nt omega_ds omega_ds_idx_01 omega_nt_ora summary
     Done
     Checking filesystem compatibility...  Done
     Checking conf files for problems...
         Invalid key in stanza [dbx_java_installation_health_check] in /opt/splunk/etc/apps/splunk_app_db_connect/default/checklist.conf, line 17: doc_title  (value:  DB Connect JVM installation).
         Invalid key in stanza [dbx_driver_installation_health_check] in /opt/splunk/etc/apps/splunk_app_db_connect/default/checklist.conf, line 41: doc_title  (value:  DB Connect JDBC Driver installation).
         Invalid key in stanza [dbx_connections_configuration_health_check] in /opt/splunk/etc/apps/splunk_app_db_connect/default/checklist.conf, line 69: doc_title  (value:  DB Connect connection configuration,DB Connect identity configuration).
         Invalid key in stanza [dbx_data_lab_configuration_health_check] in /opt/splunk/etc/apps/splunk_app_db_connect/default/checklist.conf, line 85: doc_title  (value:  DB Connect input configuration,DB Connect output configuration,DB Connect lookup configuration).
         Invalid key in stanza [dbx_java_server_configuration_health_check] in /opt/splunk/etc/apps/splunk_app_db_connect/default/checklist.conf, line 98: doc_title  (value:  DB Connect Java Server configuration).
         Your indexes and inputs configurations are not internally consistent. For more information, run 'splunk btool check --debug'
     Done
     Checking default conf files for edits...
     Validating installed files against hashes from '/opt/splunk/splunk-6.5.2-67571ef4b87d-linux-2.6-x86_64-manifest'
     All installed files intact.
     Done
 All preliminary checks passed.

 Starting splunk server daemon (splunkd)...  
 Done
  [  OK  ]

 Waiting for web server at http://127.0.0.1:8000 to be available........ Done


 If you get stuck, we're here to help.  
 Look for answers here: http://docs.splunk.com

 The Splunk web interface is at http://srvsplunk:8000

the very strange thing on the above - is that the startup problems DO NOT appear with the 9998 port as an original setting after the DB Connect App Install, but they DO appear even when the port is set again to 9998 (after trying 1025).

regards
Altin

0 Karma