Member since
09-29-2015
63
Posts
107
Kudos Received
13
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2298 | 05-04-2017 12:32 AM | |
3091 | 12-09-2016 07:58 PM | |
7578 | 12-09-2016 07:53 PM | |
1112 | 06-08-2016 09:26 PM | |
1746 | 06-08-2016 09:01 PM |
06-08-2016
09:01 PM
For this command, find the correct /var/lib/ambari-agent/data/command-*.json file
and find the section, e.g., "hostLevelParams": {
...,
"ambari_db_rca_password": "mapred"
} This was introduced by AMBARI-4149, which tries to access the element at index 0, however, it's a string instead of a list.
This is controlled by the "server.jdbc.rca.user.passwd" property in the /etc/ambari-server/conf/ambari.properties file. You should file a Jira on Apache since this is a bug.
... View more
05-31-2016
08:18 PM
1 Kudo
That conf-select call tries to create the following symlink. /usr/hdp/current/zookeeper-server/conf -> /etc/zookeeper/2.4.0.0-169/0 1. Make sure zookeeper server is actually installed and Ambari shows it as a component for that host.
rpm -qa | grep zookeeper_.*server 2. Set its symlink.
hdp-select set zookeeper-server 2.4.0.0-169
# this will create symlink /usr/hdp/current/zookeeper-server -> /usr/hdp/2.4.0.0-169/zookeeper 3. Restart ZK Server on that host via the UI.
... View more
05-31-2016
08:07 PM
2 Kudos
ambari-server setup controls the database used by Ambari, which I don't think you want to change.
You can see the DB name, username, and jdbc string in /etc//etc/ambari-server/conf/ambari.properties
Ambari doesn't actually perform any mysql restarts on that database. Instead, you may have to delete the MySQL component from the HIVE service in Ambari since you're managing it yourself.
http://server:8080/api/v1/clusters/$NAME/services/HIVE/components/MYSQL_SERVER
will show which host contains that component. (note: you may have to stop the DB server before running this). If I understood your question correctly, this is what you want to do to manage MySQL server on your own.
You should also ask on the Hive mailing list. curl -u admin:admin -X DELETE -H 'X-Requested-By:admin' http://server:8080/api/v1/clusters/$NAME/hosts/$FQDN/host_components/MYSQL_SERVER
curl -u admin:admin -X DELETE -H 'X-Requested-By:admin' http://server:8080/api/v1/clusters/$NAME/services/HIVE/components/MYSQL_SERVER
... View more
04-25-2016
11:40 PM
7 Kudos
When performing a
Rolling or Express Upgrade, failures can naturally happen because large clusters are bound to have problematic hosts.
Here are 10 easy tips to prevent, diagnose and fix errors. Before upgrading the stack ...
1. Always upgrade Ambari to the most recent version, even if it's a dot release.
Often, there are fixes and optimizations that make the stack upgrade smoother.
2. Ensure all services are up, service checks are passing, there are no critical alerts, etc.
This helps ensure that the cluster is fully operational and helps to isolate any failures.
3. Pre-Install the bits and make sure all hosts have enough disk space. You can check that the version is found on all hosts. E.g.,
hdp-select versions | grep 2.5.0.0 | sort | tail -1
4. Do not ignore warnings. Starting in Ambari 2.2.2, there's a flag in ambari.properties file that allows users to bypass PreCheck errors, make sure it is either not present or set to false,
stack.upgrade.bypass.prechecks=false
5. Take a backup of the Ambari database. E.g.,
pg_dump -U ambari ambari > /tmp/ambari_bk.psql
mysqldump -u ambari ambari > /tmp/ambari_bk.mysql
In the middle of Upgrade ...
6. Rolling Upgrade will pause after 30% of the DataNodes have been upgraded. This allows the customer to run additional jobs and ensure that the partial upgrade is still healthy.
7. If a failure occurs, click on "Retry" and make sure that all other dependent services and masters are up.
Often, a retry will work if the previous command failed due to a timeout, network glitch, host goes down and then comes back up, etc. Capture any logs from both the component that failed and the ambari-agent at /var/lib/ambari-agent/data/output-*.txt and /var/lib/ambari-agent/data/errors-*.txt
8. If the failure requires changing configs or restarting a component on a host, then click on the "Pause" button. This will temporarily suspend the Upgrade/Downgrade and allow the user to change configs, execute other commands, such as restarting services, running service checks, etc. Once done, click on the "Resume" button.
CAUTION: do not ever add or move hosts, add or delete services, enable High Availability, or change topology while the upgrade is in progress.
If cannot Finalize ...
9. Find out the problematic hosts and components. In Ambari 2.0 - 2.2, you can run
SELECT repo_version_id, version, display_name FROM repo_version;
-- The state for your version may be in UPGRADING, UPGRADED.-- UPGRADING: some component on a host is still not on the newer version
-- UPGRADED: all components on all hosts are on the newer version
SELECT version, state FROM cluster_version cv JOIN repo_version rv ON cv.repo_version_id = rv.repo_version_id ORDER BY version DESC;
-- Find how many hosts are in each state
SELECT version, state, COUNT(*) FROM host_version hv JOIN repo_version rv ON hv.repo_version_id = rv.repo_version_id GROUP BY version, state ORDER BY version DESC, state;
-- Find components on hosts still not on the newer version
SELECT service_name, component_name, version, host_name FROM hostcomponentstate hcs JOIN hosts h ON hcs.host_id = h.host_id WHERE service_name NOT IN ('AMBARI_METRICS', 'KERBEROS') and component_name NOT IN ('ZKFC') ORDER BY version, service_name, component_name, host_name;
On these hosts, run the following,
1. hdp-select set all <new_version>
2. Restart any components still on the older version (you may have to click on the "Pause" button first).
Once all hosts are on the newer version, then the Cluster Version status should transition to UPGRADED; this will allow you to Finalize the upgrade.
10. If you still run into problems, gather all of the logs, result of the SQL queries, and either email Hortonworks Support or the mailing list of the component it failed on.
Here's another useful query.
Postgres:
SELECT u.upgrade_id, u.direction, u.from_version, u.to_version, hrc.request_id, hrc.task_id, substr(g.group_title, 0, 30), substr(i.item_text, 0, 30), hrc.status
FROM upgrade_group g JOIN upgrade u ON g.upgrade_id = u.upgrade_id
JOIN upgrade_item i ON i.upgrade_group_id = g.upgrade_group_id
JOIN host_role_command hrc ON hrc.stage_id = i.stage_id AND hrc.request_id = u.request_id
ORDER BY hrc.task_id;
MySQL:
SELECT u.upgrade_id, u.direction, u.from_version, u.to_version, hrc.request_id, hrc.task_id, left(g.group_title, 30), left(i.item_text, 30), hrc.status
FROM upgrade_group g JOIN upgrade u ON g.upgrade_id = u.upgrade_id
JOIN upgrade_item i ON i.upgrade_group_id = g.upgrade_group_id
JOIN host_role_command hrc ON hrc.stage_id = i.stage_id AND hrc.request_id = u.request_id
ORDER BY hrc.task_id;
Have fun upgrading.
... View more
Labels:
04-07-2016
11:14 PM
1 Kudo
This happened because a record may be missing in the repo_version table. If you insert the record before performing the Ambari Upgrade it should work.
You can make sure you have a record for each one of the versions.
SELECT from_version, to_version FROM upgrade;
-- Assuming 2.2.0.0-2041 is missing
INSERT INTO repo_version (repo_version_id, version, display_name, upgrade_package, repositories, stack_id) VALUES (1, '2.2.0.0-2041', 'HDP-2.2.0.0-2041', 'upgrade-2.2', '', (SELECT stack_id FROM stack WHERE stack_version = '2.2'));
... View more
04-06-2016
06:14 PM
2 Kudos
This is happening during the upgrade to Ambari 2.2.0
https://github.com/apache/ambari/blob/release-2.2.1-rc2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java#L508-L598 What is the output of running, SELECT upgrade_id, cluster_id, from_version, to_version, direction, upgrade_package, upgrade_type FROM upgrade;
Basically, you have to populate the upgrade_type and upgrade_pack columns based on the versions used.
... View more
04-06-2016
05:44 PM
5 Kudos
Whenever you see a property enclosed by {{ }} it means that the value is interpreted dynamically by reading params.py or params_linux.py E.g., https://github.com/apache/ambari/blob/release-2.2.1-rc2/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py#L120-L148
To change it, you can either modify params*.py to use different logic, edit the value in the Config tab of the UI from the Service Dashboard page, or use configs.sh to edit directly (which calls the API).
... View more
03-31-2016
09:12 PM
2 Kudos
Ambari doesn't support that yet. We have a Jira for Ambari 3.0.0 https://issues.apache.org/jira/browse/AMBARI-14714 It will allow you to have multiple instances of the same service, and potentially at different stack versions, e.g., Spark 1.6.1, 1.7.0, etc.
... View more
03-31-2016
01:32 AM
I believe that in either Ambari 2.1.2 or 2.2.0 we introduced a button to "Pause" the upgrade. This essentially aborts all of the pending tasks from the upgrade so that you can perform operations on your own, such as restarting services. In this "paused" state, we only recommended to start/stop/restart services and change configs; anything that involves changing the topology (adding hosts, adding services, HA, etc.) is likely to result in problems. Because the RU/EU is still technically active (although in an ABORTED state), there will be a button to "Resume" it.
... View more
03-28-2016
06:53 PM
If you see this error, make sure to upgrade Ambari to version 2.1.2 or higher, https://github.com/apache/ambari/blob/release-2.1.2-rc3/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py#L83-L89
... View more