Project

Profile

Help

Issue #4321

closed

500 error when content path does not exist

Added by daviddavis almost 6 years ago. Updated over 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

I am running the content app:

gunicorn pulpcore.content:server --bind 'localhost:8080' --worker-class 'aiohttp.GunicornWebWorker' -w 2 >> ~/content_app.log

When I try to curl a path that does not exist:

$ http GET http://localhost:8080/pulp/content/this/path/doesn/not/exist
HTTP/1.1 500 Internal Server Error
Connection: close
Content-Length: 141
Content-Type: text/html; charset=utf-8
Date: Mon, 14 Jan 2019 21:02:29 GMT
Server: Python/3.6 aiohttp/3.4.4

<html><head><title>500 Internal Server Error</title></head><body><h1>500 Internal Server Error</h1>Server got itself in trouble</body></html>

The gunicorn stacktrace:

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
    resp = await handler(request)
  File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 61, in stream_content
    return await self._match_and_stream(path, request)
  File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 156, in _match_and_stream
    distribution = Handler._match_distribution(path)
  File "/home/vagrant/devel/pulp/pulpcore/content/handler.py", line 105, in _match_distribution
    raise PathNotResolved(path)
pulpcore.content.handler.PathNotResolved: this/path/doesn/not/exist

Related issues

Is duplicate of Pulp - Issue #4278: Content app fails with unhandled exception, where it should 404CLOSED - CURRENTRELEASEmdellwegActions
Actions #1

Updated by mdellweg almost 6 years ago

The symptom looks similar to:
https://pulp.plan.io/issues/4278

The stacktrace however not.

Maybe it is still related?

Actions #2

Updated by daviddavis almost 6 years ago

  • Status changed from NEW to CLOSED - DUPLICATE

I did a pull and it fixed the problem.

Actions #3

Updated by daviddavis almost 6 years ago

  • Is duplicate of Issue #4278: Content app fails with unhandled exception, where it should 404 added
Actions #4

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #5

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)

Also available in: Atom PDF