Help Center > > User Guide> Connecting to Clusters> Using an MRS Client> Using an MRS Client on Nodes Outside a Cluster

Using an MRS Client on Nodes Outside a Cluster

Updated at: Mar 25, 2021 GMT+08:00

Scenario

After a client is installed, you can use the client on a node outside an MRS cluster on the public cloud.

If the client has been installed on the node outside the MRS cluster but must be updated, update the client using the same account that is used to install the client, for example, the root account.

Prerequisites

  • An ECS has been prepared. For details about the OS and its version of the ECS, see Table 1. For clusters of MRS 2.x or earlier, the CPU architecture of the ECS must be the same as that of the MRS cluster node. For MRS 3.x or later, the MRS client is compatible with both of the following CPU architectures.
    Table 1 Reference list

    CPU Architecture

    OS

    Supported Version

    x86 computing

    Euler

    • Available: Euler OS 2.2
    • Available: Euler OS 2.3
    • Available: Euler OS 2.5

    SuSE

    • Recommended: SUSE Linux Enterprise Server 11 SP4 (SUSE 11.4)
    • Available: SUSE Linux Enterprise Server 11 SP3 (SUSE 11.3)
    • Available: SUSE Linux Enterprise Server 11 SP1 (SUSE 11.1)
    • Available: SUSE Linux Enterprise Server 11 SP2 (SUSE 11.2)

    RedHat

    • Recommended: Red Hat-6.6-x86_64 (Red Hat 6.6)
    • Available: Red Hat-6.4-x86_64 (Red Hat 6.4)
    • Available: Red Hat-6.5-x86_64 (Red Hat 6.5)
    • Available: Red Hat-6.7-x86_64 (Red Hat 6.7)

    CentOS

    Available: CentOS-7.2 (CentOS 7.2)

    Kunpeng computing (Arm)

    Euler

    Available: Euler OS 2.8

    CentOS

    Available: CentOS-8.0 (CentOS 8.0)

    For example, a user can select the image CentOS 7.2 64bit(40GB) to prepare the OS for an ECS.

    In addition, sufficient disk space is allocated for the ECS, for example, 40GB.

  • The ECS and the MRS cluster are in the same VPC.
  • The security group of the ECS is the same as that of the Master node of the MRS cluster.

    If this requirement is not met, modify the ECS security group or configure the inbound and outbound rules of the ECS security group to allow the ECS security group to be accessed by all security groups of MRS cluster nodes.

    For details about how to create an ECS that meets this requirement, see Getting Started > Creating an ECS in the Elastic Cloud Server in the Elastic Cloud Server User Guide.

  • To enable users to log in to a Linux ECS using a password (SSH), see Instances > Logging In to a Linux ECS > Login Using an SSH Password in the Elastic Cloud Server User Guide.

Procedure

  1. Create an ECS that meets the requirements in the prerequisites.
  2. Log in to the MRS management console, click the cluster name to go to the cluster details page, and choose Components.

    If the Components tab is not displayed on the cluster details page, complete IAM user synchronization first. (On the Dashboard tab page of the cluster details page, click Click to synchronize on the right side of IAM User Sync to synchronize IAM users.)

    For MRS 1.8.10 or earlier, log in to MRS Manager. For details, see Accessing MRS Manager (MRS 2.1.0 or Earlier). Then, choose Services.

    For details about how to install the client for MRS 3.0.2, see Installing a Client.

  3. Click Download Client.
  4. In Client Type, select All client files.
  5. In Save Path, select Remote host.
  6. Set Host IP Address to the IP address of the ECS, set Host Port to 22, and set Save Path to /tmp.

    • If the default port 22 for logging in to an ECS using SSH has been changed, set Host Port to the new port.
    • Save Path contains a maximum of 256 characters.

  7. Set Login User to root.

    If other users are used, ensure that the users have read, write, and execute permission on the save path.

  8. Click OK to start downloading the client to the ECS.

    If the following information is displayed, the client package is saved. Click Close. Obtain the client file from the storage path of the remote host that is set when the client is downloaded.

    Client files downloaded to the remote host successfully.

    If the following information is displayed, check the username, password, and security group configurations of the remote host. Ensure that the username and password are correct and an inbound rule of the SSH (22) port has been added to the security group of the remote host. And then, go to 2 to download the client again.

    Failed to connect to the server. Please check the network connection or parameter settings.

    Generating a client will occupy a large number of disk I/Os. You are advised not to download a client when the cluster is being installed, started, and patched, or in other unstable states.

  9. Log in to the ECS using VNC. For details, see Instances > Logging In to a Linux ECS > Login Using VNC in the Elastic Cloud Server User Guide.

    All images support Cloud-Init. It is recommended that you change the password upon the first login.

  10. Perform NTP time synchronization to synchronize the time of nodes outside the cluster with the time of the MRS cluster.

    1. Check whether the NTP service is installed. If it is not installed, run the yum install yum install ntp -y command to install it.
    2. Run the vim /etc/ntp.conf command to edit the NTP client configuration file, add the IP address of the Master node in the MRS cluster, and comment out the IP addresses of other servers.
      server master1_ip profer
      server master2_ip 
      Figure 1 Adding the Master node IP addresses
    3. Run the service ntpd stop command to stop the NTP service.
    4. Run the/usr/sbin/ntpdate IP address of the active Master node command to manually synchronize the time.
    5. Run the service ntpd start or systemctl restart ntpd command to start the NTP service.
    6. Run the ntpstat command to check the time synchronization result:

  11. On the ECS, switch to user root and copy the installation package in the Storage Path in 6 to the /opt directory. For example, if the Storage Path is set to /tmp, run the following command:

    sudo su - root

    cp /tmp/MRS_Services_Client.tar /opt

  12. 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

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

    sha256sum -c MRS_Services_ClientConfig.tar.sha256

    The command output is as follows:

    MRS_Services_ClientConfig.tar: OK

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

    tar -xvf MRS_Services_ClientConfig.tar

  15. Run the following command to install the client to a new directory, for example, /opt/client. A directory is automatically generated during the client installation.

    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.

  16. Check whether the IP address of the ECS node is connected to the IP address of the cluster Master node.

    For example, run the following command: ping Master node IP address.

    • If yes, go to 17.
    • If no, check whether the VPC and security group are correct and whether the ECS and the MRS cluster are in the same VPC and security group, and go to 17.

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

    source /opt/client/bigdata_env

  18. 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

  19. Run the client command of a component.

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

    hdfs dfs -ls /

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