Pivotal Knowledge Base


After upgrading to Ambari 2.1.2 from Ambari 1.7.1, PXF will not start with the error message "'format_stack_version' is not defined"


Product Version
Pivotal HD 3.0.x
Ambari 1.7.1 / 2.1.2
PXF  2.5


After upgrading from Ambari 1.7.1 to Ambari 2.1.2, PXF fails to start via Ambari with the following error in the Ambari GUI:

Error Message:

If the log is reviewed in the Ambari GUI, the following error message will be seen:

File "/var/lib/ambari-agent/cache/stacks/PHD/3.0/services/PXF/package/scripts/pxfservice.py", line 19, in start
File "/var/lib/ambari-agent/cache/stacks/PHD/3.0/services/PXF/package/scripts/pxfservice.py", line 12, in configure
import params
File "/var/lib/ambari-agent/cache/stacks/PHD/3.0/services/PXF/package/scripts/params.py", line 23, in <module>
stack_version = format_stack_version(stack_version_unformatted)
NameError: name 'format_stack_version' is not defined


This is due to a software bug; there is a call to a function that does not exist.


To avoid running into this issue, HAWQ, PXF, and the HAWQ AMBARI plugin should be updated before upgrading AMBARI to version 2.1.2.

If Ambari has already been updated to version 2.1.2, follow one of the actions below:


  • Take these steps on the Ambari node as user "root":
1. Open /var/lib/ambari-server/resources/stacks/PHD/3.0/services/PXF/package/scripts/params.py in a Linux text editor.
2. Replace the following line: 
stack_version = format_stack_version(stack_version_unformatted)
With this usage: 
stack_version = format_phd_stack_version(stack_version_unformatted)
3. Restart ambari-server. 
ambari-server restart
4. Restart ambari-agent on all nodes.
ambari-agent restart


 Internal Comments

Notes: Discussed in https://jira.eng.pivotal.io/browse/GPSQL-3266 


Powered by Zendesk