OneClick Upgrade Fails On fediz_config.xml - "keyStore" must not contain the '<' character

book

Article ID: 225078

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction


While upgrading OneClick  from 10.4.1 to  21.2.2 the install fails and the following error is seen in the postinst.xx.xx log file

********** Started: Wed Sep 29 10:33:33 2021 **********
running Custom Script Install-Tools/CUS/tomct.cus
 Starting tomct.cus
Tomcat upgrades from: 10.4.1.0.215 09/28/2021 17:12
~
~
Updating log4j configuration
Starting ServerConfigurationCreator
[Fatal Error] fediz_config.xml:9:33: The value of attribute "file" associated with an element type "keyStore" must not contain the '<' character.
com.aprisma.tomcat.install.TomcatConfigException: Error occurred while updating SAML config files.
org.apache.commons.configuration2.ex.ConfigurationException: Error parsing file:/opt/Spectrum/Install-Tools/LOGS/21.2.2.0.15_xxxxxxxx/tomcatBackup/fediz_config.xml
 at com.aprisma.tomcat.install.ServerConfigurationCreator.updateSAMLConfigs(ServerConfigurationCreator.java:321)
 at com.aprisma.tomcat.install.ServerConfigurationCreator.doCreateConfiguration(ServerConfigurationCreator.java:234)
 at com.aprisma.tomcat.install.ServerConfigurationCreator.createConfiguration(ServerConfigurationCreator.java:122)
 at com.aprisma.tomcat.install.ServerConfigurationCreator.main(ServerConfigurationCreator.java:98)

** ERROR during creating tomcat configurations

Script Install-Tools/CUS/tomct.cus has FAILED
********** Completed: Wed Sep 29 10:33:35 2021 **********
 

Cause


The installer was trying to preserve settings from the just backed up fediz_config.xml file and ran into a parse error due
   to an improperly formatted word. The fediz_config.xml file contained <SPECROOT> inside of xml tags.


example line that caused the parse errors

<keyStore file="<SPECROOT>/custom/keystore/cacerts" password="changeit" type="JKS" />

Environment

Release : 10.4.x, 21.2.x

Component : OneClick

Resolution


Manually modified the backed up fediz_config.xml changing the <SPECROOT> reference to $SPECROOT
  
  /opt/Spectrum/Install-Tools/LOGS/21.2.2.0.15_xxxxxxxx/tomcatBackup/fediz_config.xml
  ~
   <keyStore file="$SPECROOT/custom/keystore/cacerts" password="changeit" type="JKS" />


Reran the 21.2.2 installer which completed successfully and Spectrum is fully functional.

Additional Information


Preventative Measure:
     Check existing fediz_config.xml files for <SPECROOT> and if found, change to $SPECROOT prior to running the upgrade. If not found then
        the problem should not occur.

     Using find/exec/grep  from bash (replace install dir /usr/Spectrum as necessary)

    find /usr/Spectrum/ -name fediz_config.xml -exec grep keyStore {} \;