For help with fixing the issue, I was just talking with someone about it here: Delete_orphaned_content error pulp3: SSL_connect - #27 by smoyson
The main question to start fixing is - is the error happening on orphan cleanup on a smart proxy or on the main Katello server?
The first thing to try is finding the related repository or CV (if there is one) and resync it or republish the metadata. If no CV or repo is involved and the content is truly orphaned, then the distribution in Pulp that is distributing the orphan repository version needs to be deleted first. That’s what the links I sent help with.