All Apps and Add-ons

DB Connect is failing with an an exception during verify/save

Path Finder

while adding a new connection in DB Connect I get a waning message saying:
'thread.local' object has no attribute 'username'
and the connection cannot be validated.

the dbx2.log has the following entries:
2016-08-17T11:30:26+0200 [ERROR] [rhconnections.py], line 162: exception 'thread.local' object has no attribute 'username'
Traceback (most recent call last):
File "/opt/splunk/etc/apps/splunk
appdbconnect/bin/rhconnections.py", line 158, in handleStatus
status = self.get
connectionstatus(dbx2, fdb)
File "/opt/splunk/etc/apps/splunk
appdbconnect/bin/dbx2/healthlogger.py", line 278, in wrapper
return get
mdc(MDCLOGGER).dolog(func, args, *kwargs)
File "/opt/splunk/etc/apps/splunkappdbconnect/bin/dbx2/healthlogger.py", line 153, in dolog
self.pre
logginghook()
File "/opt/splunk/etc/apps/splunk
appdbconnect/bin/dbx2/healthlogger.py", line 204, in prelogginghook
logger.warn('health
logger action=userhavenopermissioncollecthealthinfo user=%s', mdc.username)
AttributeError: 'thread.
local' object has no attribute 'user_name'

1 Solution

Path Finder

posting the answer myself for others having the same issue.

As a workaround, i changed the file: /opt/splunk/etc/apps/splunkappdbconnect/bin/dbx2/healthlogger.py

Line 204 from:
logger.warn('healthlogger action=userhavenopermissioncollecthealthinfo user=%s', mdc.username)
to:
logger.warn('healthlogger action=userhavenopermissioncollecthealth_info user=%s', self.username)

after that I can verify/save new connections. please consider this change for a future release...

This has been confirmed to be a bug by Splunk support and will be fixed in version 2.3.1

View solution in original post

Path Finder

posting the answer myself for others having the same issue.

As a workaround, i changed the file: /opt/splunk/etc/apps/splunkappdbconnect/bin/dbx2/healthlogger.py

Line 204 from:
logger.warn('healthlogger action=userhavenopermissioncollecthealthinfo user=%s', mdc.username)
to:
logger.warn('healthlogger action=userhavenopermissioncollecthealth_info user=%s', self.username)

after that I can verify/save new connections. please consider this change for a future release...

This has been confirmed to be a bug by Splunk support and will be fixed in version 2.3.1

View solution in original post

Super Champion

did and worked. thanks for saving our upgrade

0 Karma