[traceback] exceptions:IOError: [Errno 2] No such file or directory: '/data/www/www-dev.allizom.org-django/bedrock/bedrock/externalfiles/files_cache/forums.txt'

VERIFIED FIXED

Status

www.mozilla.org
Bedrock
--
major
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: stephend, Unassigned)

Tracking

Development/Staging

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fromAutomation], URL)

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8462911 [details]
Screen Shot 2014-07-25 at 4.39.38 PM.png

https://www-dev.allizom.org/en-US/about/forums/ is throwing a 500 [1]:

Error message

exceptions:IOError: [Errno 2] No such file or directory: '/data/www/www-dev.allizom.org-django/bedrock/bedrock/externalfiles/files_cache/forums.txt'
Stack trace
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/hooks/framework_django.py", line 492, in wrapper return wrapped(*args, **kwargs)
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/decorators.py", line 21, in inner response = func(request, *args, **kwargs)
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/views/decorators/http.py", line 147, in inner response = func(request, *args, **kwargs)
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs)
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/views.py", line 287, in forums_view return l10n_utils.render(request, 'mozorg/about/forums/forums.html', ctx)
File "/data/www/www-dev.allizom.org-django/bedrock/lib/l10n_utils/__init__.py", line 75, in render return django_render(request, template, context, **kwargs)
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/shortcuts/__init__.py", line 53, in render return HttpResponse(loader.render_to_string(*args, **kwargs),
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/template/loader.py", line 177, in render_to_string return t.render(context_instance)
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/src/jingo/jingo/__init__.py", line 195, in render return super(Template, self).render(context_dict)
File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/api/function_trace.py", line 89, 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/www-dev.allizom.org-django/bedrock/bedrock/mozorg/templates/mozorg/about/forums/forums.html", line 5, in top-level template code {% extends "mozorg/about-base.html" %}
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/templates/mozorg/about-base.html", line 8, in top-level template code {% set navigation_bar = [
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/templates/mozorg/base-resp.html", line 5, in top-level template code {% extends "base-resp.html" %}
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/base/templates/base-resp.html", line 134, in top-level template code {% block content %}{% endblock %}
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/templates/mozorg/about-base.html", line 26, in block "content" {% block article %}{% endblock %}
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/templates/mozorg/about/forums/forums.html", line 51, in block "article" {% for title in forums.ordered.keys() %}
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 371, in getattr return getattr(obj, attribute)
File "/data/www/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/utils/functional.py", line 45, in __get__ res = instance.__dict__[self.func.__name__] = self.func(instance)
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/mozorg/forums.py", line 33, in ordered return self._parse(self.readlines())
File "/data/www/www-dev.allizom.org-django/bedrock/bedrock/externalfiles/__init__.py", line 101, in readlines with open(self.file_path, 'rb') as fh:
IOError: [Errno 2] No such file or directory: '/data/www/www-dev.allizom.org-django/bedrock/bedrock/externalfiles/files_cache/forums.txt'


[1] https://rpm.newrelic.com/accounts/263620/applications/2634040/traced_errors/1953264122

Comment 1

3 years ago
The cause for this is the update_externalfiles management command is not being run due to www-dev not being set up to use the same deployment scripts as the demo, stage, and prod environments. I tried running the update_externalfiles management command manually, but I got an error because my user account is unable to create the necessary files due to insufficient filesystem permissions. This could be fixed temporarily by manually running ./manage.py update_externalfiles as root, but I believe the real fix for this (and other issues such as database migrations) would be done as part of bug 917600. :cturra, can you provide any info on this?
Depends on: 917600
Flags: needinfo?(cturra)
i manually ran this `update_externalfiles` for you on bedrock-dev to get you past this. if you'd like, i can add it to the update script, so it's called on each deployment (until we have chief).

on the topic of chief - there haven't been any resources assigned to that bug at this point. if you feel like there is a compelling reason for its priority to be bumped up, please comment on the respective bug accordingly.

[root@bedrockadm.private.phx1 bedrock]# ./manage.py update_externalfiles
/data/bedrock-dev/src/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/core/management/__init__.py:465: DeprecationWarning: The 'execute_manager' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  DeprecationWarning)
/data/bedrock-dev/src/www-dev.allizom.org-django/bedrock/vendor/lib/python/django/core/management/__init__.py:409: DeprecationWarning: The 'setup_environ' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  DeprecationWarning)
/data/bedrock-dev/src/www-dev.allizom.org-django/bedrock/vendor-local/src/raven/raven/utils/__init__.py:13: UserWarning: Module requests was already imported from /data/bedrock-dev/src/www-dev.allizom.org-django/bedrock/vendor-local/src/requests/requests/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  import pkg_resources
updating credits... done
updating forums... done
Flags: needinfo?(cturra)
Hi Josh-

Is there more to do on this one?  Should I add it to the Kanban board?

Thx,
Jen
Flags: needinfo?(jmize)

Comment 4

3 years ago
:cturra my recollection from our discussion last week was that you were going to call /data/www/www-dev.allizom.org-django/bedrock/bin/update/deploy-dev.py as part of the dev update; was that going to be part of this bug or a separate bug? If there's another bug tracking that please comment with the bug # and I believe that this one can be marked as fixed based on the steps you took to manually resolve the issue.
Flags: needinfo?(jmize) → needinfo?(cturra)
looks like i can probably remove my NI flag now that we've setup chief on bedrock.dev :) do ping me if i am missing something else here tho.
Flags: needinfo?(cturra)
If this issue is still not resolved, please reopen.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Comment 7

3 years ago
(In reply to Mike Alexis [:malexis] from comment #6)
> If this issue is still not resolved, please reopen.

Thx, Mike - this does indeed seem fixed; verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.