Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar

Consider my cluster is having SSO configured and my SSO certificate contains character larger than 2048 and i am upgrading to ambari-2.7.0 using the command : ambari-server upgrade

There is a high chance your upgrade will get stuck at schema upgrade phase and in the ambari-server log you will find the below exception :

Internal Exception: java.sql.BatchUpdateException: Batch entry 2 INSERT INTO ambari_configuration (property_name, category_name, property_value) VALUES ('ambari.sso.provider.certificate','sso-configuration',<LONG VERTIFICATE VALUE>') was aborted: ERROR: value too long for type character varying(2048)  Call getNextException to see other errors in the batch.

Root Cause : While upgrade to ambari-2.7.x + versions ambari will move the sensitive data from ambari.properties to ambari database table : ambari_configuration . if any of this sensitive data contains more than 2048 characters it will fail. usually certificates issues wont be more than 2048 characters but some cases if its higher than 2048. you might hit the abouve error.

This issue is fixed in Ambari-2.8 as part of : https://issues.apache.org/jira/browse/AMBARI-24992

the work around here is :

  1. Edit the ambari.properties file and remove the entry for authentication.jwt.publicKey
  2. Perform the Ambari upgrade
  3. Manually alter the database:
ALTER TABLE ambari_configuration ALTER COLUMN property_value TYPE VARCHAR(4000);

NOTE: This syntax is specific to Postgres

4. Manually insert the relevant PEM file's contents into the database

INSERT INTO ambari_configuration(category_name, property_name, property_value) 
VALUES ('sso-configuration', 'ambari.sso.provider.certificate', '<CONTENT OF THE PEM FILE>');

5. Restart ambari database

1,432 Views
0 Kudos
Version history
Last update:
‎12-19-2018 06:08 PM
Updated by:
Contributors