touchida commented on issue #5010:
URL: https://github.com/apache/kyuubi/issues/5010#issuecomment-1614194995
@pan3793
> Emm... so you expect that Kyuubi binds 0.0.0.0(all address), but use
another address for registering?
Yup!
I'm now considering something like the following fix.
I think this will be the same behavior as HiveServer2 with
`hive.server2.thrift.bind.host=""`.
```
diff --git
a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
index 7532beccb..e497f2fa5 100644
---
a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
+++
b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/TFrontendService.scala
@@ -113,6 +113,10 @@ abstract class TFrontendService(name: String)
override def connectionUrl: String = {
checkInitialized()
val host = serverHost match {
+ case Some("0.0.0.0") if
conf.get(FRONTEND_CONNECTION_URL_USE_HOSTNAME) =>
+ Utils.findLocalInetAddress.getCanonicalHostName
+ case Some("0.0.0.0") =>
+ Utils.findLocalInetAddress
case Some(h) => h // respect user's setting ahead
case None if conf.get(FRONTEND_CONNECTION_URL_USE_HOSTNAME) =>
serverAddr.getCanonicalHostName
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]