getting error while upgrading chef frontend from 12.17.33 to 14.5.29

Basically, I am trying to upgrade my chef frontend from 12.17.33 to 14.5.29 While running chef-server-ctl upgrade command on the frontend servers, I am getting the below error.

execute[oc_id_schema] action run
    
    ================================================================================
    Error executing action `run` on resource 'execute[oc_id_schema]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Command execution failed. STDOUT/STDERR suppressed for sensitive resource
    
    Resource Declaration:
    ---------------------
    suppressed sensitive resource output
    
    Compiled Resource:
    ------------------
    suppressed sensitive resource output
    
    System Info:
    ------------
    chef_version=15.17.4
    platform=centos
    platform_version=7.9.2009
    ruby=ruby 2.6.7p197 (2021-04-05 revision 67941) [x86_64-linux]
    program_name=/opt/opscode/embedded/bin/chef-client
    executable=/data/opscode/embedded/bin/chef-client

These are all the steps I am following for the upgrade.

  1. yum install -y chef-server-core-14.5.29-1.el7.x86_64.rpm
  2. sudo chef-server-ctl stop
  3. CHEF_LICENSE='accept' chef-server-ctl upgrade

I was able to install the rpm. However, the upgrade command is failing. Would you please help me to figure out, what exactly is the problem