Project

Profile

Help

Issue #4321

500 error when content path does not exist

Added by daviddavis 9 months ago. Updated 6 months ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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

Duplicates Pulp - Issue #4278: Content app fails with unhandled exception, where it should 404 MODIFIED Actions

History

#1 Updated by mdellweg 9 months ago

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

The stacktrace however not.

Maybe it is still related?

#2 Updated by daviddavis 9 months ago

  • Status changed from NEW to CLOSED - DUPLICATE

I did a pull and it fixed the problem.

#3 Updated by daviddavis 9 months ago

  • Duplicates Issue #4278: Content app fails with unhandled exception, where it should 404 added

#4 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#5 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF