The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Kill transfer on new transfer tool

Discussion in 'General Discussion' started by sozotech, Jul 14, 2014.

  1. sozotech

    sozotech Well-Known Member

    Joined:
    Jul 26, 2013
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Running WHM 11.44.0 (build 22) and I started a transfer which appeared to hang when viewing /usr/local/cpanel/bin/view_transfer as well as the web interface. So I killed all of the PID's that view_transfer showed but in the web interface it still shows the process is running in a PAUSED state. How can I clear this out because it won't let me start a new transfer until I do.

    Thanks,
    Eric
     
  2. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    91
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Try these commands you can find the PID's of process still running

    ps -aux | grep pkgacct
    ps-aux | grep restorepkg
     
  3. sozotech

    sozotech Well-Known Member

    Joined:
    Jul 26, 2013
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    This is using the new transfer tool. Regardless neither of these processes are running on the source or destination server. I see the session information is in /var/cpanel/transfer_sessions/. Should I just delete the directory for this session?

    Best regards,
    Eric

    Best regards,
    Eric
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please open a support ticket so we can take a closer look. You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
  5. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    We have added the ability to abort a in progress transfer with case 106025.

    This functionality is currently scheduled to be published in the next minor release (11.44.2) and the next major release (11.46.0).

    As 11.46.0 is currently scheduled to be published before then 11.44.2, is likely that 11.46.0 will available before the 11.44.2 maintenance release.

    When an 11.46 build becomes available with this case, the change log will be here:
    http://documentation.cpanel.net/display/ALD/11.46+Change+Log

    When an 11.44 build becomes available with this case, the change log will be here:
    http://documentation.cpanel.net/display/ALD/11.44+Change+Log
     
  6. calvomat

    calvomat Registered

    Joined:
    Sep 4, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am running WHM 11.44.1 (build 17) and have the same problem with hang failed transfers.
    In "Review Transfers and Restores" on the web interface I can see two transfers under RUNNING Sessions and one under PAUSING Sessions, and they are all stopped but there is no way to cancel them.

    I understand that this will be fixed in 11.44.2, but how can I manually fix it in the meantime?

    Thanks.
    Matias
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can manually mark the transfer as completed using the following instructions:

    1. Ensure the transfer is no longer running by clicking on the “View” option under "Sessions in Progress" for this transfer. In the new window, there will be a line that looks like this:

    Code:
    You may close this window and view the transfer on the command line: /usr/local/cpanel/bin/view_transfer 1054056copya201407021337529eG8A76iJY
    Access your server via SSH and run that command (the transfer name will be different on your server):

    Code:
    /usr/local/cpanel/bin/view_transfer 1054056copya201407021337529eG8A76iJY
    As an example, you might see output like this:

    Code:
    Transfer running with pid: 795
    [795   ][MASTER     ]: Start Session
    [795   ][MASTER     ]: Version: 1.9
    [795   ][MASTER     ]: Queue “TRANSFER” items: 1
    [795   ][MASTER     ]: Queue “RESTORE” items: 1
    [795   ][MASTER     ]: Remote Host: 10.1.1.1
    [797   ][TRANSFER:1 ]: Starting Account: “cptest”
    [797   ][TRANSFER:1 ]: Account “cptest”: success
    [797   ][TRANSFER:1 ]: Progress: 100%
    [797   ][TRANSFER:1 ]: Child Complete
    [ERROR ][MASTER     ]: Error: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm line 42
    [ERROR ][MASTER     ]: Error: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm line 42
    You will note that the master PID for this transfer is 795. If the process still exists, and the transfer has failed, then you can kill that process:

    Code:
    kill -9 795
    2. The next step requires you to change the entry for this transfer in the whmxfer.sessions table in MySQL. Find the entry with the session ID for your migration. In the example we have been using, it's '1054056copya201407021337529eG8A76iJY.' It will look like this:

    Code:
    -bash-4.1# mysql -e "select * from whmxfer.sessions where sessionid='1054056copya201407021337529eG8A76iJY'"
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+
    | sessionid                            | initiator | pid  | version | target_host               | source_host | state | starttime           | endtime |
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+
    | 1054056copya201407021337529eG8A76iJY | copyacct  |  795 |     1.9 | hostname.server | 10.1.1.1 |    20 | 2014-07-02 08:37:52 | NULL    |
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------+
    You will need to change the 'state' field to 100, and change the 'endtime' field from NULL to a time after the 'starttime' field:

    Code:
    -bash-4.1# mysql -e "update whmxfer.sessions set state='100', endtime='2014-07-02 09:37:52' where sessionid='1054056copya201407021337529eG8A76iJY'"
    Thus, the output then looks like this:

    Code:
    -bash-4.1# mysql -e "select * from whmxfer.sessions where sessionid='1054056copya201407021337529eG8A76iJY'"
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+
    | sessionid                            | initiator | pid  | version | target_host               | source_host | state | starttime           | endtime             |
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+
    | 1054056copya201407021337529eG8A76iJY | copyacct  |  795 |     1.9 | hostname.server | 10.1.1.1  |   100 | 2014-07-02 08:37:52 | 2014-07-02 09:37:52 |
    +--------------------------------------+-----------+------+---------+---------------------------+-------------+-------+---------------------+---------------------+
    The transfer should then no longer appear under "Sessions in Progress."

    Thank you.
     
    j_hc and eva2000 like this.
  8. pdelteil

    pdelteil Registered

    Joined:
    Sep 15, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Rio de Janeiro, Rio de Janeiro, Brazil
    cPanel Access Level:
    Website Owner
    As a matter of fact, more step are required to kill the transfer process.

    You need to know the pid of all the current transfers (usually up to 5), in my case, I had to very big accounts being transfered (40 and 70 GBs each).

    Some steps
    1) Run the /usr/local/cpanel/bin/view_transfer 1054056copya20140XXXXXX
    2) Find the transfers or restores still running.
    3) Do kill -9 PID (where PID is the pid of all the processes still running)

    Then do the update on the db, as mentioned above.
     
  9. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Killing the restore processes with signal 9 may corrupt account data and leave the account in a broken state (and may damage some of configuration data).

    You should be able to safely terminate the TRANSFER processes and the main transfer_session process with kill -TERM, however the RESTORE processes need to complete to avoid potentially breaking the system.
     
  10. comma2007

    comma2007 Member

    Joined:
    Dec 7, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    this thread is very usefull and I used the Michael procedure to stop a stuck transfer.

    I've now a stuck Restoring Account from a Backup Restoration, showing "Restoring Account" from 30 hours, even if the account is only 300 MB. The backup was not restored.

    I checked the "/usr/local/cpanel/bin/backup_restore_manager state" :
    Code:
    # /usr/local/cpanel/bin/backup_restore_manager state
    is_active=0
    start [active]
    
    ======[ motori ]==============================
    give_ip = 0
    mail_config = 1
    mysql = 1
    subdomains = 1
    restore_point = 2014-12-30
    
    end [active]
    
    start [pending]
    
    end [pending]
    
    start [completed]
    
    end [completed]
    
    reason = OK
    result = 1
    
    I tried all the "Actions" in the restoration page (Clear pending accounts, clear...) but nothing. I checked for running processes but nothing.

    What can I do? I can't make any more restoration.

    Thank you
     
    #10 comma2007, Jan 2, 2015
    Last edited: Jan 2, 2015
  11. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Please open a ticket using the link in my signature and post the # here.
     
  12. comma2007

    comma2007 Member

    Joined:
    Dec 7, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I opened a ticket with ID 5909427

    Thank you
     
  13. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Just to update this thread, our analyst found that there was a stale file located at /var/cpanel/backups/queue/restore_queue.stor that was holding the information on the job, and not updating properly.

    He moved that file to a backup location and then re-ran the backup_restore_manager state command, which solved the issue.
     
  14. Jared Long

    Jared Long Member

    Joined:
    Sep 19, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pflugerville, Texas, United States
    cPanel Access Level:
    Root Administrator
    Hello,

    My team and I have tried the steps above to kill a transfer stuck in the "aborting" state. The transfer in question shows as "completed" in WHM, but when you view the transfer it still says "aborting".

    We also do not have a /var/cpanel/backups/queue/ directory, so that does not seem to be the solution. (please forgive my ignorance).

    We are using WHM 11.48 build 4.

    Can anyone point me to where the data for the session may still be stored?
    Regards,
    -Jared Long
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  16. LUG

    LUG Registered

    Joined:
    Nov 5, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    SP
    cPanel Access Level:
    DataCenter Provider
    Hello

    We're facing the same situation described by Jared (Ticket 7374685)

    Session is "ABORTING" for about 10 hours (i mean it's stuck). We tried all the workarounds from posts above but still unable do fix de issue.

    Tnks
     
  17. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please feel free to open a ticket about this as mentioned above.
     
  18. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    To update, per ticket number 7375633, it looks like the best explanation for why this happened is that MySQL was not running when it came time to update the "Aborting" status for the transfer progress as listed in Web Host Manager.

    Thank you.
     
Loading...

Share This Page