Connection refused error when trying to add apikey for local IGLU server on Snowplow mini

#1

I’m following the Snowplow Mini usage guide here:

I’m on Step 2.2, and as far as I know, I’ve followed it exactly, step by step.

When trying to update the api key with a UUID, it seems to be unable to connect to a server.

image

Any ideas?

0 Likes

#2

5433 will be the Postgres service so it sounds like it’s having trouble connecting there. I’d try reboot the machine and if that doesn’t come up you may need to have a look at the logs for that container.

0 Likes

#3

I resolved it by using the Control Plane to restart all services. Elastic Search and the Iglu server were also not working. It seems like this step maybe belongs in the docs?

I’m now trying to make sense of step #5 below in 2.3 - Generating a pair of read/write API keys for the local Iglu schema registry. What vendor prefix should I enter? I didn’t see any other mention of a vendor prefix earlier in the guide.

  1. Navigate to http://<public dns>/iglu-server
  2. Input the super API key set up in step 2.2 in the input box in the top right corner
  3. Develop the keygen section
  4. Develop the POST /api/auth/keygen operation
  5. Input the appropriate vendor_prefix for this API key
  6. Click Try it out!

Frankly, the Mini usage guide could use some work. I stumbled across Snowplow Mini while trying to make sense of the primary setup guide - how to set up the Enrich with Kinesis and thought Mini might be a better way to get a POC going.

I’ll happily submit a pull request to clean up the Mini usage guide as long as there aren’t any plans to deprecate Snowplow Mini anytime soon.

0 Likes

#4

Generally all the services should start when docker-compose brings them up. If you’ve got some error logs it might be worth filing a Github issue so it can be recreated and fixed.

For vendor prefix you should be able to use * when requesting the API keys (at least this is what Igluctl uses internally when requesting keys).

Not sure around updating the docs but it might be a good excuse to potentially move over the documentation from Github Wiki to the read the docs site? @oguzhanunlu

0 Likes

#5

Hi @jason,

Sorry for the late reply.

Mini runs all components except user interface through docker. As @mike pointed, restart usually solves service start issues & check the logs if the issue continues and please let us know by opening an issue.

A small note; a common reason of service failures is not noticing that Mini 0.6.0 needs more resources than its’ previous versions. See the related wiki on new requirements.

Thanks for pointing the issues with the documentation. Mini’s documentation requires familiarity with Iglu Server and how it uses API keys for authentication however this isn’t explicitly pointed.

Briefly, Iglu Server uses an authoritative or root key called Super Api Key which is used to create vendor specific api keys (read & write keys), which are used to upload/update (via write key) or read (via read key) schemas. Before using the Iglu Server bundled with Mini, one needs to have a super api key so that s/he can get started with using the Iglu Server. If you are curious, super api keys always use * as vendor behind the scenes , Mini’s Control Plane asks for only a UUID to be used as super api key, so no need to enter * to anywhere neither in Control Plane nor in Iglu Server’s Swagger UI.

Coming to the actual question on which vendor prefix you should enter; enter a prefix of the vendor of the self describing json schemas you want to manage with Iglu Server. The vendor specific api keys I mentioned above let you manage schemas whose vendor field matches with the vendor prefix used to create the api key. Take a look at the related wiki page for a detailed explanation and an example in the 4th paragraph. In short, we have a read&write key pair for each vendor we have schema for.

We are working on our documentation overhaul by unifying all of our documentation at https://docs.snowplowanalytics.com/ , you can expect to see a renewed documentation soon.

There is no plan to deprecate Snowplow Mini. We appreciate if you could contribute in any way.

Thanks,
Oguzhan

0 Likes