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

ERROR: Could not validate credentials to Confluent Cloud Schema Registry. Please troubleshoot #1102

Open
NeilBumford opened this issue May 19, 2022 · 10 comments

Comments

@NeilBumford
Copy link

NeilBumford commented May 19, 2022

Hi,

I'm getting the above error when trying to run the spring boot example.

I believe I have the Schema Registry set up and I've generated a schema registry key.

Here's my java.config:

`bootstrap.servers=pkc-l6wr6.europe-west2.gcp.confluent.cloud:9092
security.protocol=SASL_SSL
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='[REMOVED KEY]' password='[REMOVED VALUE]';
sasl.mechanism=PLAIN

client.dns.lookup=use_all_dns_ips

session.timeout.ms=45000

acks=all

schema.registry.url=https://psrc-kk5gg.europe-west3.gcp.confluent.cloud
basic.auth.credentials.source=USER_INFO
schema.registry.basic.auth.user.info=[REMOVED KEY]:[REMOVED VALUE]`

I guess I've missed something?

@ybyzek
Copy link
Contributor

ybyzek commented May 19, 2022

@NeilBumford can you validate the credentials with something like the following (substitute your values):

curl -u <SR API KEY>:<SR API SECRET> https://<SR ENDPOINT>/subjects

@NeilBumford
Copy link
Author

Hi,

It came back with:

[]

I guess that's a fail, then?

@ybyzek
Copy link
Contributor

ybyzek commented May 19, 2022

[] should be a pass and indicates no subjects are defined.

A fail would have resulted in some kind of more obvious auth error, e.g.

{"error_code":401,"message":"Unauthorized"}                                                                                                                       

@NeilBumford
Copy link
Author

OK, so am I missing something?

@ybyzek
Copy link
Contributor

ybyzek commented May 19, 2022

@NeilBumford if this is for Springboot, the input configuration file should be of the syntax shown here: https://github.com/confluentinc/examples/blob/7.1.0-post/clients/docs/includes/configs/cloud/springboot-sr.config

@NeilBumford
Copy link
Author

NeilBumford commented May 19, 2022

OK. Are you referring to java.config when you say "input configuration file" or should I have a springboot-sr.config file somewhere? I'm not very experienced with spring boot.

@ybyzek
Copy link
Contributor

ybyzek commented May 19, 2022

Whatever the file is that is input to the application, and yes, in your case it looks like you've named it java.config

@NeilBumford
Copy link
Author

Just following the docs :)

Hmmm. Same error.

@NeilBumford
Copy link
Author

There's this line above the error text:

curl: no URL specified!

@NeilBumford
Copy link
Author

Don't know if this is relevant but this property in java_producer_consumer.delta isn't being written to:

schema.registry.basic.auth.user.info

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

No branches or pull requests

2 participants