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.

[case 106345] Problem in restoring the account or transfer tool from other server

Discussion in 'Data Protection' started by chuvadenovembro, Jul 2, 2014.

  1. chuvadenovembro

    Joined:
    Aug 27, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi Friends,
    I have a big issue on various servers with cpanel 11.44
    When I use the migration tool (transfer tools), it doesn't work properly in many accounts, some of them are not transferred and another accounts are transferred, but with missing MySQL Databases.
    Examples of error warnings:

    Code:
    Failed: 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
    
    The system failed to execute “ALTER DATABASE `anderson_db` DEFAULT CHARACTER SET 'utf8'” because of an error: DBD::mysql::db do failed: MySQL server has gone away
    Failed to remove empty DB “anderson_db”: DBD::mysql::db do failed: MySQL server has gone away
    Saved failed database restore to “/home/anderson/cpmove_failed_mysql_dbs.1403316457” for maunal restoration.
    The system failed to reinstall the MySQL database “anderson_db” as “anderson_db” because of an error: The system failed to connect to the MySQL server as “anderson” because of an error: Unknown database 'anderson_db' at /usr/local/cpanel/Cpanel/DBI.pm line 43.
    
    The “Roundcube” restore module failed because of an error: Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 ...caught
    The problem occurs with several files of backup and migration Tool (transfer tools)

    Servers (Cloudlinux 64bits + CSF + CXS + WAF Comodo + Cpanel 11.44 + apache 2.2.X or 2.4.X)

    Anyone else with this problem?
     
  2. P00r

    P00r Registered

    Joined:
    Jun 4, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem with a very similar configuration, using cloudlinux as well, only not using WAF Comodo rules :)

    I am trying a manual restore, the transfer looked good but then own cloud started crashing... (the account is an owncloud install mainly)
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Please check to see if /var/lib/mysql/mysql.sock is symbolically linked to /tmp/mysql.sock on the source and destination servers. If not, run this command:

    Code:
    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    Thank you.
     
  4. chuvadenovembro

    Joined:
    Aug 27, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Michel,

    On my servers, this was exactly the problem
     
  5. ssavchenko

    ssavchenko Registered

    Joined:
    Oct 10, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Maybe the same problem.

    The manual backup from:
    CENTOS 6.5 x86_64
    WHM 11.44.0 (build 19)
    to WHM 11.44.0 (build 18)
    # readlink -f /tmp/mysql.sock
    /var/lib/mysql/mysql.sock

    Error:
    Code:
    The system failed to execute “ALTER DATABASE `username_dbname` DEFAULT CHARACTER SET 'utf8'” because of an error: DBD::mysql::db do failed: MySQL server has gone away
    Failed to remove empty DB “username_dbname”: DBD::mysql::db do failed: MySQL server has gone away
    Saved failed database restore to “/home/username/cpmove_failed_mysql_dbs.1404412357” for maunal restoration.
    The system failed to reinstall the MySQL database “username_dbname” as “username_dbname” because of an error: The system failed to connect to the MySQL server as “username” because of an error: Unknown database 'username_dbname' at /usr/local/cpanel/Cpanel/DBI.pm line 43.
    Same for the others DB
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please open a support ticket if creating the symbolic link does not help. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider

    Please check your my.cnf to make sure you do not have a very low wait_timeout that is causing mysql connections to be dropped. We have opened case 106345 to handle some of the very low wait_timeouts (the default is 28000s https://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout) we have seen (some 15 seconds).
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, a resolution for internal case number 106345 is included with cPanel version 11.44.0.27:

    Fixed case 106345: Transfers abort with SIGPIPE if the mysql timeouts are too low.

    Thank you.
     
Loading...

Share This Page