Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using JobGateway/ Manually Updating the Service Client of JobGateway
Updated on 2024-12-13 GMT+08:00

Manually Updating the Service Client of JobGateway

This section applies to MRS 3.3.1 and later.

Scenario

If you enabled multi-service and the service client fails to be updated for the added services in the MRS cluster, you need to manually update the client.

Prerequisites

  • A service has been added to Manager.
  • The following procedure is available for updating clients of Spark, Hive, and Flink services.

Procedure

  1. Log in to FusionInsight Manager, choose Cluster > Services > JobGateway > Instances, and view the IP addresses of all JobServer instance nodes.
  2. Obtain the node with the lowest IP address among the nodes where JobServer is deployed. If the service client fails to be updated on the node with the lowest IP address, go to 3. Otherwise, go to 4.

    • If the IP addresses of the nodes where JobServer is deployed are 192.168.0.192, 192.168.0.168, and 192.168.0.23, the lowest IP address is 192.168.0.23.
    • The script can update one or more service clients at a time.

  1. Log in to the node with the lowest IP address as user omm and run the script for updating the service client.

    cd ${BIGDATA_HOME}/FusionInsight_JobGateway_*/install/FusionInsight_JobGateway-*/adapter/script

    dos2unix update-multi-service-client.sh

    sh update-multi-service-client.sh Service 1 Service 2......

  2. Log in to other nodes where the service client fails to be updated as user omm and run the following commands:

    TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway*/install/FusionInsight-JobGateway*/job-gateway/job-server/tmp/multi-service-update-time

    date +"%Y-%m-%d %H:%M:%S" > "${TIME_RECORD_FILE}"

    cat ${TIME_RECORD_FILE} (Ensure that the file is generated and the time is written.)

    cd ${BIGDATA_HOME}/FusionInsight_JobGateway_*/install/FusionInsight_JobGateway-*/adapter/script

    dos2unix update-multi-service-client.sh

    sh update-multi-service-client.sh Service 1 Service 2......

    The following is an example:

    Some nodes fail to be updated when the Hive-1 Spark-1 service client is updated. The node with the lowest IP address fails to be updated. The rectification is as follows:

    • Run the following commands to update the service client script on the node with the lowest IP address:

      cd /opt/Bigdata/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/adapter/script

      dos2unix update-multi-service-client.sh

      sh update-multi-service-client.sh Hive-1 Spark-1

      update-multi-service-client.sh: line 164: warning: command substitution: ignored null byte in input
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.243' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.243' (ED25519) to the list of known hosts.
      
      Start to access REST API.
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      FusionInsight_Cluster_1_Services_Client.tar                                         100% 1566MB 235.8MB/s   00:06
    • Perform the following operations on other nodes where update fails:

      TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/job-gateway/job-server/tmp/multi-service-update-time

      date +"%Y-%m-%d %H:%M:%S" > "${TIME_RECORD_FILE}"

      cat ${TIME_RECORD_FILE}

      2024-03-19 18:02:50

      cd /opt/Bigdata/FusionInsight_JobGateway_8.5.0/install/FusionInsight-JobGateway-1.0.0/adapter/script

      dos2unix update-multi-service-client.sh

      sh update-multi-service-client.sh Hive-1 Spark-1

      update-multi-service-client.sh: line 163: warning: command substitution: ignored null byte in input
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.117' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      FusionInsight_Cluster_1_Services_Client.tar                                         100% 1566MB 378.2MB/s   00:04    
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.
      
      Warning: Permanently added '192.168.234.167' (ED25519) to the list of known hosts.

  3. Run the following commands on all JobServer nodes to delete the timestamps of all JobServer nodes:

    TIME_RECORD_FILE=${BIGDATA_HOME}/FusionInsight_JobGateway*/install/FusionInsight-JobGateway*/job-gateway/job-server/tmp/multi-service-update-time

    rm -f ${TIME_RECORD_FILE}