devkanro edited a comment on issue #5349:
URL: https://github.com/apache/skywalking/issues/5349#issuecomment-679808855
After some debug, I found the cause of the bug.
The Jetcd Client builder will use `ClientConnectionManager` to build
`ManagedChannel` with `SmartNameResolverFactory`.
When the authority has not been set, SmartNameResolverFactory will be
initialized with an empty string authority.
```Java
// io.etcd.jetcd.ClientConnectionManager
channelBuilder.nameResolverFactory(
forEndpoints(
Util.supplyIfNull(builder.authority(), () -> ""),
builder.endpoints(),
Util.supplyIfNull(builder.uriResolverLoader(),
URIResolverLoader::defaultLoader)));
```
\>\> @beiwangnull
you can set the value of authority explicitly to avoid the bug for now.
```Kotlin
val client = Client.builder()
.sslContext(context)
.endpoints("http://server-host:2712")
.authority("etcd") // Must be a SAN in server cert if
<server-host> is not in cert
.build()
```
Reference: etcd-io/jetcd#55, etcd-io/jetcd#652, grpc/grpc-java#2662
\>\> @wu-sheng
We need to discuss how we do if we can't get authority from
`ManagedChannel`, the name resolver could override the original value of
authority.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]