Reverting a Failed Cloudera Manager Upgrade

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

This topic describes how to reinstall the same version of Cloudera Manager you were using previously, so that the version of your Cloudera Manager Agents match the server. The steps below assume that the Cloudera Manager Server is already stopped (because it failed to start after the attempted upgrade).

Loading Filters ... 6.3.4 6.3.3 6.3.1 6.3.0 6.2.1 6.2.0 6.1.1 6.1.0 6.0.1 6.0.0 5.16 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0 6.3.4 6.3.3 6.3.2 6.2.1 6.2.0 6.1.1 6.1.0 6.0.1 6.0.0 5.16 5.15 5.14 5.13 5.12 5.11 5.10 5.9 5.8 5.7 5.6 5.5 5.4 5.3 5.2 5.1 5.0

Ensure Cloudera Manager Server and Agent are stopped.

  1. Log in to the Cloudera Manager Server host.
    ssh my_cloudera_manager_server_host
  2. Stop the Cloudera Manager Server.
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl stop cloudera-scm-server
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-server stop
  3. Stop the Cloudera Manager Agent.
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl stop cloudera-scm-agent
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-agent stop

Restore the Cloudera Manager Database (if necessary)

If your Cloudera Manager upgrade fails, you need to determine whether the upgrade process has successfully completed updating the schema of the Cloudera Manager database. If the schema update has begun, you must restore the Cloudera Manager database using a backup taken before you began the upgrade.

  1. To determine whether the schema has been updated, examine the Cloudera Manager server logs, and look for a message similar to the following: Updated Schema Version to 60000. (The version number may be different for your environment.)
    Run the following command to find the log entry (f the log file is in a different location, substitute the correct path):
    grep 'Updated Schema Version to ' /var/log/cloudera-scm-server/cloudera-scm-server.log
  2. If required, restore the database.

    The procedure for restoring the database depends on the type of database used by Cloudera Manager.

  3. If you are using the embedded PostgreSQL database, stop the Cloudera Manager Embedded PostgreSQL database:
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl stop cloudera-scm-server-db
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-server-db stop

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

    RHEL-compatible 7 and higher, Ubuntu 16.04
    sudo service cloudera-scm-server-db next_stop_fast
    sudo service cloudera-scm-server-db stop
    All other Linux distributions
    sudo service cloudera-scm-server-db fast_stop

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.

  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*
    Debian / 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:
    • Using a local package repository. (Required when cluster hosts do not have access to the internet.)

      1. Configure a local package repository hosted on your network.
      2. In the Package Repository URL, replace the entire URL with the URL for your local package repository. A username and password are not required to access local repositories.
      3. Click Apply.
    • Using the Cloudera public repository

      1. Substitute your USERNAME and PASSWORD in the Package Repository URL where indicated in the URL.
      2. Click Apply

    Package Repository URL:

  5. RHEL / CentOS

    Create a file named /etc/yum.repos.d/cloudera-manager.repo with the following content:

    [cloudera-manager]
    # Packages for Cloudera Manager
    name=Cloudera Manager
    baseurl=https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.15
    gpgkey=https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/RPM-GPG-KEY-cloudera
    gpgcheck=1
    SLES

    Create a file named /etc/zypp/repos.d/cloudera-manager.repo with the following content:

    [cloudera-manager]
    # Packages for Cloudera Manager
    name=Cloudera Manager
    baseurl=https://archive.cloudera.com/cm5/sles/12/x86_64/cm/5.15
    gpgkey=https://archive.cloudera.com/cm5/sles/12/x86_64/cm/RPM-GPG-KEY-cloudera
    gpgcheck=1
    Debian / Ubuntu

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

    Create a file named /etc/apt/sources.list.d/cloudera_manager.list with the following content:
    # Packages for Cloudera Manager
    deb https://archive.cloudera.com/cm5/debian/jessie/amd64/cm/ jessie-cm5.15 contrib
    deb-src https://archive.cloudera.com/cm5/debian/jessie/amd64/cm/ jessie-cm5.15 contrib
    Run the following command:
    sudo apt-get update

    The repository file, as created, refers to the most recent maintenance release of the specified minor release. If you would like to use a specific maintenance version, for example 5.15.1, replace 5.15 with 5.15.1 in the generated repository file shown above.

  6. Make the following changes to the repository file:
    1. Add /p after https://archive.cloudera.com.
    2. Prepend your username and password to the URLs.
    For example:
    https://username:password@archive.cloudera.com/p/...
  7. 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
    Debian / Ubuntu
    apt-cache depends cloudera-manager-agent

