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]'
    Command execution failed. STDOUT/STDERR suppressed for sensitive resource
    Resource Declaration:
    suppressed sensitive resource output
    Compiled Resource:
    suppressed sensitive resource output
    System Info:
    ruby=ruby 2.6.7p197 (2021-04-05 revision 67941) [x86_64-linux]

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