Upgrade from Cloudera Manager 3.7.x to Cloudera Manager 4.5
Upgrading from Cloudera Manager Free Edition 3.7 to the latest version of Cloudera Manager Free Edition primarily involves upgrading Cloudera Manager Server packages.
To complete the upgrade, you stop the Cloudera Management Service, upgrade the packages, and then start the Cloudera Management Service again. After upgrading Cloudera Manager you may also want to upgrade CDH or add Impala.
Cloudera Manager 4.5 added support for Hive, which includes a new role type called the Hive Metastore Server. This role manages the metastore process when Hive is configured with a remote metastore.
When upgrading from a previous CDH version, Cloudera Manager automatically creates new Hive service(s) to capture the previous implicit Hive dependency from Hue and Impala. Your previous services will continue to function without impact.
Note that if Hue was using a Hive metastore of type Derby, then the newly created Hive service will also use Derby. But since Derby does not allow concurrent connections, Hue will continue to work, but the new Hive Metastore Server will fail to run. The failure is harmless (because nothing uses this new Hive Metastore Server at this point) and intentional, to preserve the set of cluster functionality as it was before upgrade. Cloudera discourages the use of a Derby metastore due to its limitations. You should consider switching to a different supported database type (PostgreSQL, MySQL, Oracle).
Cloudera Manager provides a Hive configuration option to bypass the Hive Metastore server. When this configuration is enabled, Hive clients, Hue, and Impala connect directly to the Hive Metastore Database. Prior to Cloudera Manager 4.5, Hue and Impala talked directly to the Hive Metastore Database, so the Bypass mode is enabled by default when upgrading to Cloudera Manager 4.5. This is to ensure the upgrade doesn't disrupt your existing setup. You should plan to disable the Bypass Hive Metastore Server mode, especially when using CDH 4.2 or later. Using the Hive Metastore Server is the recommended configuration. After changing this configuration, you must re-deploy your client configurations, restart Hive, and restart any Hue or Impala services configured to use that Hive.
Cloudera Manager 4.5 also supports Hive Server2 with CDH4.2. Hive Server2 is not added by default, but can be added as a new role under the Hive service (see Adding Role Instances).
Summary: What You are Going to Do
Upgrading from Cloudera Manager Free Edition 3.7.x to Cloudera Manager Free Edition 4.5 involves the following broad steps:
Step 1. Upgrade Cloudera Manager Server – Stop Cloudera Manager services, copy files to the Cloudera Manager server, upgrade the server, and restart services.
Step 2. Upgrade the Cluster Hosts – Use the upgrade wizard to upgrade hosts in the cluster.
Step 3. Verify the Upgrade – You can choose to check the versions of installed components.
Step 4. Add Hive Gateway Roles – Add Hive gateway roles on Hive client hosts to ensure Hive client configurations are deployed on those hosts.
Step 5. Deploy Updated Client Configurations - Update client configurations to ensure clients operate as expected with the upgraded systems.
Step 6. (Optional) Upgrade CDH – You may choose to upgrade installation of CDH.
Step 1. Upgrade Cloudera Manager Server
This process involves stopping running Cloudera Manager service, downloading and applying updates to Cloudera Manager, and restarting the Cloudera Manager service.
You can use package management software to download and apply updates from Cloudera's software repository. The default name of the repo file is cloudera-manager. This name is also typically in square brackets on the first line of the Cloudera Manager repo file. For example, you could view the contents of the repo file, including the repo name in brackets. This file might be at /etc/yum.repos.d/cloudera-manager.repo and its contents could be viewed using the more command as follows:
[user@system yum.repos.d]$ more cloudera-manager.repo [cloudera-manager] ...
The location of the repo files varies by operating system and package management solution.
- For yum the repo file is at /etc/yum.repos.d/cloudera-manager.repo.
- For zypper the repo file is at /etc/zypp/repos.d/cloudera-manager.repo.
Find Cloudera's repo file for your distribution by starting at http://archive.cloudera.com/cm4/ and navigating to the directory that matches your operating system. For example, for Red Hat 6, you would navigate to http://archive.cloudera.com/cm4/redhat/6/x86_64/cm/. Within that directory, find the repo file that contains information including the repository's base URL and gpgkey. In the preceding example, the contents of the cloudera-manager.repo file might appear as follows:
[cloudera-manager] # Packages for Cloudera Manager, Version 4, on RedHat or CentOS 5 x86_64 name=Cloudera Manager baseurl=http://archive.cloudera.com/cm4/redhat/5/x86_64/cm/4/ gpgkey = http://archive.cloudera.com/cm4/redhat/5/x86_64/cm/RPM-GPG-KEY-cloudera gpgcheck = 1
Copy this repo file to the configuration location for the package management software for your system. For example, with Red Hat 6, you would copy the cloudera-manager.repo file to /etc/yum.repos.d/.
Before beginning the upgrade process, it can be best to clean all yum's cache directories using the command yum clean all. Doing so ensures that you download and install the latest versions of the packages. If your system is not up to date, and any underlying system components need to be upgraded before this yum update can succeed, yum will tell you what those are.
To upgrade to the new server
- Stop the server on the 3.7.x Server host:
$ sudo service cloudera-scm-server stop
- If you are using the embedded PostgreSQL database, stop cloudera-scm-server-db on the host on which it is running:
$ sudo service cloudera-scm-server-db stop
- On every Cloudera Manager Agent host, run this command to stop the Cloudera Manager Agents:
$ sudo service cloudera-scm-agent stop
- Install the new version of the server. You can run commands on the Cloudera Manager Server host to update only the Cloudera Manager components. For a Red Hat system: To upgrade from Cloudera's repository run the following commands on the Cloudera Manager Server host:
$ sudo yum clean all $ sudo yum update 'cloudera-*'
On a SLES system: Use the following commands to clean the cached repository information and update only the Cloudera Manager components:
$ sudo zypper clean --all $ sudo zypper up -r http://archive.cloudera.com/cm4/sles/11/x86_64/cm/4/
At the end of this process you should have the 4.5 versions of the following packages installed on the host that will become the Cloudera Manager Server host. For example,
$ rpm -qa 'cloudera-manager-*' cloudera-manager-daemons-4.5.0-1.cm450.p0.235.x86_64 cloudera-manager-server-4.5.0-1.cm450.p0.235.x86_64 cloudera-manager-agent-4.5.0-1.cm450.p0.235.x86_64
You may also see additional packages for plugins, depending on what was previously installed on the Server host.
- Start the server. If you are using the embedded PostgreSQL database, start cloudera-scm-server-db on the Cloudera Manager Sever host:
$ sudo service cloudera-scm-server-db start
You will see it upgrade and create tables and databases. On the Cloudera Manager Server host (the system on which you installed the cloudera-manager-server package) do the following:
$ sudo service cloudera-scm-server start
You should see the following:
Starting cloudera-scm-server: [ OK ]
If you have problems starting the server, such as database permissions problems, you can use the server's log /var/log/cloudera-scm-server/cloudera-scm-server.log to troubleshoot the problem.
Step 2. Upgrade the Cluster Hosts
After updating Cloudera Manager, connect to Cloudera Manager and use the wizard to continue the upgrade process. In this part of the process, the Cloudera Manager agents are updated.
All hosts in the cluster must have access to the Internet if you plan to use archive.cloudera.com as the source for installation files. If you do not have Internet access, create a custom repository.
- Log in to the Cloudera Manager Admin Console. If you have just restarted the Cloudera Manager server, you may need to log in again. Proceed past the optional license page and confirm whether or not anonymous usage statistics are acceptable.
- On the Welcome screen, click Continue to proceed to the Upgrade cluster hosts screen.
- On the Upgrade cluster hosts screen, verify that the hosts you want to upgrade appear. You can search for additional hosts, if you need to, by entering their hostnames or IP addresses under Add new hosts to cluster and clicking Find Hosts. When all the hosts are shown as being managed, click Continue.
- Select the release of the Cloudera Manager Agent to install. Normally, this will be the Matched Release for this Cloudera Manager Server. However, if you used a custom repository for the Cloudera Manager server, select Custom Repository and provide the required information Click Continue to proceed.
- Provide credentials for authenticating with hosts.
- Select root or enter the user name for an account that has password-less sudo permissions.
- Select an authentication method.
- If you choose to use password authentication, enter and confirm the password.
- If you choose to use public-key authentication provide a passphrase and path to the required key files.
- You can choose to specify an alternate SSH port. The default value is 22.
- You can specify the maximum number of host installations to run at once. The default value is 10.
- Click Start Installation to install and start Cloudera Manager Agents. The status of installation on each host is displayed on the page that appears after you click Start Installation. You can also click the Details link for individual hosts to view detailed information about the installation and error messages if installation fails on any hosts.
If you click the Abort Installation button while installation is in progress, it will halt any pending or in-progress installations and roll back any in-progress installations to a clean state. The Abort Installation button does not affect host installations that have already completed successfully or already failed.
If installation fails on a host, you can click the Retry link next to the failed host to try installation on that host again. To retry installation on all failed hosts, click Retry Failed Hosts at the bottom of the screen.
- When the Continue button appears at the bottom of the screen, the installation process is complete. If the installation has completed successfully on some hosts but failed on others, you can click Continue if you want to skip installation on the failed hosts.
- The Host Inspector runs to inspect your managed hosts for correct versions and configurations. If there are problems, you can make changes and them re-run the inspector. When you are satisfied with the inspection results, click Continue.
- On the next page, select the hosts where the Hive Metastore Server role should be installed. The Hive service is now managed by Cloudera Manager; you must select the host for the Hive MetaStore Server. You should assign the Hive Metastore server to a single host.
- Review the configuration values for your Hive roles, and click Accept to continue.
If Hue is using a Hive metastore of type Derby (the default), then the newly created Hive service will also use Derby. However, since Derby does not allow concurrent connection, Hue will continue to work but the new Hive Metastore Server will fail to start. The failure is harmless (because nothing uses this new Hive Metastore Server at this point) and intentional, to preserve the cluster functionality that existed before the upgrade. Hive's Bypass Metastore Server mode is enabled by default when upgrading to Cloudera Manager 4.5. This is to ensure the upgrade doesn't disrupt your existing setup. You should plan to disable the Bypass Hive Metastore Server mode, especially when using CDH 4.2 or later. Using the Hive Metastore Server is the recommended configuration. After changing this configuration, you must re-deploy your client configurations, restart Hive, and restart any Hue or Impala services configured to use Hive.
- Your services (except for Hive) should now be running.
You have now completed the upgrade to Cloudera Manager 4.5.
Troubleshooting Cloudera Manager Agent Connection Problems
If there is a communication failure between a Cloudera Manager Agent and Cloudera Manager Server, you can use the Cloudera Manager Server log file /var/log/cloudera-scm-server/cloudera-scm-server.log and the Cloudera Manager Agent log files /var/log/cloudera-scm-agent/cloudera-scm-agent.log to troubleshoot the problem. The following is a common error.
error: (113, 'No route to host') in cloudera-scm-agent.log.
This indicates that the agent is unable to connect to the Cloudera Manager Server. Make sure that iptables and SELinux are both turned off.
Step 3. Verify the Upgrade
You can use the host inspector to verify the upgrade completed.To verify the server upgrade completed as expected
- Connect to the Cloudera Manager Admin Console.
- Click the Hosts tab.
- Click Host Inspector.
- Click Show Inspector Results.
All results from the host inspector process are displayed including the currently installed versions. If this includes listings of current component versions, the installation completed as expected.
Step 4. Add Hive Gateway Roles to Hosts
Add Hive Gateway roles to any hosts where Hive clients should run.
- In the Cloudera Manager Admin console, pull down the Services tab and select the Hive service.
- Go to the Instances tab, and click the Add button. This opens the Add Role Instances page.
- Select the hosts on which you want a Hive Gateway role to run. This will ensure that the Hive client configurations are deployed on these hosts.
Step 5. Deploy Updated Client Configurations
During upgrades between major versions, resource locations may change. To ensure clients have current information about resources, update client configuration as described in Deploying Client Configuration Files.
Step 6. (Optional) Upgrade CDH
Cloudera Manager Free Edition 4.x can manage both CDH3 and CDH4, so upgrading existing CDH3 installations is not required, but to get the benefits of CDH4, you may want to upgrade to the latest version. See the following topics for more information on upgrading CDH:
- Upgrading CDH3 to CDH4 in a Cloudera Managed Deployment - Follow this path to upgrade existing installations of CDH3 to the latest version of CDH4. You can also install Impala when you upgrade to CDH4 version 4.1.2 or later.
- Upgrading to the Latest Version of CDH3 in a Cloudera Managed Deployment - Follow this path to upgrade existing installations of CDH3 to the latest version of CDH3. Consider upgrading to CDH4 instead of upgrading to the latest version of CDH3.