Closed Bug 1027754 Opened 10 years ago Closed 10 years ago

In-product rewrites/redirects are throwing 500 Internal Server Errors on production

Categories

(support.mozilla.org :: Knowledge Base Software, task)

task
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: rehandalal+mozilla)

References

()

Details

(Whiteboard: [fromAutomation])

See also https://support.mozilla.org/de/kb/hilfe-durch-unsere-gemeinschaft-erhalten

Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 475, in wrapper return wrapped(*args, **kwargs)
File "/data/www/support.mozilla.org/kitsune/vendor/src/django-mobility/mobility/decorators.py", line 23, in wrapper return f(request, *args, **kw)
File "/data/www/support.mozilla.org/kitsune/kitsune/questions/views.py", line 279, in question_list 'filters': FILTER_GROUPS[show],
KeyError: None

There are a bunch of errors; I sense migration/DB issues/schema changes, perhaps?
FWIW, in case it helps, this also happens on staging, too: https://rpm.newrelic.com/accounts/263620/applications/2779107/traced_errors

We probably didn't catch it because we don't run redirect tests (at James Socol's request) on staging.
Possibly bug 882426, for at least some of the errors?
Assignee: nobody → rdalal
Sorry, last spam from me is this specific URL with a specific traceback, in the hopes that it helps:

https://support.mozilla.org/en-US/groups/knowledge-base-reviewers

Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 475, in wrapper return wrapped(*args, **kwargs)
File "/data/www/support.mozilla.org/kitsune/kitsune/groups/views.py", line 50, in profile 'leader_form': leader_form or AddUserForm()})
File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/shortcuts/__init__.py", line 53, in render return HttpResponse(loader.render_to_string(*args, **kwargs),
File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/template/loader.py", line 169, in render_to_string return t.render(context_instance)
File "/data/www/support.mozilla.org/kitsune/vendor/src/jingo/jingo/__init__.py", line 193, in render return super(Template, self).render(context_dict)
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/api/object_wrapper.py", line 237, in __call__ self._nr_instance, args, kwargs, **self._nr_kwargs)
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/api/function_trace.py", line 82, in dynamic_wrapper return wrapped(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True)
File "/data/www/support.mozilla.org/kitsune/kitsune/groups/templates/groups/profile.html", line 109, in top-level template code {{ private_message(user) }}
File "/data/www/support.mozilla.org/kitsune/kitsune/groups/templates/groups/base.html", line 3, in top-level template code {% set scripts = ('groups',) %}
File "/data/www/support.mozilla.org/kitsune/kitsune/sumo/templates/base.html", line 186, in top-level template code {% block content %}{% endblock %}
File "/data/www/support.mozilla.org/kitsune/kitsune/groups/templates/groups/profile.html", line 72, in block "content" {{ user_row(user) }}
File "/data/www/support.mozilla.org/kitsune/kitsune/groups/templates/groups/profile.html", line 103, in template <a href="{{ profile_url(user) }}">
File "/data/www/support.mozilla.org/kitsune/kitsune/users/helpers.py", line 20, in profile_url return reverse('users.profile', args=[user.username])
File "/data/www/support.mozilla.org/kitsune/kitsune/sumo/urlresolvers.py", line 51, in reverse url = django_reverse(viewname, urlconf, args, kwargs, prefix)
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/api/object_wrapper.py", line 237, in __call__ self._nr_instance, args, kwargs, **self._nr_kwargs)
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 577, in wrapper return execute(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 576, in execute return wrapped(viewname, *args, **kwargs)
File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/core/urlresolvers.py", line 532, in reverse return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/core/urlresolvers.py", line 452, in _reverse_with_prefix (lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'users.profile' with arguments '(u'rnewman@mozilla.com',)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['user/(?P<user_id>\\w+)$']

https://rpm.newrelic.com/accounts/263620/applications/2779374/traced_errors/1786524812
Landed:
https://github.com/mozilla/kitsune/commit/4a951a71eda09f0cd4cfb6fd281af8e10530b7db

Pushed to prod by me, right now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Verified FIXED; manually, via automation, and via New Relic, the site is happy; thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.