All Apps and Add-ons

Error with Splunk DB Connect app | Unable to communicate with task server; No module named urllib3 and other ERRORS

sh254087
Communicator

I'm running Splunk DB Connect app on Splunk 7.0.1 for quite some time now. Lately I'm seeing some errors on the DB Connect app UI where it states that it is not able to communicate with the task server along with few other errors.

Tried changing the ports but nothing helped. I also see an error in the python log(not sure if its in anyway related).

Splunk DB Connect app Error

* Cannot communicate with task server, please check your settings.
* <?xml version="1.0" encoding="UTF-8"?> <response> <messages> <msg type="WARN">Traceback (most recent call last):&#13; File "E:\Splunk/bin/rest_handler.py", line 79, in <module>&#13; print splunk.rest.dispatch(**params)&#13; File "E:\Splunk\Python-2.7\Lib\site-packages\splunk\rest\__init__.py", line 149, in dispatch&#13; module = __import__('splunk.rest.external.%s' % parts[0], None, None, parts[0])&#13; File "E:\Splunk\etc\apps\splunk_app_db_connect\bin\dbxproxy.py", line 4, in <module>&#13; import requests&#13; File "E:\Splunk\etc\apps\TA-Swimlane\bin\requests\__init__.py", line 43, in <module>&#13; import urllib3&#13; ImportError: No module named urllib3&#13; &#13; </msg> </messages> </response>

*ERROR No module named urllib3
Traceback (most recent call last):
  File "E:\Splunk/bin/rest_handler.py", line 79, in <module>
    print splunk.rest.dispatch(**params)
  File "E:\Splunk\Python-2.7\Lib\site-packages\splunk\rest\__init__.py", line 149, in dispatch
    module = __import__('splunk.rest.external.%s' % parts[0], None, None, parts[0])
  File "E:\Splunk\etc\apps\splunk_app_db_connect\bin\dbxproxy.py", line 4, in <module>
    import requests
  File "E:\Splunk\etc\apps\TA-Swimlane\bin\requests\__init__.py", line 43, in <module>
    import urllib3
ImportError: No module named urllib3

Attached are the error screenshot and snippets. I do not want to re-install DB Connect app in first place as I have outputs configured and running on the app which I do not want to be affected and would want to know if this issue can be fixed in any other way apart from re-installing unless that is the only solution. Any help in this regard is greatly appreciated.

P.S. : All my outputs configured are still running fine and are not affected by this. I'm only not able to load and access the app itself in order to be able to modify or create new output configurations.

0 Karma
1 Solution

sh254087
Communicator

Updating the DB connect app as well as re-installing the app did not help. The same error occurred even after the re-installation. Hence with some more tracing we understood that this issue was due to a recent Windows patch that was applied. Hence we have reverted the patch and have informed the same to the Splunk team so that they can work on handling this going forward. Thanks for the guidance, Niket. @niketnilay

View solution in original post

kheo_splunk
Splunk Employee
Splunk Employee

The symptom is supposed to be fixed in the latest release(DB Connect app 3.14) as below:

https://docs.splunk.com/Documentation/DBX/3.1.4/ReleaseNotes/Releasenotes
DBX-4623 Compatibility issue with splunk_app_db_connect 3.1.3 and TA-Proofpoint-TAP 1.3.117 keeps DBX from loading.

0 Karma

skalliger
Motivator

Unfortunately, it has not been fixed, not even on 3.3.1.

0 Karma

frankwayne
Path Finder

I noticed the same Python error about a missing library. My solution was to copy four libraries to /opt/splunk/etc/apps/splunk_app_db_connect/bin/: urllib3, chardet, certifi, and idna. I copied them from the Splunk_TA_box app I have installed. Not all of these are in /opt/splunk/lib/python2.7/site-packages/requests/packages.

I suppose you can download the Box app to get them or find them elsewhere online.

BTW, I'm running Splunk 7.0.3 and DBX 3.1.3.

VenuPunna
Engager

Worked for me too , Thankyou very much.

0 Karma

ktwingstrom
Path Finder

This worked for me! Already upvoted as an answer. Thanks!

clayramey1
Engager

A little unorthodox, but downloading Splunk_TA_box and copying over those 4 libraries just fixed my problems too! Good answer!

0 Karma

hassanm
Engager

Great Solution @frankwayne.. Works like a charm! Thanks!

sh254087
Communicator

Updating the DB connect app as well as re-installing the app did not help. The same error occurred even after the re-installation. Hence with some more tracing we understood that this issue was due to a recent Windows patch that was applied. Hence we have reverted the patch and have informed the same to the Splunk team so that they can work on handling this going forward. Thanks for the guidance, Niket. @niketnilay

niketn
Legend

@sh254087, if your DB Connect 3 was working fine little while ago and has now stopped working You should ideally check out all configuration from DB Connect > Configuration > Settings

1) Check whether there is any Java Update installed on your machine and whether JAVA_HOME refers to the latest path in Splunk.

2) Check JVM Options (see different options).

3) Verify that the Task Server Port is correct and there is no other program running on the same port or the port is not blocked. For example if it is 9998, then on testing DB Connect Connection you should see Java.exe running on port 9998.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

sh254087
Communicator

I've taken the backup of the 'local' folder where all the configurations reside.

Can I proceed with re-installing the app and then placing this 'local' folder in the same place on the new folder structure that'll be created so that it reads the config details, that way I do not loose the output configurations?

0 Karma

sh254087
Communicator

DB Connect > Configuration > Settings - Problem right here. Can not open this as the error is displayed as soon as I open DB Connect app.

I've checked the Java installation and the JAVA_HOME path, it is unchanged.
Checked around the port as well, no luck.

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

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 ...