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

Internal server error when accessing visualization URLs that do not exist #2079

Closed
hackdna opened this issue Sep 5, 2017 · 2 comments
Closed

Comments

@hackdna
Copy link
Member

hackdna commented Sep 5, 2017

  • Specific code commit: 8d80f47
  • Version of the web browser and OS: n/a
  • Environment where the error occurred (Vagrant VM and site conf mode or AWS instance): AWS

Steps to reproduce

Access a URL that doesn't exists like /visualizations/asdf/.

Observed behavior

HTTP 500 error:

Internal Server Error: /visualizations/asdf/
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/django_docker_engine/proxy.py", line 50, in _proxy_view
    container_url = DockerClientWrapper().lookup_container_url(container_name)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/django_docker_engine/docker_utils.py", line 98, in lookup_container_url
    return self._containers_manager.get_url(container_name)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/django_docker_engine/container_managers/docker_engine.py", line 41, in get_url
    container = self._containers_client.get(container_name)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/models/containers.py", line 720, in get
    resp = self.client.api.inspect_container(container_id)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/api/container.py", line 745, in inspect_container
    self._get(self._url("/containers/{0}/json", container)), True
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/api/client.py", line 216, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/home/ubuntu/.virtualenvs/refinery-platform/lib/python2.7/site-packages/docker/errors.py", line 30, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
NotFound: 404 Client Error: Not Found ("No such container: asdf")

Expected behavior

No internal server error

Notes

This results in numerous error report emails when these URLs are accessed by indexing bots like the google-bot.

@mccalluc
Copy link
Member

mccalluc commented Sep 5, 2017

Plan is to capture the error in djanago_docker, render a friendlier page (perhaps status 503?) and on that page have either a meta or js refresh so the client will ping until the visualization is available.

This replaces #2074.

@mccalluc
Copy link
Member

With #2100, the user will now see the please-wait page... even if they just have a gibberish url. We have no way to tell right now if what they've provided is a container that hasn't quite started, or something they invented. -> Down the road, we'll probably need to keep track of state in a db (particularly if we want to wake up containers that have been paused.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants