question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unauthorized; error code: 401 when using schema registry basic auth

See original GitHub issue

Issue: when using confluent cloud hosted schema registry users are getting the following error:

Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Unauthorized; error code: 401

The reason for this is an old version used:

https://github.com/wepay/kafka-connect-bigquery/blob/1.2.0/build.gradle#L15

    ioConfluentVersion = '5.1.1'

In the above version we didn’t have the basic auth to the Schema registry, with this in mind the REST call will drop the authentication method and we will forever get error code 401.

To resolve this, you can recompile the code using the README steps, with simply using 5.3.1 in the file mentioned above.

To fix this we should PR a higher version to the above code.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
seagullmousecommented, Jul 22, 2020

We got this working by digging into the code. There are undocumented config options that made it work

"schemaRegistryClient.basic.auth.credentials.source": "USER_INFO",
"schemaRegistryClient.basic.auth.user.info": "username:password",
0reactions
alexhwoodscommented, Jun 25, 2020

And with our schema registry, when you just do

curl <url>/subjects/<subject>/versions

with the basic auth in the URL it works fine, which is why I’m confused

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka schema registry RestClientException: Unauthorized ...
Unauthorized ; error code: 401 is pretty clear cut. Have you checked the Schema Registry credentials directly using something like like curl ?...
Read more >
401 Unauthorized error while accessing Schema Registry ...
The problem we are facing is that every request sent to the schema registry is return with status code: 401 Unauthorized. However, if...
Read more >
Error 401 using KafkaIO to access to schema registry
Hello, i'm trying to connect to the schema registry using KafkaIO, ... RestClientException: Unauthorized; error code: 401 props.put("schema…
Read more >
Unauthorized; error code: 401 : r/apachekafka - Reddit
Hi,. I am reading a schema using SpecificAvroSerde from the kafka Confluent schema registry. but I am getting this error below:.
Read more >
Caused by: io.confluent.kafka.schemaregistry.client ... - ERROR
You might encounter a a 401 unauthorized error when connecting to Kafka.and writing to Kafka with Confluent schema registry using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found