Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Metrics for Oracle DPI errors #3944

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Fix Metrics for Oracle DPI errors #3944

merged 1 commit into from
Jan 8, 2025

Conversation

quadoss
Copy link
Collaborator

@quadoss quadoss commented Jan 8, 2025

Stacktrace:
[20/Dec/2024 08:23:00 -0500] metrics ERROR Could not get active_users
Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/oracle/base.py", line 521, in execute
self._guess_input_sizes([params])
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/oracle/base.py", line 467, in _guess_input_sizes
self.setinputsizes(**sizes)
cx_Oracle.DatabaseError: DPI-1010: not connected

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/apps/useradmin/src/useradmin/metrics.py", line 33, in active_users
count = UserProfile.objects.filter(
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/query.py", line 412, in count
return self.query.get_count(using=self.db)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/sql/query.py", line 528, in get_count
number = obj.get_aggregation(using, ['__count'])['__count']
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/sql/query.py", line 513, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/oracle/base.py", line 521, in execute
self._guess_input_sizes([params])
File "/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p1015.59425156/lib/hue/build/env/lib/python3.8/site-packages/django/db/backends/oracle/base.py", line 467, in _guess_input_sizes
self.setinputsizes(**sizes)
django.db.utils.DatabaseError: DPI-1010: not connected.

Testing:
Manually tested and was also tested at customer end.

Jira: CDPD-77746

Testing:
Manually tested and was also tested at customer end.
@amitsrivastava

This comment was marked as resolved.

Copy link

github-actions bot commented Jan 8, 2025

⚠️ No unit test files modified. Please ensure that changes are properly tested. ⚠️

@quadoss quadoss merged commit 5b20c54 into master Jan 8, 2025
6 checks passed
@quadoss quadoss deleted the DPI-1010-Metrics branch January 8, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants