u/URPissingMeOff

▲ 7 r/cpanel

Update fails due to previous failed transfers

As a one-man show, I'm still a bit frazzled over the 3 kernel and 4-5 cPanel exploits that have come out in the last 2 weeks. I'm still rebuilding from the first CP exploit where a couple of my servers got hit.

Due to the massive amount of work involved, I have gotten into a "trust the process" mindset to help cope. I've been setting up manual CP updates in a shell and letting them run, assuming all would be well and not looking too closely at the process.

BIG mistake. I happened to glance at one of my machines after the update completed and noticed that it FAILED due to previously failed and still pending transfers stuck in the system. (I have been in business as a cPanel partner for 23 years and some of my oldest accounts still have ancient baggage that doesn't transfer properly). Naturally, I went into WHM and attempted to abort the failed/pending ones. As a quick google search will show, this has seemingly NEVER worked in the history of cPanel. The system fails to void them. The manual CLI instructions provided by cPanel also fail to work. It can't even find the file cPanel is telling you to examine. Since these last few updates have been life and death issues for the servers, I had to manually hack a solution to get the updates to complete. THIS IS COMPLETELY UNACCEPTABLE, cPanel. Fix your broken shit. It's been decades!

If you are suffering from this same issue, here's how I fixed it. This probably breaks something, but it allows the update to complete. First, check the last update to see if it completed properly

tail /var/cpanel/updatelogs/last

If you see "100%" on the 3rd line and "Completed all updates" on the last one, you are probably good and you can go about your business. If it says anything about the update not completing because of failed transfers, you can try the factory recommendations, but don't hold your breath. They probably won't work for you either. Here's what I did. USE AT YOUR OWN RISK

cd /var/cpanel
mv /var/cpanel/update_blocks.config /var/cpanel/update_blocks.config.bak
mkdir temptransfers
cd transfer_sessions
mv * ../temptransfers

The obvious side effect of this is that it removes all historical transfers/restores from the "Review Transfers and Restores" window. I guess you can move everything back to where it was, but that's just going to mean that the next update will fail again. The trouble seems to be a bad entry in "whmxfer.sqlite", but that's not a DB than I'm fluent in, so I depend on cPanel to not screw things up. That trust is clearly misplaced.

reddit.com
u/URPissingMeOff — 7 days ago