Project

General

Profile

Bug #2557

404 Error in container after first attempt

Added by Luke Murphey over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
12/29/2019
Due date:
% Done:

100%


Description

    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/templatetags/cache.py", line 49, in render
    fragment_cache.set(cache_key, value, expire_time)
  File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 51, in set
    fd, tmp_path = tempfile.mkstemp(dir=self._dir)
  File "/usr/local/lib/python2.7/tempfile.py", line 314, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/local/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: '/cache/tmpnqP1kS'
root@f8d434ad1ddf:/usr/src/app/var/log# tail -n 25 app.log
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 72, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/defaulttags.py", line 529, in render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/site-packages/django/templatetags/cache.py", line 49, in render
    fragment_cache.set(cache_key, value, expire_time)
  File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 51, in set
    fd, tmp_path = tempfile.mkstemp(dir=self._dir)
  File "/usr/local/lib/python2.7/tempfile.py", line 314, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/local/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: '/cache/tmpnqP1kS'

History

#1 Updated by Luke Murphey over 4 years ago

  • Description updated (diff)
Questions:
  • Is this a known issue?
  • Can I circumvent it by not sharing /cache and using one within the container?
  • [Yes] Can the other directories be written to?
  • Do files made in the host show up on the container?
    • No
  • [Yes] Can the container make files in other shared directories?
    • I can in /files
    • touch test.txt worked
    • /db works too
  • [Determined] What are the shares?
    /opt/textcritical/cache     /cache
    /opt/textcritical/db     /db
    /opt/textcritical/files     /usr/src/app/media/files
    /opt/textcritical/indexes     /usr/src/app/var/indexes
    
  • Its also not showing the files from the container
Observations
  • Can ssh to the host with:
    • lukemurphey -L 8004:localhost:8004 -L 9001:localhost:9000
  • The following URL shows the failure: http://127.0.0.1:8004/api/works
  • The error I see is:
    touch: cannot touch 'text.txt': No such file or directory
    
  • 'ls' in the directory makes it appear like it is not a directory
  • This happened after having the cache directory cleared
Causes/solutions: References:

#2 Updated by Luke Murphey over 4 years ago

  • Status changed from New to In Progress

#3 Updated by Luke Murphey over 4 years ago

  • Subject changed from Error to 404 Error in container after first attempt

#4 Updated by Luke Murphey over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

#5 Updated by Luke Murphey about 4 years ago

  • Status changed from Closed to In Progress
  • Target version changed from 3.1 to 3.2

#6 Updated by Luke Murphey about 4 years ago

  • Status changed from In Progress to Closed

#7 Updated by Luke Murphey about 4 years ago

  • Status changed from Closed to New
  • Target version changed from 3.2 to Plus_2

#8 Updated by Luke Murphey about 4 years ago

  • % Done changed from 100 to 80

#9 Updated by Luke Murphey about 4 years ago

  • Status changed from New to Closed
  • Target version deleted (Plus_2)
  • % Done changed from 80 to 100

I updated the script to remove the files from the directory but not remove the directory itself.

Also available in: Atom PDF