graphite-web fails to start after bionic ESM upgrade

Bug #2030807 reported by Guillermo Gonzalez
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
graphite-web (Ubuntu)
Fix Released
Undecided
Amir Naseredini

Bug Description

graphite-web fails to render any page with the following non-useful traceback:

 [2023-08-08 19:51:21 +0000] [10628] [ERROR] Error handling request /graphite/render
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 135, in handle
     self.handle_request(listener, req, client, addr)
   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 176, in handle_request
     respiter = self.wsgi(environ, resp.start_response)
   File "/usr/lib/python2.7/dist-packages/whitenoise/base.py", line 66, in __call__
     return self.application(environ, start_response)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 157, in __call__
     response = self.get_response(request)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response
     response = self._middleware_chain(request)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 43, in inner
     response = response_for_exception(request, exc)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 93, in response_for_exception
     response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception
     extra={'status_code': 500, 'request': request},
   File "/usr/lib/python2.7/logging/__init__.py", line 1200, in error
     self._log(ERROR, msg, args, **kwargs)
   File "/usr/lib/python2.7/logging/__init__.py", line 1293, in _log
     self.handle(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 1303, in handle
     self.callHandlers(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 1343, in callHandlers
     hdlr.handle(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 766, in handle
     self.emit(record)
   File "/usr/lib/python2.7/dist-packages/django/utils/log.py", line 119, in emit
     message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text())
   File "/usr/lib/python2.7/dist-packages/django/views/debug.py", line 334, in get_traceback_text
     return t.render(c)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 207, in render
     return self._render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 219, in render
     nodelist.append(node.render_annotated(context))
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 1040, in render
     output = self.filter_expression.resolve(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 736, in resolve
     new_obj = func(obj, *arg_vals)
   File "/usr/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 255, in stringformat
     return ("%" + six.text_type(arg)) % value
   File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 79, in __repr__
     return repr(self.__cast())
   File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 131, in __cast
     return self.__text_cast()
   File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 119, in __text_cast
     return func(*self.__args, **self.__kw)
   File "/usr/lib/python2.7/dist-packages/django/urls/base.py", line 91, in reverse
     return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
   File "/usr/lib/python2.7/dist-packages/django/urls/resolvers.py", line 440, in _reverse_with_prefix
     possibilities = self.reverse_dict.getlist(lookup_view)
   File "/usr/lib/python2.7/dist-packages/django/urls/resolvers.py", line 337, in reverse_dict
     return self._reverse_dict[language_code]
 KeyError: 'en-us'

Reverting graphite-web to 1.0.2+debian-2 fixes the issue.

python-django:
  Installed: 1:1.11.11-1ubuntu1.21+esm1
  Candidate: 1:1.11.11-1ubuntu1.21+esm1

python-django-common:
  Installed: 1:1.11.11-1ubuntu1.21+esm1
  Candidate: 1:1.11.11-1ubuntu1.21+esm1

graphite-web:
  Installed: 1.0.2+debian-2
  Candidate: 1.0.2+debian-2ubuntu0.1~esm1

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in graphite-web (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Amir Naseredini (sahnaseredini) wrote :

Hi,

I'm having a look at this to solve the issue. However, since there's not clear error log for it, do you mind if I ask you could apply the debdiff file attached and see if the problem is solved, just to make sure that it's all sorted and to avoid extra uploads? Thanks

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "graphite-web_1.0.2+debian-2ubuntu0.1~esm2.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Guillermo Gonzalez (verterok) wrote :
Download full text (5.7 KiB)

Hi, will test the debdiff in a bit, but just looked into the staging deploy which started failing after a service restart, and got the following traceback which seems related to the debdiff:

 [2023-08-09 12:38:35 +0000] [26128] [ERROR] Error handling request /graphite/
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 135, in handle
     self.handle_request(listener, req, client, addr)
   File "/usr/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 176, in handle_request
     respiter = self.wsgi(environ, resp.start_response)
   File "/usr/lib/python2.7/dist-packages/whitenoise/base.py", line 66, in __call__
     return self.application(environ, start_response)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 157, in __call__
     response = self.get_response(request)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response
     response = self._middleware_chain(request)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 43, in inner
     response = response_for_exception(request, exc)
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 93, in response_for_exception
     response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
   File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception
     extra={'status_code': 500, 'request': request},
   File "/usr/lib/python2.7/logging/__init__.py", line 1200, in error
     self._log(ERROR, msg, args, **kwargs)
   File "/usr/lib/python2.7/logging/__init__.py", line 1293, in _log
     self.handle(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 1303, in handle
     self.callHandlers(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 1343, in callHandlers
     hdlr.handle(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 766, in handle
     self.emit(record)
   File "/usr/lib/python2.7/dist-packages/django/utils/log.py", line 119, in emit
     message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text())
   File "/usr/lib/python2.7/dist-packages/django/views/debug.py", line 334, in get_traceback_text
     return t.render(c)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 207, in render
     return self._render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 199, in _render
     return self.nodelist.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 990, in render
     bit = node.render_annotated(context)
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 219, in render
     nodelist.append(node.render_annotated(context))
   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 957, in render_annotated
     return self.render(context)
   File "/usr/lib/python2.7/dist-packages/django/template...

Read more...

Revision history for this message
Guillermo Gonzalez (verterok) wrote :

were unable to apply the debdiff, I couldn't get the source packages for the esm version.

Instead manually applied the patch to the files and can confirm that graphite is now working again

Revision history for this message
Amir Naseredini (sahnaseredini) wrote :

The fix is now live.

References:
https://ubuntu.com/security/notices/USN-6243-2

Changed in graphite-web (Ubuntu):
assignee: nobody → Amir Naseredini (sahnaseredini)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.