Downgrade the Cloudera Manager Packages

  1. Downgrade the packages. Note: Only add cloudera-manager-server-db-2 if you are using the embedded PostgreSQL database.
    RHEL / CentOS
    sudo yum clean all
    sudo yum repolist
    sudo yum downgrade "cloudera-manager-*"
    SLES
    sudo zypper clean --all
    sudo zypper dup -r baseurl
    Debian / Ubuntu
    There is no action that downgrades Cloudera Manager to the version currently in the repository.
  2. Verify that you have the correct packages installed.

    Debian / 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 5.15.0-0.cm...~sq The Cloudera Manager Agent
    ii  cloudera-manager-daemo 5.15.0-0.cm...~sq Provides daemons for monitoring Hadoop and related tools.
    ii  cloudera-manager-serve 5.15.0-0.cm...~sq The Cloudera Manager Server
    
    RHEL / CentOS / SLES
    rpm -qa 'cloudera-manager-*'
    cloudera-manager-server-5.15.0-..cm...
    cloudera-manager-agent-5.15.0-..cm...
    cloudera-manager-daemons-5.15.0-..cm...
    cloudera-manager-server-db-2-5.15.0-..cm...

Restore the Cloudera Manager Directory

  1. Run the following commands to extract the backups:
    cd $CM_BACKUP_DIR
    tar -xf cloudera-scm-agent.tar
    tar -xf cloudera-scm-server.tar
              
  2. Restore the Cloudera Manager server directory from a backup taken during the upgrade process:
    sudo -E cp -rp $CM_BACKUP_DIR/etc/cloudera-scm-server/* /etc/cloudera-scm-server
    sudo -E cp -rp $CM_BACKUP_DIR/etc/default/cloudera-scm-server /etc/default/cloudera-scm-server
  3. If the Cloudera Manager server host has an agent installed, restore the Cloudera Manager agent directory from a backup taken during the upgrade process:
    sudo -E cp -rp $CM_BACKUP_DIR/etc/cloudera-scm-agent/* /etc/cloudera-scm-agent
    sudo -E cp -rp $CM_BACKUP_DIR/etc/default/cloudera-scm-agent /etc/default/cloudera-scm-agent
    sudo -E cp -rp $CM_BACKUP_DIR/var/run/cloudera-scm-agent/* /var/run/cloudera-scm-agent
    sudo -E cp -rp $CM_BACKUP_DIR/var/lib/cloudera-scm-agent/* /var/lib/cloudera-scm-agent

Start Cloudera Manager Again

  1. If you are using the embedded PostgreSQL database, start the database:
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl start cloudera-scm-server-db
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-server-db start
  2. Start the Cloudera Manager Agent.
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl start cloudera-scm-agent
    If the agent starts without errors, no response displays.
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-agent start
    You should see the following:
    Starting cloudera-scm-agent: [ OK ]
  3. Start the Cloudera Manager Server.
    RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher
    sudo systemctl start cloudera-scm-server
    If the Cloudera Manager Server starts without errors, no response displays.
    RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04 or 14.04
    sudo service cloudera-scm-server start
    You should see the following:
    Starting cloudera-scm-server: [ OK ]
  4. Start the Cloudera Management Service.
    1. Log in to the Cloudera Manager Admin Console.
    2. Select Clusters > Cloudera Management Service.
    3. Select Actions > Start.
vim /var/log/cloudera-scm-server/cloudera-scm-server.log