Help Center > > User Guide> Connecting to Clusters> Using an MRS Client> Updating a Client

Updating a Client

Updated at: Apr 28, 2020 GMT+08:00

Updating a Client Configuration File

Scenario

An MRS cluster provides a client for you to connect to a server, view task results, or manage data. Before using an MRS client, you need to download and update the client configuration file if service configuration parameters are modified and a service is restarted or the service is merely restarted on MRS Manager.

During cluster creation, the original client is stored in the /opt/client directory on all nodes in the cluster by default. After the cluster is created, only the client of a Master node can be directly used. To use the client of a Core node, you need to update the client configuration file first.

Procedure

Method 1: applicable to all versions

  1. Choose Clusters > Active Clusters and click a cluster name to go to the cluster details page. Click the Components tab.

    For MRS 2.0.1 or earlier, log in to MRS Manager. For details, see Accessing MRS Manager. Then, choose Services.

  2. Click Download Client.

    Set Client Type to Only configuration files, Save Path to Server, and click OK to generate the client configuration file. The generated file is saved in the /tmp/MRS-client directory on the active management node by default. You can customize the file path.

    Figure 1 Downloading the client configuration file

  3. Query and log in to the active Master node. For details, see Determining Active or Standby Management Nodes of MRS Manager.
  4. If you use the client in the cluster, run the following command to switch to user omm. If you use the client outside the cluster, switch to user root.

    sudo su - omm

  5. Run the following command to switch the client directory:

    cd /opt/client

  6. Run the following command to update client configurations:

    sh refreshConfig.sh Client installation directory Full path of the client configuration file package

    For example, run the following command:

    sh refreshConfig.sh /opt/client /tmp/MRS-client/MRS_Services_Client.tar

    If the following information is displayed, the configurations have been updated successfully.

    ReFresh components client config is complete.
    Succeed to refresh components client config.

Method 2: applicable to MRS 1.8.5 or later

  1. After the cluster is installed, run the following command to switch to user omm. If you use the client outside the cluster, switch to user root.

    sudo su - omm

  2. Run the following command to switch the client directory:

    cd /opt/client

  3. Run the following command and enter the MRS Manager username and password with the download permission (for example, the username is admin and the password is the one set during cluster creation) as prompted to update client configurations.

    sh autoRefreshConfig.sh

  4. After the command is executed, the following information is displayed, where XXX indicates the name of the component installed in the cluster. To update client configurations of all components, press Enter. To update client configurations of some components, enter the component names and separate them with commas (,).

    Components "xxx" have been installed in the cluster. Please input the comma-separated names of the components for which you want to update client configurations. If you press Enter without inputting any component name, the client configurations of all components will be updated:

    The configurations are updated if the following information is displayed:

    Succeed to refresh components client config.

    If the following information is displayed, the username or password is incorrect.

    login manager failed,Incorrect username or password.
    • This script automatically connects to the cluster and invokes the refreshConfig.sh script to download and update the client configuration file.
    • By default, the client uses the floating IP address specified by wsom=xxx in the Version file in the installation directory to update the client configurations. To update the configuration file of another cluster, modify the value of wsom=xxx in the Version file to the floating IP address of the corresponding cluster before performing this step.

Fully Updating the Original Client of the Active Master Node

Description

During cluster creation, the original client is stored in the /opt/client directory on all nodes in the cluster by default.

  • For a normal MRS cluster, you will use the pre-installed client on a Master node to submit a job on the management console page.
  • You can also use the pre-installed client on the Master node to connect to a server, view task results, and manage data.

After installing the patch on the cluster, you need to update the client on the Master node to ensure that the functions of the built-in client are available.

Procedure

  1. Choose Clusters > Active Clusters and click a cluster name to go to the cluster details page. Click the Components tab.

    For MRS 2.0.1 or earlier, log in to MRS Manager. For details, see Accessing MRS Manager. Then, choose Services.

  2. Click Download Client.

    Set Client Type to All client files, Save Path to Server, and click OK to generate the client configuration file. The generated file is saved in the /tmp/MRS-client directory on the active management node by default. You can customize the file path.

  3. Query and log in to the active Master node. For details, see Determining Active or Standby Management Nodes of MRS Manager.
  4. On the ECS, switch to user root and copy the installation package to the /opt directory.

    sudo su - root

    cp /tmp/MRS-client/MRS_Services_Client.tar /opt

  5. Run the following command in the /opt directory to decompress the package and obtain the verification file and the configuration package of the client:

    tar -xvf MRS_Services_Client.tar

  6. Run the following command to verify the configuration package of the client:

    sha256sum -c MRS_Services_ClientConfig.tar.sha256

    The command output is as follows:

    MRS_Services_ClientConfig.tar: OK

  7. Run the following command to decompress MRS_Services_ClientConfig.tar:

    tar -xvf MRS_Services_ClientConfig.tar

  8. Run the following command to move the original client to the /opt/client_bak directory:

    mv /opt/client /opt/client_bak

  9. Run the following command to install the client in a new directory. The client path must be /opt/client.

    sh /opt/MRS_Services_ClientConfig/install.sh /opt/client

    If the following information is displayed, the client has been successfully installed:

    Components client installation is complete.

  10. Run the following command to modify the user and user group of the /opt/client directory:

    chown omm:wheel /opt/client -R

  11. Run the following command to configure the environment variables:

    source /opt/client/bigdata_env

  12. If Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user. If Kerberos authentication is disabled for the current cluster, skip this step.

    kinit MRS cluster user

    Example: kinit admin

  13. Run the client command of the component.

    For example, run the following command to query the HDFS directory:

    hdfs dfs -ls /

Fully Updating the Original Client of the Standby Master Node

  1. Repeat 1 to 3 to log in to the standby Master node, and run the following command to switch to user omm:

    sudo su - omm

  2. Run the following command on the standby Master node to copy the downloaded client package from the active Master node (master1 is used as an example):

    scp omm@master1_host_name:/tmp/MRS-client/MRS_Services_Client.tar /tmp/MRS-client/

  3. Repeat 4 to 13 to update the client of the standby Master node.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel