console icon indicating copy to clipboard operation
console copied to clipboard

Failed to get schemas from apicurio

Open SergiioDev opened this issue 8 months ago • 4 comments

Hello, redpanda console is throwing 502 when retrieving the schemas from apicuruo registry without using the confluent compatibility endpoint. Failed to retrieve schema registry types from the schema registry: failed to get compatibility: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/config

Logs {"level":"error","ts":"2025-04-27T11:29:36.828Z","msg":"Sending REST error","route":"/api/schema-registry/schemas/types","method":"GET","status_code":502,"remote_address":"127.0.0.1:56350","public_error":"Failed to retrieve schema registry types from the schema registry: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/schemas/types","error":"RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/schemas/types"} {"level":"error","ts":"2025-04-27T11:29:36.830Z","msg":"Sending REST error","route":"/api/schema-registry/config","method":"GET","status_code":502,"remote_address":"127.0.0.1:56368","public_error":"Failed to retrieve schema registry types from the schema registry: failed to get compatibility: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/config","error":"failed to get compatibility: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/config"} {"level":"error","ts":"2025-04-27T11:29:36.833Z","msg":"Sending REST error","route":"/api/schema-registry/mode","method":"GET","status_code":502,"remote_address":"127.0.0.1:56372","public_error":"Failed to retrieve schema registry mode from the schema registry: failed to get mode: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/mode","error":"failed to get mode: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/mode"} {"level":"error","ts":"2025-04-27T11:29:36.835Z","msg":"Sending REST error","route":"/api/schema-registry/subjects","method":"GET","status_code":502,"remote_address":"127.0.0.1:56392","public_error":"Failed to retrieve subjects from the schema registry: RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/subjects","error":"RESTEASY003210: Could not find resource for full path: http://<URL>/apis/registry/v2/subjects"}

Redpanda Console version 3.0.0

Redpanda Chart config version This is the schema registry config of the redpanda console chart schemaRegistry: enabled: true urls: ["http://<URL>/apis/registry/v2"]

Redpanda version Redpanda Console (Platform Version v25.1) - (built April 07, 2025) - 56482c3

SergiioDev avatar Apr 27 '25 11:04 SergiioDev

I believe we face a similar issue, in our case we are using Aiven's schema registry implementation karapace.

We see a lot of warnings about being unable to fetch the subject-level compatibility: {"level":"warn","ts":"2025-05-12T15:10:27.135Z","msg":"failed to get subject config","subject":"dev-some-topic-v1-value","error":"Subject 'dev-some-topic-v1-value' does not have subject-level compatibility configured"}

For some subjects (my assumption is that this mostly applies for soft-deleted schemas) we experience errors of the following form: {"level":"error","ts":"2025-05-12T15:10:41.283Z","msg":"Sending REST error","route":"/api/schema-registry/subjects/dev-another-topic-v1-value/versions/all","method":"GET","status_code":404,"remote_address":"10.5.4.12","public_error":"Requested subject does not exist","error":"failed to retrieve all sch versions for subject \"dev-another-topic-v1-value\": Subject dev-another-topic-v1-value' not found."}

The issue appears with RedPanda Console version 3.1.0 and 3.0.0.

gscher avatar May 12 '25 15:05 gscher

@weeco any news on it?

brunopadz avatar May 23 '25 16:05 brunopadz

Some of these missing endpoints are not required in Console, so we can fix this, however this one from the author of this issue is worrysome:

{"level":"error","ts":"2025-04-27T11:29:36.835Z","msg":"Sending REST error","route":"/api/schema-registry/subjects","method":"GET","status_code":502,"remote_address":"127.0.0.1:56392","public_error":"Failed to retrieve subjects from the schema registry: RESTEASY003210: Could not find resource for full path: http:///apis/registry/v2/subjects","error":"RESTEASY003210: Could not find resource for full path: http:///apis/registry/v2/subjects"}

The GET /subjects request is fundamental for Console as well. I'm not familiar with the other implementations of the schema registry, but if this endpoint is not supported I'd flag this as a won't do.

As far as I remember from previous issues it's the /types that is unsupported which we could make an optional request?

--

@gscher Do you mind creating a separate ticket? I think your issue is not necessarily an incompatible change, even though I thought that we had fixed the latter issue (getting all versions for a soft-deleted subject - we didn't add the param that opts into retrieving showSoftDeleted)

weeco avatar May 23 '25 17:05 weeco

@weeco so far I wasn't able to reproduce the error after cleaning up some old soft-deleted schemas. Once the issue resurfaces, I will create a separate ticket.

For the other issue we have seen (i.e., warnings about missing subject-level compatibility), I have created a PR that should hopefully fix it: https://github.com/redpanda-data/console/pull/1774

gscher avatar May 26 '25 07:05 gscher