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

io.apicurio.registry.rest.client.exception.RestClientException: PKIX path building failed: #2574

Closed
mani-nandipaati opened this issue Jun 17, 2022 · 1 comment · Fixed by #2622

Comments

@mani-nandipaati
Copy link

Hi Team,

I am using latest apicurio docker image to start the registry in openshift. After successful deployment, I am able to add/modify/delete the schema using the https://<host_name>>/apis/registry/v2.

I am also trying to use Apicurio registry with kafka. I am getting the below error(please find below Error1) while sending messages to kafka. I tried to set (apicurio.registry.request.ssl.truststore.location, apicurio.registry.request.ssl.truststore.password, apicurio.registry.request.ssl.truststore.type) properties. When I set these properties, I am getting the another error(please find below Error2) because in RegistryClientFactory.java, property keys are getting translated.

Error1 :
io.apicurio.registry.rest.client.exception.RestClientException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at io.apicurio.registry.rest.client.impl.ErrorHandler.parseError(ErrorHandler.java:95) ~[apicurio-registry-client-2.2.4.Final.jar!/:?]
at io.apicurio.rest.client.JdkHttpClient.sendRequest(JdkHttpClient.java:205) ~[apicurio-common-rest-client-jdk-0.1.11.Final.jar!/:?]
at io.apicurio.registry.rest.client.impl.RegistryClientImpl.getArtifactMetaData(RegistryClientImpl.java:96) ~[apicurio-registry-client-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.lambda$resolveSchemaByArtifactReferenceCached$5(DefaultSchemaResolver.java:277) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.lambda$getValue$0(ERCache.java:132) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.retry(ERCache.java:171) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.getValue(ERCache.java:131) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.getByArtifactReference(ERCache.java:101) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchemaByArtifactReferenceCached(DefaultSchemaResolver.java:271) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchemaByCoordinates(DefaultSchemaResolver.java:159) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchema(DefaultSchemaResolver.java:104) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.serde.AbstractKafkaSerializer.serialize(AbstractKafkaSerializer.java:83) ~[apicurio-registry-serde-common-2.2.4.Final.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:926) ~[kafka-clients-2.7.2.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:886) ~[kafka-clients-2.7.2.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:774) ~[kafka-clients-2.7.2.jar!/:?]

Error2:

java.lang.IllegalArgumentException: invalid header name: ""
at jdk.internal.net.http.common.Utils.newIAE(Utils.java:280) ~[java.net.http:?]
at jdk.internal.net.http.HttpRequestBuilderImpl.checkNameAndValue(HttpRequestBuilderImpl.java:107) ~[java.net.http:?]
at jdk.internal.net.http.HttpRequestBuilderImpl.header(HttpRequestBuilderImpl.java:126) ~[java.net.http:?]
at jdk.internal.net.http.HttpRequestBuilderImpl.header(HttpRequestBuilderImpl.java:43) ~[java.net.http:?]
at java.util.HashMap.forEach(HashMap.java:1337) ~[?:?]
at io.apicurio.rest.client.JdkHttpClient.sendRequest(JdkHttpClient.java:165) ~[apicurio-common-rest-client-jdk-0.1.11.Final.jar!/:?]
at io.apicurio.registry.rest.client.impl.RegistryClientImpl.getArtifactMetaData(RegistryClientImpl.java:96) ~[apicurio-registry-client-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.lambda$resolveSchemaByArtifactReferenceCached$5(DefaultSchemaResolver.java:277) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.lambda$getValue$0(ERCache.java:132) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.retry(ERCache.java:171) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.getValue(ERCache.java:131) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.ERCache.getByArtifactReference(ERCache.java:101) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchemaByArtifactReferenceCached(DefaultSchemaResolver.java:271) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchemaByCoordinates(DefaultSchemaResolver.java:159) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchema(DefaultSchemaResolver.java:104) ~[apicurio-registry-schema-resolver-2.2.4.Final.jar!/:?]
at io.apicurio.registry.serde.AbstractKafkaSerializer.serialize(AbstractKafkaSerializer.java:83) ~[apicurio-registry-serde-common-2.2.4.Final.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:926) ~[kafka-clients-2.7.2.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:886) ~[kafka-clients-2.7.2.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:774) ~[kafka-clients-2.7.2.jar!/:?]

@carlesarnal carlesarnal linked a pull request Jul 11, 2022 that will close this issue
@carlesarnal
Copy link
Member

Thanks for raising this. I have created a PR that will solve this issue #2622.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants