0

There is problem with get data from a Yarn ResourceManager that is configured as High Availability (RM1 and RM2). Im using scala like this:

import org.apache.hadoop.yarn.client.api.YarnClient
import org.apache.hadoop.yarn.conf.YarnConfiguration

val conf: YarnConfiguration = new YarnConfiguration()
val yarnClient: YarnClient = YarnClient.createYarnClient()
yarnClient.init(conf)
yarnClient.start()
val apps = yarnClient.getApplications()

I'm getting an error on the last line:

java.net.ConnectionException connection refused from "my host" to "RM1 host"

Before that occurs, the process is trying to connect to RM for a really long time.

Currently RM1 is not active, and RM2 is active. Property of YarnConfiguration like yarn.resourcemanager.address.RM1/RM2 is correspond to real addresses.

I dont understand why my process is trying to connect to not active RM?

1
  • 1
    Did you copy the yarn-site.xml from the cluster and put it in your HADOOP_CONF_DIR folder? If you have more than one RM, you need to connect to a nameservice, not a particular host/port Jun 16, 2022 at 20:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.