October 19

How to terminate an active transfer when the transfer process no longer exists

Symptoms
Transfers hang indefinitely or cannot be terminated.

Description
A transfer will still have an active session if the transfer process is terminated outside of the “Review Transfers and Restores” interface, such as when the server is rebooted while a transfer is running. This is because the transfer session’s state is stored in an SQLite database, and is not associated with a specific PID.

Workaround
Please note that this workaround should only be implemented if the transfer (rsync) process no longer exists.

1. Access the server’s command line as the ‘root’ user via SSH or “Terminal” in WHM.
2. Run the following command to Identify the unfinished transfer’s session ID.
/usr/local/cpanel/3rdparty/bin/sqlite3 /var/cpanel/transfer_sessions/whmxfer.sqlite "select sessionid from sessions where state != '100'"

3. Run the following command to change the session ID to the completed state.

/usr/local/cpanel/3rdparty/bin/sqlite3 /var/cpanel/transfer_sessions/whmxfer.sqlite "update sessions set state='200', endtime=date('now') where sessionid='$sessionID'"

Please note that “$sessionID” must be replaced with the session ID found from the previous command.

It is copy of the guide written by Daniel Pearsall that is stored here