When attempting to start all services through the Ambari UI with "Start All", you may see it fail with an error similar to the following:
resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.3 | tail -1`' returned 1. Traceback (most recent call last):
File "/usr/bin/hdp-select", line 378, in printVersions()
File "/usr/bin/hdp-select", line 235, in printVersions result[tuple(map(int, versionRegex.split(f)))] = f
ValueError: invalid literal for int() with base 10: 'hadoop' ERROR: set command takes 2 parameters, instead of 1
This is caused by a check in /usr/bin/hdp-select to ensure that only the expected directories exist in /usr/hdp/, in this case the current release of HDP (e.g. "18.104.22.168-x"), and "current". If other directories exist in this location, you will be unable to start services via Ambari unless they are started via the "Hosts" section, as opposed to "Start All" on the main screen.
In order to move past this issue, the offending subdirectories of /usr/hdp/ must be removed. Note that this will require manual intervention, and may also require you to update configurations with Ambari's UI to ensure that no services are attempting to write files to subdirectories of /usr/hdp/ other than the two noted above.
More information is available @ https://community.hortonworks.com/questions/29153/ambari-install-failing-because-unable-to-obtain-hd.html.