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

Schema Registry configuration does not support clustered endpoint #886

Closed
akamensky opened this issue Sep 17, 2021 · 8 comments · Fixed by #888 or #1483
Closed

Schema Registry configuration does not support clustered endpoint #886

akamensky opened this issue Sep 17, 2021 · 8 comments · Fixed by #888 or #1483
Assignees
Labels
scope/backend status/accepted An issue which has passed triage and has been accepted type/bug Something isn't working
Milestone

Comments

@akamensky
Copy link

Describe the bug
All Kafka ecosystem tools support schema registry configuration in form http(s)://host.1name:8081,http(s)://host2.name:8081,...

This does not work with this UI, because it will try to do something like:

curl http(s)://host.1name:8081,http(s)://host2.name:8081,.../subjects

Which obviously crashes.

This is a bug since this contradicts to standard way of defining SR endpoints.

Set up
Docker

Steps to Reproduce
Steps to reproduce the behavior:

  1. Have clustered SR
  2. Use standard endpoint to clustered SR in configuration

Expected behavior
Works

Actual behavior

kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 03:37:06.271 [reactor-http-epoll-8] ERROR org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler - [66f50769]  500 Server Error for HTTP GET "/api/clusters/cluster/schemas"
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | org.springframework.web.reactive.function.client.WebClientResponseException$NotFound: 404 Not Found from GET http://host1.name:8081,http://host2.name:8081,http://host3.name:8081/subjects
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	at org.springframework.web.reactive.function.client.WebClientResponseException.create(WebClientResponseException.java:185) ~[spring-webflux-5.2.3.RELEASE.jar!/:5.2.3.RELEASE]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | Error has been observed at the following site(s):
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ 404 from GET http://host1.name:8081,http://host2.name:8081,http://host3.name:8081/subjects [DefaultWebClient]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ Handler com.provectus.kafka.ui.controller.SchemasController#getSchemas(String, ServerWebExchange) [DispatcherHandler]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ com.provectus.kafka.ui.config.ReadOnlyModeFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ com.provectus.kafka.ui.config.CustomWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
kafka_kafka-ui.1.iqy3stcgghfl@redacted    | 	|_ checkpoint ⇢ HTTP GET "/api/clusters/cluster/schemas" [ExceptionHandlingWebHandler]
@akamensky akamensky added the type/bug Something isn't working label Sep 17, 2021
@germanosin germanosin added this to the 0.2.1 milestone Sep 17, 2021
@germanosin
Copy link
Contributor

Hi, thanks for creating this issue. We'll try to fix it in the next minor version.

@germanosin germanosin linked a pull request Sep 17, 2021 that will close this issue
13 tasks
@akamensky
Copy link
Author

akamensky commented Sep 27, 2021

@germanosin Looks like it is still not fixed on master (based on Docker image from 2 days ago). It now accepts the comma-separated list, but it ONLY communicates with first host in the list. That is not how SchemaRegistry designed to work.

We had scheduled downtime on first node in cluster -- the entire stack works as expected, but kafka-ui could not read schemas.

@germanosin
Copy link
Contributor

@akamensky Thanks for checking this, this behaviour would be updated in the next versions.

@Haarolean Haarolean reopened this Oct 18, 2021
@Haarolean Haarolean modified the milestones: 0.2.1, 0.3 Oct 18, 2021
@Haarolean Haarolean added the status/accepted An issue which has passed triage and has been accepted label Oct 25, 2021
@Haarolean Haarolean modified the milestones: 0.3, 0.4 Dec 1, 2021
@jonas-grgt
Copy link
Contributor

jonas-grgt commented Jan 5, 2022

I agree with @akamensk the implementation does not add much value besides being able to parse and select the first registry URI in a comma separated list.

@akamensky I suppose you are expecting some kind of failover behavior ?

@jonas-grgt
Copy link
Contributor

Something struck me, what if the multiple registries have different authentication credentials ?

@akamensky
Copy link
Author

@jonasgeiregat I am not sure how that would work. We have them all unauthenticated. But I imagine in clustered setup (where each registry provides exactly same data and uses same topics as data storage) the chances of individual instances having different credentials is very low as that would be an issue for failover cases for any clients.

@Haarolean
Copy link
Contributor

We’re planning future improvements on this topic anyway. This should work fine for now.

@Haarolean Haarolean mentioned this issue Jul 7, 2022
13 tasks
@Haarolean
Copy link
Contributor

Haarolean commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/backend status/accepted An issue which has passed triage and has been accepted type/bug Something isn't working
Projects
None yet
4 participants