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

EDC 0.4.1: Fetch Catalog with Bad Gateway / Method Not Allowed #447

Closed
DrDanielMetz opened this issue Jun 1, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@DrDanielMetz
Copy link

Describe the bug

Fetching catalog with EDC 0.4.1 results in a bad gateway (502) or method not allowed (405) error.

To Reproduce

  1. Deploy an EDC 0.4.1; in my case an update from EDC 0.3.0.
  2. Execute the following POST call:

URL: {{CONSUMER_DATAMGMT_URL}}/catalog/request
Body: `{

"@context": {
    "vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"protocol": "dataspace-protocol-http",
"providerUrl": "{{PROVIDER_EDC_URL}}/api/v1/dsp",
"querySpec": {
    "offset": 0,
    "limit": 100,
    "filter": "",
    "range": {
        "from": 0,
        "to": 100
    },
    "sortField": "",
    "criterion": ""
}}`
  1. The provider EDC control plane returns an HTTP status code 502 (bad gateway). In the error message it, however, says http status code 405 (method not allowed).

Example:
[ { "message": "org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://edc.apps.int.ocp.cx.dps.oncite.cloud/api/v1/dsp/catalog/request, headers=[Content-Type:application/json, Authorization:ey...]} was not successful but was 405: <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=ISO-8859-1\"/>\n<title>Error 405 HTTP method POST is not supported by this URL</title>\n</head>\n<body><h2>HTTP ERROR 405 HTTP method POST is not supported by this URL</h2>\n<table>\n<tr><th>URI:</th><td>/api/v1/dsp/catalog/request</td></tr>\n<tr><th>STATUS:</th><td>405</td></tr>\n<tr><th>MESSAGE:</th><td>HTTP method POST is not supported by this URL</td></tr>\n<tr><th>SERVLET:</th><td>org.eclipse.jetty.servlet.ServletHandler$Default404Servlet-7e8279e5</td></tr>\n</table>\n<hr/><a href=\"https://eclipse.org/jetty\">Powered by Jetty:// 11.0.15</a><hr/>\n\n</body>\n</html>\n", "type": "BadGateway", "path": null, "invalidValue": null } ]

In the above example it says that the endpoint https://edc.apps.int.ocp.cx.dps.oncite.cloud/api/v1/dsp/catalog/request does not support the POST method.

Expected behavior

It is expected that the endpoint {{PROVIDER_EDC_URL}}/api/v1/dsp/catalog/request accepts POST calls, so that the catalog can be fetched.

Screenshots/Error Messages

[ { "message": "org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://edc.apps.int.ocp.cx.dps.oncite.cloud/api/v1/dsp/catalog/request, headers=[Content-Type:application/json, Authorization:ey...]} was not successful but was 405: <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=ISO-8859-1\"/>\n<title>Error 405 HTTP method POST is not supported by this URL</title>\n</head>\n<body><h2>HTTP ERROR 405 HTTP method POST is not supported by this URL</h2>\n<table>\n<tr><th>URI:</th><td>/api/v1/dsp/catalog/request</td></tr>\n<tr><th>STATUS:</th><td>405</td></tr>\n<tr><th>MESSAGE:</th><td>HTTP method POST is not supported by this URL</td></tr>\n<tr><th>SERVLET:</th><td>org.eclipse.jetty.servlet.ServletHandler$Default404Servlet-7e8279e5</td></tr>\n</table>\n<hr/><a href=\"https://eclipse.org/jetty\">Powered by Jetty:// 11.0.15</a><hr/>\n\n</body>\n</html>\n", "type": "BadGateway", "path": null, "invalidValue": null } ]

Context Informations

Add any other context about the probleme here.

  • Used version: EDC control plane and data plane with PostgreSQL and Azure Key Vault extension in version 0.4.1.
  • OS: Open Shift

Possible Implementation

No idea.

@DrDanielMetz DrDanielMetz added the bug Something isn't working label Jun 1, 2023
@DrDanielMetz
Copy link
Author

Problem is solved.

Reason was that the configuration edc.dsp.callback.address was not properly set in EDC control plane config map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant