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

500 Server Error When Logging In #3512

Open
1 task done
Zibbp opened this issue Jan 6, 2025 · 0 comments
Open
1 task done

500 Server Error When Logging In #3512

Zibbp opened this issue Jan 6, 2025 · 0 comments

Comments

@Zibbp
Copy link

Zibbp commented Jan 6, 2025

Self-Hosted Version

24.12.1

CPU Architecture

x86_64

Docker Version

27.2.0

Docker Compose Version

2.29.2

Machine Specification

  • My system meets the minimum system requirements of Sentry

Steps to Reproduce

I'm upgrading from a older version so I've been upgrading to each hard stop.

  1. Start with an instance from the last required hard stop (24.8.0)
  2. Checkout 24.12.1
  3. Run the install script
  4. Run docker compose up -d

After signing in a 500 error appears (see below).

Expected Result

I should be able to login without an error.

Actual Result

After Logging In

Screenshot

Image

Stacktrace from logs

web-1                                           | Traceback (most recent call last):
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
web-1                                           |     response = get_response(request)
web-1                                           |                ^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
web-1                                           |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web-1                                           |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/sentry_sdk/integrations/django/views.py", line 94, in sentry_wrapped_callback
web-1                                           |     return callback(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
web-1                                           |     return self.dispatch(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/silo/base.py", line 158, in override
web-1                                           |     return original_method(*args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper
web-1                                           |     return bound_method(*args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
web-1                                           |     return view_func(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/frontend/base.py", line 406, in dispatch
web-1                                           |     return self.handle(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper
web-1                                           |     return bound_method(*args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/views/decorators/cache.py", line 80, in _view_wrapper
web-1                                           |     response = view_func(request, *args, **kwargs)
web-1                                           |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/frontend/auth_login.py", line 99, in handle
web-1                                           |     return super().handle(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/frontend/base.py", line 421, in handle
web-1                                           |     return super().dispatch(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch
web-1                                           |     return handler(request, *args, **kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/frontend/auth_login.py", line 229, in post
web-1                                           |     return self.handle_login_form_submit(request=request, organization=organization)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/frontend/auth_login.py", line 394, in handle_login_form_submit
web-1                                           |     elif not login_form.is_valid():
web-1                                           |              ^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/forms/forms.py", line 197, in is_valid
web-1                                           |     return self.is_bound and not self.errors
web-1                                           |                                  ^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/forms/forms.py", line 192, in errors
web-1                                           |     self.full_clean()
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/forms/forms.py", line 326, in full_clean
web-1                                           |     self._clean_form()
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/forms/forms.py", line 342, in _clean_form
web-1                                           |     cleaned_data = self.clean()
web-1                                           |                    ^^^^^^^^^^^^
web-1                                           |   File "/usr/src/sentry/src/sentry/web/forms/accounts.py", line 120, in clean
web-1                                           |     self.user_cache = authenticate(username=username, password=password)
web-1                                           |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/views/decorators/debug.py", line 75, in sensitive_variables_wrapper
web-1                                           |     return func(*func_args, **func_kwargs)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/contrib/auth/__init__.py", line 70, in authenticate
web-1                                           |     for backend, backend_path in _get_backends(return_tuples=True):
web-1                                           |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/contrib/auth/__init__.py", line 29, in _get_backends
web-1                                           |     backend = load_backend(backend_path)
web-1                                           |               ^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/contrib/auth/__init__.py", line 23, in load_backend
web-1                                           |     return import_string(path)()
web-1                                           |            ^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/utils/module_loading.py", line 30, in import_string
web-1                                           |     return cached_import(module_path, class_name)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/.venv/lib/python3.12/site-packages/django/utils/module_loading.py", line 15, in cached_import
web-1                                           |     module = import_module(module_path)
web-1                                           |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
web-1                                           |     return _bootstrap._gcd_import(name[level:], package, level)
web-1                                           |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-1                                           |   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
web-1                                           |   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
web-1                                           |   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
web-1                                           |   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
web-1                                           |   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
web-1                                           |   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
web-1                                           |   File "/.venv/lib/python3.12/site-packages/sentry_auth_ldap/backend.py", line 3, in <module>
web-1                                           |     from sentry.models import (
web-1                                           | ImportError: cannot import name 'UserEmail' from 'sentry.models' (/usr/src/sentry/src/sentry/models/__init__.py)
web-1                                           | 20:27:55 [ERROR] django.request: Internal Server Error: /auth/login/ (status_code=500 request=<WSGIRequest: POST '/auth/login/'>)
web-1                                           | 20:27:55 [INFO] sentry.access.api: api.access (method='POST' view='sentry.web.frontend.auth_login.AuthLoginView' response=500 user_id='None' is_app='None' token_type='None' is_frontend_request='True' organization_id='None' auth_id='None' path='/auth/login/' caller_ip='192.168.100.5' user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.052908897399902344 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
nginx-1                                         | 192.168.100.5 - - [06/Jan/2025:20:27:55 +0000] "POST /auth/login/ HTTP/1.0" 500 145 "https://sentry-upgrade.domain.com/auth/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "192.168.100.5"
worker-1                                        | 20:28:00 [INFO] sentry.rules.delayed_processing: delayed_processing.project_id_list (project_ids='')
ingest-monitors-1                               | 20:28:01 [INFO] sentry: monitors.consumer.clock_tick (reference_datetime='2025-01-06 20:28:00+00:00')
monitors-clock-tick-1                           | 20:28:01 [INFO] sentry.monitors.consumers.clock_tick_consumer: process_clock_tick (reference_datetime='2025-01-06 20:28:00+00:00')
monitors-clock-tick-1                           | 20:28:01 [INFO] sentry.monitors.system_incidents: process_clock_tick (decision=<TickAnomalyDecision.NORMAL: 'normal'>)

Latest install logs:

sentry-install.log

Let me know if there is anything else I can provide.

Event ID

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Status: No status
Development

No branches or pull requests

1 participant