Validate the config descriptor file against xsd and find out what’s wrong

ARTIFACTORY: How to validate invalid properties from config descriptor

AuthorFullName__c
Paul Pan
articleNumber
000006096
ft:sourceType
Salesforce
FirstPublishedDate
2024-05-16T08:05:22Z
lastModifiedDate
2024-05-16
VersionNumber
1

You can follow the following steps to validate your config descriptor files to find out if there are extra/corrupted properties in it:
1. Download the xsd file. At the top of the config descriptor, you will see the url to download xsd.
https://releases.jfrog.io/artifactory/static-release-virtual/xsd/artifactory/artifactory-v3_3_0.xsd
2. Run the following script against it
$ xmllint --schema ./artifactory-v3_3_0.xsd --noout artifactory.config.xml
3. If you have an extra property (or misspell) that doesn’t belong to the current xsd schema, you will see
artifactory.config.xml:2: element repositoriesGeneralConfig: Schemas validity error : Element '{http://artifactory.jfrog.org/xsd/3.3.0}repositoriesGeneralConfig': This element is not expected. Expected is one of ( {http://artifactory.jfrog.org/xsd/3.3.0}forceNativeDbLocksMechanismInAutoMode, {http://artifactory.jfrog.org/xsd/3.3.0}serverName, {http://artifactory.jfrog.org/xsd/3.3.0}offlineMode, {http://artifactory.jfrog.org/xsd/3.3.0}archiveIndexEnabled, {http://artifactory.jfrog.org/xsd/3.3.0}fileUploadMaxSizeMb, {http://artifactory.jfrog.org/xsd/3.3.0}revision, {http://artifactory.jfrog.org/xsd/3.3.0}addons, {http://artifactory.jfrog.org/xsd/3.3.0}mailServer, {http://artifactory.jfrog.org/xsd/3.3.0}xrayConfig, {http://artifactory.jfrog.org/xsd/3.3.0}security ).
artifactory.config.xml fails to validate

It will show you the line number ( 2 ) and the corrupted elements (repositoriesGeneralConfig)

In this case, repositoriesGeneralConfig doesn’t belong to http://artifactory.jfrog.org/xsd/3.3.0.

We will need to remove it.

You will need to repeat the steps until you see:

artifactory.config.xml validates

Note:
  1. In case of an upgrade, you should always have a backup of the DB and filesystem to fall back. Try moving forward with the upgrade instead of falling back. The artifactory aims to cover situations where you have to fall back and facings issues after restoring to backup.
  2. Make sure you are backing up the config descriptor that you modified so that you can always go back to the initial failing state if needed.