couchbaselabs / quarkus-couchbase

Quarkus Couchbase Extension
Apache License 2.0
7 stars 3 forks source link

Add a dns-serv configuration option #2

Closed jclingan closed 3 years ago

jclingan commented 3 years ago

At the moment, only connectionString, username, and password are configurable options. When following the example in this readme, I get a dns-srv error even though the app works:

 DNS SRV lookup failed (null), trying to bootstrap from given hostname directly.: java.lang.NullPointerException

This confuses developers new to Couchbase, especially with Quarkus continuous testing and live reload. Two things:

  1. Please add a quarkus.couchbase.dns-serv-enabled option so I can avoid this error (I'd likely set it to false when using dev mode via %dev.quarkus.couchbase.dns-serv-enabled=false). Also, name the property whatever you feel is the proper name :-)
  2. If #1 is implemented, please auto-configure this option or default to false in dev mode, maybe test mode too.

I admit that I'm still learning Couchbase and that I don't fully understand the impact of this request, but my initial developer experience was hampered due to this issue.

ingenthr commented 3 years ago

Hey @jclingan, in this case it looks like it might just be that the connection string isn't valid, so more of a bug in the README? Did you do it this way @programmatix because of the escaping that'd be required?

I'd agree that one shouldn't see that kind of whining on initial startup. There's probably a lower level bug here since we should be validating.

Thanks for reporting!

programmatix commented 3 years ago

@jclingan we're not having much luck replicating the NullPointerException here. Could you let me know what connectionString setting you're using please?

jclingan commented 3 years ago

The connection string is "localhost". Keep in mind that I am a complete newbie, and I just followed the readme. It also took me a bit to figure out how to handle credentials. I think all of this is because I am "jumping the gun" a bit and trying this out before a Quarkus guide has been written. This somewhat ties into the value of a Couchbase Dev Service. #1

daschl commented 3 years ago

@jclingan can you share the logs when you see the NPE? We tried hard but could not reproduce it ... the logs would help I think (even better if at debug)

jclingan commented 3 years ago

OK, now I can't reproduce it either. I am going to close this issue and will re-open it if I can reproduce it.

jclingan commented 3 years ago

Grrr, meant to close issue with last comment :-)