Step 3: Upgrading the Cloudera Manager Server

Loading Filters ... 7.13.1 7.11.3 7.7.3 7.7.1 7.6.7 7.6.1 7.4.4 7.3.1 7.13.2 7.3.1 7.1.9.1000 7.1.9 7.1.8 7.1.7.3000 7.1.7.2000 7.1.7.1000 7.1.7 7.1.6 7.3.2 7.3.1 7.1.9.1000 7.1.9 7.1.8 7.1.7.3000 7.1.7.2000 7.1.7.1000 7.1.7

You can also use the procedures on this page to install Cloudera Manager patches. You must obtain the download URL for the patch before proceeding – you will use this information later in this procedure.

This topic provides procedures for backing up the Cloudera Manager Server.

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

After you complete the steps in Step 1: Getting Started Upgrading Cloudera Manager 7 and Step 2: Backing Up Cloudera Manager 7, continue with the following:

Establish Access to the Software

Cloudera Manager needs access to a package repository that contains the updated software packages. You can choose to access the Cloudera public repositories directly, or you can download those repositories and set up a local repository to access them from within your network. If your cluster hosts do not have connectivity to the Internet, you must set up a local repository.

If you have enabled high availability for Cloudera Manager, perform the following steps on the hosts for both the active and passive instances of the Cloudera Manager server.

  1. Log in to the Cloudera Manager Server host.
    ssh my_cloudera_manager_server_host
  2. Remove any older files in the existing repository directory:
    RHEL / CentOS
    sudo rm /etc/yum.repos.d/cloudera*manager.repo*
    SLES
    sudo rm /etc/zypp/repos.d/cloudera*manager.repo*
    Ubuntu
    sudo rm /etc/apt/sources.list.d/cloudera*.list*
  3. Fill in the form at the top of this page.
  4. Create a repository file so that the package manager can locate and download the binaries.

    Do one of the following, depending on whether or not you are using a local package repository:

    • Use a local package repository. (Required when cluster hosts do not have access to the internet.) See Configuring a Local Package epository.

    • Use the Cloudera public repository

      RHEL / CentOS
      1. Create a file named /etc/yum.repos.d/cloudera-manager.repo with the following content:
        [cloudera-manager]
        name=Cloudera Manager 
        baseurl=https://archive.cloudera.com/p/cm7/<Cloudera Manager version>/redhat<OS major version>/yum/
        gpgkey =https://archive.cloudera.com/p/cm7/<Cloudera Manager version>/redhat<OS major version>/yum/RPM-GPG-KEY-cloudera
        username=changeme
        password=changeme
        gpgcheck=1
        enabled=1
        autorefresh=0
        type=rpm-md

        Replace changeme with your username and password in the /etc/yum.repos.d/cloudera-manager.repo file.

      SLES
      1. Create a file named /etc/zypp/repos.d/cloudera-manager.repo with the following content:
        [cloudera-manager]
        name=Cloudera Manager 
        baseurl=https://archive.cloudera.com/p/cm7/<Cloudera Manager version>/sles<OS major version>/yum/
        gpgkey =https://archive.cloudera.com/p/cm7/<Cloudera Manager version>/sles<OS major version>/yum/RPM-GPG-KEY-cloudera
        username=changeme
        password=changeme
        gpgcheck=1
        enabled=1
        autorefresh=0
        type=rpm-md
      2. Replace changeme with your username and password in the /etc/zypp/repos.d/cloudera-manager.repo file.

      Ubuntu

      Debian is not a supported operating system for Cloudera Manager 6.x.

      1. Create a file named /etc/apt/sources.list.d/cloudera_manager.list with the following content:
        # Cloudera Manager <Cloudera Manager version>
        deb [arch=amd64] http://username:password@archive.cloudera.com/p/cm7/<Cloudera Manager version>/ubuntu1804/apt -cm<Cloudera Manager version> contrib
      2. Run the following command:
        sudo apt-get update
      3. Replace changeme with your username and password in the /etc/apt/sources.list.d/cloudera_manager.list file.

  5. A Cloudera Manager upgrade can introduce new package dependencies. Your organization may have restrictions or require prior approval for installation of new packages. You can determine which packages may be installed or upgraded:
    RHEL / CentOS
    yum deplist cloudera-manager-agent
    SLES
    zypper info --requires cloudera-manager-agent
    Ubuntu
    apt-cache depends cloudera-manager-agent

