Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Kafka not working with Schema Registry on HDP 3.1

Highlighted

Kafka not working with Schema Registry on HDP 3.1

New Contributor

Hi all, I am getting exception while running Kafka with Schema Registry on HDP 3.1 cluster the same code is working fine on HDP 2.6.5.


Component version used in HDP 2.6.5

Kafka Client : 0.10.2.0

Schema Registry Client : 0.5.1

Jersey : 2.17


Component version used in HDP 3.1

Kafka Client : 2.0.0

Schema Registry Client : 0.7.0

Jersey : 2.23.2


Exception Stack Trace as seen on Yarn:


javax.ws.rs.BadRequestException: HTTP 400 Bad Request

at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1011) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:819) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:701) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.23.2.jar:na]

at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.23.2.jar:na]

at org.glassfish.jersey.internal.Errors.process(Errors.java:228) ~[jersey-common-2.23.2.jar:na]

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444) ~[jersey-common-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:697) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:448) ~[jersey-client-2.23.2.jar:na]

at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:349) ~[jersey-client-2.23.2.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient$16.run(SchemaRegistryClient.java:1116) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient$16.run(SchemaRegistryClient.java:1113) ~[schema-registry-client-0.7.0.jar:na]

at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_212]

at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_212]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.postEntity(SchemaRegistryClient.java:1113) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.doRegisterSchemaMetadata(SchemaRegistryClient.java:416) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.addSchemaMetadata(SchemaRegistryClient.java:398) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.registerSchemaMetadata(SchemaRegistryClient.java:390) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.addSchemaVersion(SchemaRegistryClient.java:480) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient.addSchemaVersion(SchemaRegistryClient.java:468) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.serde.AbstractSnapshotSerializer.serialize(AbstractSnapshotSerializer.java:56) ~[schema-registry-client-0.7.0.jar:na]

at com.hortonworks.registries.schemaregistry.serdes.avro.kafka.KafkaAvroSerializer.serialize(KafkaAvroSerializer.java:137) ~[schema-registry-serdes-0.7.0.jar:na]

at org.apache.kafka.common.serialization.ExtendedSerializer$Wrapper.serialize(ExtendedSerializer.java:65) ~[kafka-clients-2.0.0.jar:na]

at org.apache.kafka.common.serialization.ExtendedSerializer$Wrapper.serialize(ExtendedSerializer.java:55) ~[kafka-clients-2.0.0.jar:na]

at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:841) ~[kafka-clients-2.0.0.jar:na]

at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:803) ~[kafka-clients-2.0.0.jar:na]

at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:690) ~[kafka-clients-2.0.0.jar:na]


Exception Stack Trace as seen on Schema Registry Server :

ERROR [2019-07-18 09:28:51.977] [dw-19635 - POST /api/v1/schemaregistry/schemas/] c.h.r.s.w.SchemaRegistryResource - Expected parameter is invalid

java.lang.IllegalArgumentException: Parameter Schema name is null

at com.hortonworks.registries.schemaregistry.webservice.BaseRegistryResource.checkValueAsNullOrEmpty(BaseRegistryResource.java:83)

at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.lambda$addSchemaInfo$0(SchemaRegistryResource.java:373)

at com.hortonworks.registries.schemaregistry.webservice.BaseRegistryResource.handleLeaderAction(BaseRegistryResource.java:77)

at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.addSchemaInfo(SchemaRegistryResource.java:369)

at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)

at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)

at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)

at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

at org.glassfish.jersey.internal.Errors.process(Errors.java:267)

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)

at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)

at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)

at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)

at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)