XingChenBigData opened a new issue, #3602: URL: https://github.com/apache/amoro/issues/3602
### What happened? # background The configuration of ams.server-expose-host: "127.0.0.1" causes the error "Connection refused" to be reported when the distributed cluster accesses the Amoro service. Error example: org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused # Root cause of the problem The configuration of ams.server-expose-host: "127.0.0.1" causes the distributed cluster to be unable to access the Amoro service. The specific manifestations are: 1. Address restriction, 127.0.0.1 is a local loopback address, which is only accessible to local processes. When Spark is submitted in cluster mode, the Driver process runs in the ApplicationMaster container of the YARN cluster(located on a NodeManager node). At this time, 127.0.0.1 in the container points to the container itself rather than the node where the Amoro service is located. 2. Network isolation, the container has an independent network namespace, and its 127.0.0.1 is completely isolated from the host or other nodes. Therefore, the Driver cannot connect to the Amoro Thrift Server located on other nodes through 127.0.0.1:1260. ## Key error phenomena: 1. Connection error: Driver throws a Connection refused exception when trying to connect to the Amoro service. The log shows: Caused by: org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused 2. Service unreachable: Executing telnet 127.0.0.1 1260 in the node where the YARN container is located fails, but the execution is successful on the machine where amoro is located. ## Solution: **Set the Amoro service address to the address of the machine** Refer to the following content: The amoro service IP is 172.18.0.4, and the hostname is hadoop-master1.orb.local. You need to add content to the configuration file /etc/kyuubi/conf/kyuubi-defaults.conf #vi /opt/amoro/conf/config.yaml, modify amoro’s server-expose-host server-expose-host: "172.18.0.4" #Host IP. When I use the hostname, I get an error message: Can't find host address start with hadoop-master1.orb.local #Restart amoro /opt/amoro/bin/ams.sh restart #if you use kyuubi, vi /etc/kyuubi/conf/kyuubi-defaults.conf to configure Amoro Catalog spark.sql.defaultCatalog=mixed_catalog spark.sql.catalog.mixed_catalog=org.apache.amoro.spark.MixedFormatSparkCatalog #spark.sql.catalog.mixed_catalog.url=thrift://172.18.0.4:1260/mixed_catalog spark.sql.catalog.mixed_catalog.url=thrift://hadoop-master1.orb.local:1260/mixed_catalog #Restart kyuubi /opt/kyuubi/bin/kyuubi restart #Enter the kyuubi command line kyuubi-beeline -u "jdbc:hive2://127.0.0.1:10009/" I found that I can enter normally. # Ref Appendix, official website materials: https://amoro.apache.org/docs/latest/deployment/ Configure the service address The ams.server-expose-host configuration specifies the host exposed by AMS that the compute engines and optimizers used to connect to AMS. You can configure a specific IP address on the machine, or an IP prefix. When AMS starts up, it will find the first host that matches this prefix. The ams.thrift-server.table-service.bind-port configuration specifies the binding port of the Thrift Server that provides the table service. The compute engines access AMS through this port, and the default value is 1260. ### Affects Versions 0.7.1 ### What table formats are you seeing the problem on? _No response_ ### What engines are you seeing the problem on? _No response_ ### How to reproduce _No response_ ### Relevant log output ```shell ``` ### Anything else _No response_ ### Are you willing to submit a PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's Code of Conduct -- 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]