Install Java (JDK)

  1. Log in to the Cloudera Manager Server host.
    ssh my_cloudera_manager_server_host
  2. Stop the Cloudera Manager Server.
    sudo systemctl stop cloudera-scm-server
  3. Install the required OpenJDK 17 while retaining the existing JDK:
    sudo dnf install java-17-openjdk-devel
  4. Update the JAVA_HOME in /etc/default/cloudera-scm-server to point to the new JDK 17 path.
  5. Start the Cloudera Manager Server.
    sudo systemctl start cloudera-scm-server

Upgrade the Cloudera Manager Server

  1. Log in to the Cloudera Manager server host.
  2. If your cluster is running the embedded PostgreSQL database, stop all services that are using the embedded database. These can include:
    • Hive service and all services such as Impala and Hue that use the Hive metastore
    • Oozie
    • Sentry
    • Sqoop
  3. Stop the Cloudera Management Service.
    1. Log in to the Cloudera Manager Admin Console.
    2. Select Clusters > Cloudera Management Service.
    3. Select Actions > Stop.
  4. Ensure that you have disabled any scheduled replication or snapshot jobs and wait for any running commands from the Cloudera Manager Admin Console to complete before proceeding with the upgrade.
  5. If you have any Hive Replication Schedules that replicate to a cloud destination, delete these replication clusters before continuing with the upgrade. You can re-create these Replication Schedules after the Cloudera Manager upgrade is complete.
  6. If your cluster is running Ubuntu version 18, stop all clusters before upgrading Cloudera Manager. (For each cluster, go to Cluster Name > Actions > Stop.)
  7. Stop the Cloudera Manager server host, agent, and embedded database (if installed). If you have enabled high availability for Cloudera Manager, perform the following steps on the hosts for both the active and passive instances of Cloudera Manager:
    1. Log in to the Cloudera Manager Server host:
      ssh my_cloudera_manager_server_host
    2. Stop the Cloudera Manager Server.
      sudo systemctl stop cloudera-scm-server
    3. If you are using the embedded PostgreSQL database, stop the Cloudera Manager Embedded PostgreSQL database:
      sudo systemctl stop cloudera-scm-server-db

      If you are not using the embedded PostgreSQL database and you attempt to stop it, you might see a message indicating that the service cannot be found.

      In case of using the embedded PostgreSQL, if you see a message that the shutdown failed, then the embedded database is still running, probably because services are connected to the Hive metastore. If the database shutdown fails due to connected services, issue the following command:

      sudo service cloudera-scm-server-db next_stop_fast
      sudo service cloudera-scm-server-db stop
    4. Stop the Cloudera Manager Agent.
      sudo systemctl stop cloudera-scm-agent
  8. Upgrade the Cloudera Manager software. If you have enabled high availability for Cloudera Manager, perform the following steps on the hosts for both the active and passive instances of the Cloudera Manager server.
    1. Upgrade the packages. Include the cloudera-manager-server-db-2 package in the command only if you are using the embedded PostgreSQL database.
      RHEL / CentOS
      sudo yum clean all
      sudo yum upgrade cloudera-manager-server cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server-db-2
      SLES
      sudo zypper clean --all
      sudo zypper up cloudera-manager-server cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server-db-2
      Ubuntu
      sudo apt-get clean
      sudo apt-get update
      sudo apt-get dist-upgrade
      sudo apt-get install cloudera-manager-server cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server-db-2

      You might be prompted about your configuration file version:

      
      Configuration file '/etc/cloudera-scm-agent/config.ini'
      ==> Modified (by you or by a script) since installation.
      ==> Package distributor has shipped an updated version.
      What would you like to do about it ? Your options are:
      Y or I : install the package maintainer's version
      N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
      The default action is to keep your current version.

      You may receive a similar prompt for /etc/cloudera-scm-server/db.properties. Answer N to both prompts.

      You may be prompted to accept the GPG key. Answer y.

      
      Retrieving key from https://archive.cloudera.com/.../cm/RPM-GPG-KEY-cloudera
      Importing GPG key ...
       Userid     : "Yum Maintainer <webmaster@cloudera.com>"
       Fingerprint: ...
       From       : https://archive.cloudera.com/.../RPM-GPG-KEY-cloudera
    2. If you customized the /etc/cloudera-scm-agent/config.ini file, your customized file is renamed with the extension .rpmsave or .dpkg-old. Merge any customizations into the /etc/cloudera-scm-agent/config.ini file that is installed by the package manager.
    3. Verify that you have the correct packages installed.

      Ubuntu
      dpkg-query -l 'cloudera-manager-*'
      
      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name                   Version                Description
      +++-======================-======================-============================================================
      ii  cloudera-manager-agent 7.13.1-0.cm...~sq The Cloudera Manager Agent
      ii  cloudera-manager-daemo 7.13.1-0.cm...~sq Provides daemons for monitoring Hadoop and related tools.
      ii  cloudera-manager-serve 7.13.1-0.cm...~sq The Cloudera Manager Server
      
      RHEL / CentOS / SLES
      rpm -qa 'cloudera-manager-*'
      
      cloudera-manager-server-7.13.1-...
      cloudera-manager-agent-7.13.1-...
      cloudera-manager-daemons-7.13.1-...
      cloudera-manager-server-db-2-7.13.1-...
    4. If you are using the embedded PostgreSQL database, start the database:
      sudo systemctl start cloudera-scm-server-db
  9. Start the Cloudera Manager agent and server. If you have enabled high availability for Cloudera Manager, start only the host for the active instance of Cloudera Manager:
    1. Start the Cloudera Manager Agent.
      sudo systemctl start cloudera-scm-agent
      If the agent starts without errors, no response displays.
    2. The Cloudera Manager server now requires 4GB of heap. On the Cloudera Manager server host, edit the /etc/default/cloudera-scm-server file and change the line that begins with export CMF_JAVA_OPTS=. Change the -Xmx2G parameter to -Xmx4G.
    3. Start the Cloudera Manager Server.
      sudo systemctl start cloudera-scm-server
    4. If you have problems starting the server or the agent, such as database permissions problems, you can use log files to troubleshoot the problem:

      Server log:

      tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log

      Agent log:

      tail -f /var/log/cloudera-scm-agent/cloudera-scm-agent.log
      or
      tail -f /var/log/messages
  10. Verify that all cluster hosts appear in the Cloudera Manager Admin Console.
    1. Use a Web browser to open the Cloudera Manager Admin Console using the following URL:
      http://cloudera_Manager_server_hostname:7180/cmf/upgrade
      It can take several minutes for the Cloudera Manager Server to start, and the Cloudera Manager Admin Console is unavailable until the server startup is complete and the Upgrade Cloudera Manager page displays.
    2. Verify that all cluster hosts are visible. (Go to Hosts > All Hosts.)
  11. If you have enabled high availability for Cloudera Manager, start the host for the passive instance of Cloudera Manager:
    1. Start the Cloudera Manager Agent.
      sudo systemctl start cloudera-scm-agent
      If the agent starts without errors, no response displays.
    2. The Cloudera Manager server now requires 4GB of heap. On the Cloudera Manager server host, edit the /etc/default/cloudera-scm-server file and change the line that begins with export CMF_JAVA_OPTS=. Change the -Xmx2G parameter to -Xmx4G.
    3. Start the Cloudera Manager Server.
      sudo systemctl start cloudera-scm-server
    4. If you have problems starting the server or the agent, such as database permissions problems, you can use log files to troubleshoot the problem:

      Server log:

      tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log

      Agent log:

      tail -f /var/log/cloudera-scm-agent/cloudera-scm-agent.log
      or
      tail -f /var/log/messages

To complete the Cloudera Manager upgrade, continue with Step 4: Upgrading the Cloudera Manager Agents.