It seems this occured because before I was cancelling an upgrade.
I didn’t do the steps mentioned at the end of this page
https://help.sonatype.com/repomanager3/installation-and-upgrades/upgrading-from-nexus-repository-manager-2/upgrade-procedures
In a second run, after I did all the cleaning. I went well.