while adding a new connection in DB Connect I get a waning message saying:
'thread._local' object has no attribute 'user_name'
and the connection cannot be validated.
the dbx2.log has the following entries:
2016-08-17T11:30:26+0200 [ERROR] [rh_connections.py], line 162: exception 'thread._local' object has no attribute 'user_name'
Traceback (most recent call last):
File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/rh_connections.py", line 158, in handleStatus
status = self.get_connection_status(dbx2, fdb)
File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx2/health_logger.py", line 278, in wrapper
return get_mdc(MDC_LOGGER).do_log(func, *args, **kwargs)
File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx2/health_logger.py", line 153, in do_log
self.pre_logging_hook()
File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx2/health_logger.py", line 204, in pre_logging_hook
logger.warn('health_logger action=user_have_no_permission_collect_health_info user=%s', mdc.user_name)
AttributeError: 'thread._local' object has no attribute 'user_name'
posting the answer myself for others having the same issue.
As a workaround, i changed the file: /opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx2/health_logger.py
Line 204 from:
logger.warn('health_logger action=user_have_no_permission_collect_health_info user=%s', mdc.user_name)
to:
logger.warn('health_logger action=user_have_no_permission_collect_health_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
posting the answer myself for others having the same issue.
As a workaround, i changed the file: /opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx2/health_logger.py
Line 204 from:
logger.warn('health_logger action=user_have_no_permission_collect_health_info user=%s', mdc.user_name)
to:
logger.warn('health_logger action=user_have_no_permission_collect_health_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
did and worked. thanks for saving our upgrade