Git Product home page Git Product logo

Comments (7)

skydeep-9 avatar skydeep-9 commented on August 22, 2024

I have tried using version 1.0.0 and 1.0.1 both for software.amazon.glue:schema-registry-serde

from aws-glue-schema-registry.

blacktooth avatar blacktooth commented on August 22, 2024

Hi,

Are you able to invoke Glue Schema Registry APIs from the environment / server where you are running the above producer? You can try using the AWS CLI to test it.

aws glue list-registries --region us-west-2

aws glue get-schema-version --schema-id "RegistryName=dtc_avro_registry,SchemaName=pixel_events_organic" --schema-version-number "VersionNumber=1"

The schema registry SerDe library invokes Glue APIs as part of serialization / deserialization.

from aws-glue-schema-registry.

skydeep-9 avatar skydeep-9 commented on August 22, 2024

Yes, I was able to

aws glue list-registries --region us-west-2

{
  "Registries": [
  {
    "RegistryName": "dtc_avro_registry",
    "RegistryArn": "arn:aws:glue:us-west-2:012732009581:registry/dtc_avro_registry",
    "Description": "dtc Avro registry",
    "Status": "AVAILABLE",
    "CreatedTime": "2021-03-10T20:17:20.992Z",
    "UpdatedTime": "2021-03-10T20:17:20.992Z"
  }
  ]
 }
aws glue get-schema-version --schema-id "RegistryName=dtc_avro_registry,SchemaName=pixel_events_organic" --schema-version-number "VersionNumber=1"
An error occurred (EntityNotFoundException) when calling the GetSchemaVersion operation: Schema is not found. RegistryName: dtc_avro_registry, SchemaName: pixel_events_organic, SchemaArn: null

from aws-glue-schema-registry.

blacktooth avatar blacktooth commented on August 22, 2024

Do you mind sharing more information on what environment you are using to call SchemaRegistry service? From the error message, it looks like a SSL issue. Are you able to invoke other AWS services from this environment?

from aws-glue-schema-registry.

blacktooth avatar blacktooth commented on August 22, 2024

We haven't heard back. Please feel free to re-open if you are still facing this.

from aws-glue-schema-registry.

k-chainalysis avatar k-chainalysis commented on August 22, 2024

I had this same error calling Schema Registry from Lambda execution, and sure enough the execution role did not have IAM permissions to call Schema Registry. Thanks for the tip!

from aws-glue-schema-registry.

Paolo-de-vathaire avatar Paolo-de-vathaire commented on August 22, 2024

@blacktooth Sorry to revive this old thread but it seems appropriate, I'm facing the same error as @skydeep-9.
Using aws glue list-registries --region eu-central-1 , I can also get the schema by id but I need to add the region to the command you provided, otherwise aws cli doesn't find it and returns EntityNotFoundException.
I could work around that using aws CLI by setting my default region to eu-central-1 but not with this lib.
Looking at the AWSSchemaRegistryClient.getSchemaVersionIdByDefinition method, it seems region is not sent as part of the query.

I'm correctly setting schema, registry and region as properties :

configProps.put(AWSSchemaRegistryConstants.AWS_REGION, "eu-central-1");
configProps.put(AWSSchemaRegistryConstants.REGISTRY_NAME, "XXX");
configProps.put(AWSSchemaRegistryConstants.SCHEMA_NAME, "XXX");

I'm using SASL_SSL with AWS_MSK_IAM to authenticate to AWS services.
Also this is the dependency I'm using to access Glue registry :

<dependency>
            <groupId>software.amazon.glue</groupId>
            <artifactId>schema-registry-kafkastreams-serde</artifactId>
            <version>1.1.18</version>
</dependency>

Is that a simple bug or did I miss something ?

EDIT :
Here is the stacktrace I get :

com.amazonaws.services.schemaregistry.exception.AWSSchemaRegistryException: Failed to auto-register schema. Auto registration of schema is not enabled.
	at com.amazonaws.services.schemaregistry.common.SchemaByDefinitionFetcher.getORRegisterSchemaVersionId(SchemaByDefinitionFetcher.java:81)
	at com.amazonaws.services.schemaregistry.serializers.GlueSchemaRegistrySerializationFacade.getOrRegisterSchemaVersion(GlueSchemaRegistrySerializationFacade.java:86)
	at com.amazonaws.services.schemaregistry.serializers.GlueSchemaRegistryKafkaSerializer.serialize(GlueSchemaRegistryKafkaSerializer.java:113)
	at org.apache.kafka.common.serialization.Serializer.serialize(Serializer.java:62)
	at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:1000)
	at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:947)
	at org.springframework.kafka.core.DefaultKafkaProducerFactory$CloseSafeProducer.send(DefaultKafkaProducerFactory.java:1050)
	at org.springframework.kafka.core.KafkaTemplate.doSend(KafkaTemplate.java:799)
	at org.springframework.kafka.core.KafkaTemplate.observeSend(KafkaTemplate.java:768)
	at org.springframework.kafka.core.KafkaTemplate.send(KafkaTemplate.java:551)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: com.amazonaws.services.schemaregistry.exception.AWSSchemaRegistryException: Failed to get schemaVersionId by schema definition for schema name = XXX 
	at com.amazonaws.services.schemaregistry.common.AWSSchemaRegistryClient.getSchemaVersionIdByDefinition(AWSSchemaRegistryClient.java:155)
	at com.amazonaws.services.schemaregistry.common.SchemaByDefinitionFetcher$SchemaDefinitionToVersionCache.load(SchemaByDefinitionFetcher.java:110)
	at com.amazonaws.services.schemaregistry.common.SchemaByDefinitionFetcher$SchemaDefinitionToVersionCache.load(SchemaByDefinitionFetcher.java:106)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3570)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2312)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2189)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2079)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4011)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4034)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5010)
	at com.amazonaws.services.schemaregistry.common.SchemaByDefinitionFetcher.getORRegisterSchemaVersionId(SchemaByDefinitionFetcher.java:74)
	... 14 more
Caused by: software.amazon.awssdk.services.glue.model.EntityNotFoundException: Schema version is not found. (Service: Glue, Status Code: 400, Request ID: 6b7b1216-ea03-4204-a46b-77b22305d02c)

from aws-glue-schema-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.