Support Questions

Find answers, ask questions, and share your expertise

Error upgrading Ambari 2.4.2 to 2.5.1 when ambari-server upgrade

avatar
Explorer

I'm upgrading Ambari from 2.4.2 to 2.5.1 on HDP 2.4.3, with CentOS 6.

I follow the instructions from https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-upgrade/content/upgrade_ambari.ht... .

However when I got to step 9 - ambari-server upgrade I got an error:

Using python  /usr/bin/python
Upgrading ambari-server
Traceback (most recent call last):
  File "/usr/sbin/ambari-server.py", line 39, in <module>
    from ambari_server.serverSetup import reset, setup, setup_jce_policy
  File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 88, in <module>
    JDBC_DB_OPTION_VALUES = get_supported_jdbc_drivers()
  File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 85, in get_supported_jdbc_drivers
    factory = DBMSConfigFactory()
  File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration.py", line 344, in __init__
    from ambari_server.dbConfiguration_linux import createPGConfig, createOracleConfig, createMySQLConfig, \
  File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration_linux.py", line 49, in <module>
    from ambari_commons.inet_utils import wait_for_port_opened
ImportError: cannot import name wait_for_port_opened


1 ACCEPTED SOLUTION

avatar
Explorer

Forget to upgrade the ambari-agent on the server host.

As a result an older version of ambari_commons/inet_utils.py was left in python packages: /usr/lib/python2.6/site-packages/resource_monitoring/ambari_commons/inet_utils.py

After upgrading also the agent python package also was also updated.

View solution in original post

1 REPLY 1

avatar
Explorer

Forget to upgrade the ambari-agent on the server host.

As a result an older version of ambari_commons/inet_utils.py was left in python packages: /usr/lib/python2.6/site-packages/resource_monitoring/ambari_commons/inet_utils.py

After upgrading also the agent python package also was also updated.