All Apps and Add-ons

How can I restart Server error?


Can't save the DB connect configuration settings as it is prompting the error "Failed to restart task server".Tried with changing default port which doesn't work.

Labels (1)


I just spent a while dealing with this, so wanted to share what I did to resolve the issue in case it will be useful for anyone else.

Scenario: I updated the DB Connect app, after which Java 8 was no longer supported.  After this when accessing the DB Connect app I got the following errors:

  • Cannot communicate with task server, please check your settings.
  • DBX Server is not available, please make sure it is started and listening on 9996 port or consult documentation for details.

I installed JDK 17.0.7, then went into DB Connect - Configuration - Settings where I updated the value of JRE Installation Path (JAVA_HOME).

When saving it, I got the error Failed to restart task server.  Restarting Splunk did not help.

After a couple of hours of troubleshooting, and it not really behaving any differently, I wondered what if it is trying to use the old JRE still?  So I renamed the old JRE directory from /usr/lib/jre1.8.0_151 to /usr/lib/jre1.8.0_151_z to guarantee it could not find it and then splunkd.log then had a helpful entry after restarting:

ERROR ModularInputs [1677 MainThread] - <stderr> Introspecting scheme=server:  /opt/splunk/etc/apps/splunk_app_db_connect/linux_x86_64/bin/ line 33: /usr/lib/jre1.8.0_151/bin/java: No such file or directory
host = source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd

... so it was still trying to use the older JRE (in fact, that was the original JRE I installed for DB Connect, I had since then already installed a newer JRE a couple of years ago that I *thought* it was using)

To find out where this old JRE was being specified, I ran
grep -rnw '/opt/splunk/etc/apps/splunk_app_db_connect' -e 'jre1.8.0_151'

Which returned one file:



After updating the content of and restarting Splunk, DB Connect was working again.

Searching for files containing jdk-17.0.7 returned 7 files in total..... it looks like the Settings page in DB Connect is updating all of them except for the one I had to edit.

I suppose adding $JAVA_HOME would have worked as well, I was trying to get it to work without doing that since it had worked fine in the past without it set: this way there is one less place to have to go (outside of Splunk itself) to update it in the future when the JDK has to be updated again, and also not knowing if any (non-Splunk) updates or other processes in the future may change it in /etc/profile


Here's what happened to me. I had installed the DB Connect app before installing the Oracle JDK version 1.8. After installing the right JDK and correcting your Java path (and getting that error), you need to restart Splunk one more time. Seems that Splunk will only do the initial Task Server startup on Splunk startup.

After restarting Splunk, I had a running Task Server and everything was okay.


It also worked for me. After restarting Splunk I got my Task Server running.

%SPLUNK_HOME%\bin\splunk restart

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...