Community Articles
Find and share helpful community-sourced technical articles
Labels (1)

Problem: There's a known bug in Ambari 2.4 and 2.5 that causes "ambari-server upgrade" to fail if the agent RPM is not upgraded first.

E.g. stack trace:

Using python /usr/bin/python Setup ambari-server Traceback (most recent call last): File "/usr/sbin/", line 33, in from ambari_server.dbConfiguration import DATABASE_NAMES, LINUX_DBMS_KEYS_LIST File "/usr/lib/python2.6/site-packages/ambari_server/", line 28, in from ambari_server.serverConfiguration import decrypt_password_for_alias, get_ambari_properties, get_is_secure, \ File "/usr/lib/python2.6/site-packages/ambari_server/", line 36, in from ambari_commons.os_utils import run_os_command, search_file, set_file_permissions, parse_log4j_file ImportError: cannot import name parse_log4j_file

Cause: This occurs because and other python files inside of /usr/lib/ambari-agent/lib/ambari_commons are upgraded by the agent's RPM and are used by the server's scripts to find which database to use.

Solution: Note: Always back up your Ambari database before the upgrade.

If ambari-agent is also present on the Ambari Server host, run "yum upgrade ambari-agent" (or equivalent for your OS).

0 Kudos
Don't have an account?
Version history
Revision #:
1 of 1
Last update:
‎05-03-2017 10:01 PM
Updated by:
Top Kudoed Authors