Error: Could not find schema with key xxxxxx in any repository

Dears,
i have this problem.

“errors”:[{“level”:“error”,“message”:“error: Could not find schema with key iglu:com.yolito/login/jsonschema/1-0-0 in any repository, tried:\n level: "error"\n repositories: ["Repository schemas [HTTP]","Iglu Central [HTTP]","Iglu Client Embedded [embedded]"]\n”}]

And my iglu_resolver has the following configuration:

{
  "schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
  "data": {
    "cacheSize": 1000,
    "repositories": [
      {
        "name": "Iglu Central",
        "priority": 0,
        "vendorPrefixes": [ "com.snowplowanalytics" ],
        "connection": {
          "http": {
            "uri": "http://iglucentral.com"
          }
        }
      },
      {
        "name": "Repository schemas Interno",
        "priority": 1,
        "vendorPrefixes": [ "XXXXX" ],
        "connection": {
          "http": {
            "uri": "https://XXXXX"
          }
        }
      },
      {
        "name": "Repository schemas cliente1 ",
        "priority": 2,
        "vendorPrefixes": [ "XXXXX" ],
        "connection": {
          "http": {
            "uri": "https:XXXXX"
          }
        }
      }
    ]
  }
}

These diagrams I have stored on GCP and when I add a 3rd repository I get the following error.

I need your help please.

@Alexis_Romo, the error you are getting does not seem to correspond to the Iglu servers you have in the Iglu configuration file.

It is expected to see “Iglu Central [HTTP]”,“Iglu Client Embedded [embedded]” in the message but you also have “Repository schemas” and do not have “Repository schemas Interno” and “Repository schemas cliente1”.

Are you sure you are running the pipeline with the Iglu configuration file with that content? Do you happen to confuse different configuration files?

Hi @ihor, thanks for your response.

I updated the repository but i have the new log:

errors":[{"level":"error","message":"error: Could not find schema with key iglu:com.yolito/login/jsonschema/1-0-0 in any repository, tried:\n level: \"error\"\n repositories: [\"Repository schemas Interno [HTTP]\",\"Iglu Central [HTTP]\",\"Iglu Client Embedded [embedded]\"]\n"}]

but as you see, doesn’t appear the “Repository schemas client1” and I have increased the size to , but just i not have solution.

@Alexis_Romo, can you access your repositories via the URI in your Iglu configuration file? You might have not set up the access correctly or have not uploaded the JSON schema to the correct location. I can see you use https for your repository. Do you have SSL certificate installed to access your Iglu repository via HTTPS protocol?

For example, if your Iglu server is https://acme.com, the JSON schema com.yolito/login/jsonschema/1-0-0 should be accessible via https://acme.com/schemas/com.yolito/login/jsonschema/1-0-0 (note schemas folder).

I’m having the same problem:

"errors":[{"level":"error","message":"error: Could not find schema with key iglu:com.pier/button_convite/jsonschema/1-0-0 in any repository, tried:\n level: \"error\"\n repositories: [\"Iglu Central [HTTP]\",\"Iglu Client Embedded [embedded]\",\"Pier [HTTP]\"]\n"}]

I’m running Kinesis Stream Collector, Kinesis Stream Enrich and the Iglu Server through the Docker images found on the snowplow-docker repository.

My resolver.json for the Stream Enrich looks like this:

    {
  "schema": "iglu:com.snowplowanalytics.iglu/resolver-config/jsonschema/1-0-1",
  "data": {
    "cacheSize": 500,
    "repositories": [
      {
       	"name": "Iglu Central",
        "priority": 0,
        "vendorPrefixes": [ "com.snowplowanalytics" ],
        "connection": {
          "http": {
            "uri": "http://iglucentral.com"
          }
	}
      },
      {
       	"name": "Pier",
        "priority": 1,
        "vendorPrefixes": [ "com.pier" ],
        "connection": {
          "http": {
            "uri": "http://ec2-xx-xx-xx-xx.sa-east-1.compute.amazonaws.com:8080"
          }
	}
      }
    ]
  }
}

I then run a POST request to create a new schema from a self describing JSON:

sudo curl -X POST \
  http://ec2-xx-xx-xx-xx.sa-east-1.compute.amazonaws.com:8080/api/schemas/pier/button_convite/jsonschema/1-0-0 \
  -H 'apikey: xxx-xxx-xxx-xxx-xxx' \
  -d '{
  "$schema": "http://ec2-xx-xx-xx-xx.sa-east-1.compute.amazonaws.com:8080/api/schemas/pier/button_convite/jsonschema/1-0-0",
  "description": "Schema for a click on Pedir Convite",
  "self": {
    "vendor": "com.pier",
    "name": "button_convite",
    "format": "jsonschema",
    "version": "1-0-0"
  },

  "type": "object",
  "properties": {
    "modelo": {
      "type": "string",
      "maxLength": 255
    },
    "memoria": {
      "type": "string",
      "maxLength": 255
    },
    "plano": {
      "type": "string",
      "maxLength": 255
    }
  },
  "minProperties":3,
  "required": ["modelo", "memoria", "plano"],
  "additionalProperties": false
}'

And then I track my events using this method:

snowplow('trackSelfDescribingEvent', {
              schema: 'http://ec2-xx-xx-xx-xx.sa-east-1.compute.amazonaws.com:8080/api/schemas/pier/button_convite/jsonschema/1-0-0',
              data: {
                  modelo: 'modelo x',
                  memoria: 'memoria y',
                  plano: 'plano z'
              }
          });

Can you guys help me find what’s wrong? Is it just a detail or am I completely lost here?

Hey @Alexandre_Rayes,

This one’s straightforward - when you reference the schema in your tracking you should use an Iglu path:

iglu:com.pier/button_convite/jsonschema/1-0-0

I follows the format iglu:{vendor}/{name}/{format (always jsonschema)}/{version}

Your Iglu resolver tells enrich what locations (ie look in this specific Iglu server instance) to use when looking for schemas, and the schema argument tells it the path within that location.

Best,

Hi @Colm
Thank you for you answer, but I actually found out that the error was a bit different.
I had to declare my Api key in my resolver.json file, right after the URI.
This made things work!