ispconfig does not resopnd on new server after migration

Discussion in 'Installation/Configuration' started by Michel Davoudian, Sep 21, 2024.

  1. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you migrate the server?

    So, were you already able to log in to ISPConfig after the migration? As such, changes can be made through the ISPConfig GUI only. Manually changing things in the database does not affect your system and will not change any configuration, as the changes you make in the database are not valid configuration transactions. Also, IP addresses in the ISPConfig DB do not influence the ISPConfig GUI. The only exception for DB changes is to change records in dns_rr table and run Tools > Resync in ISPConfig afterwards.
     
    Last edited: Sep 21, 2024
    ahrasis likes this.
  3. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    I migrated using the official Migration tool. and there were problems migrating the DBs. So I exported and imported manually on the new server.
    But ispconfig is not working. Maybe a php problem ?

    Or can I re-install ispconfig on the new server ? how ?
     
    Last edited: Sep 22, 2024
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, but you did not manually migrated the dbispconfig database, right?

    Which exact error do you get in the browser? ISPConfig must have been working before; otherwise, you could not have used the Migration Tool. Please run the test script and post the result:

    https://forum.howtoforge.com/threads/please-read-before-posting.58408/

    No, you can not reinstall ISPConfig without starting from scratch. but you can try to update ISPConfig:

    ispconfig_update.sh --force

    and choose to reconfigure services during update.
     
    ahrasis likes this.
  5. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    THe update shows also an error :
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]:
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Creating backup of "/root/.acme.sh" directory...
    Creating backup of "/etc/letsencrypt" directory...
    PHP Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: YES) in /tmp/update_runner.sh.YV2G9lXMWY/install/update.php:258
    Stack trace:
    #0 /tmp/update_runner.sh.YV2G9lXMWY/install/update.php(258): mysqli_connect()
    #1 {main}
    thrown in /tmp/update_runner.sh.YV2G9lXMWY/install/update.php on line 258
     
  6. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    I didn't import manually dbispconfig. Should I ?
    Also, ispconfig wroked on the new server before I Migrate.
     
  7. pyte

    pyte Well-Known Member HowtoForge Supporter

    Did you change your mysql root password on the new server?
     
  8. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    Yes, I did.
    I will import manually dbispconfig
     
  9. pyte

    pyte Well-Known Member HowtoForge Supporter

    Don't do that! Just change the password in the config file.

    The path is: /usr/local/ispconfig/server/lib/mysql_clientdb.conf
    Or just revert back to the old password to fix this. You can check the password with:

    Code:
    mysql -uroot -p
    If that works but the Migration Toolkit still throws an error just re-download the tool into a clean folder and run it again.

    Manually importing the dbispconfig database from another host will most likly break alot of things.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Like @pyte mentioned, please do not do that; it will destroy the setup! Change the mysql root password in the file @pyte mentioned.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw, that you changed the mysql root password is also likely the reason why you had issues importing the databases, database import can not work if you have not set the right mysql root password in the mysql_clientdb.conf file.
     
  12. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    OK, I didn't load the old dbispconfig
    I changed the passwd in the conf file as asked.
    but still no response
     
  13. pyte

    pyte Well-Known Member HowtoForge Supporter

    Can you validate that the password you are using is working when running this command?
    Code:
    mysql -h localhost -u root -p
    If that is working, check the password in /etc/mysql/debian.cnf. Is that the correct one?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you ran the update, was it successful now?
     
  15. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    1) There is no passwd mentioned in /etc/mysql/debian.cnf
    2) I tried to run the update again, still not working.
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]:

    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Creating backup of "/root/.acme.sh" directory...
    Creating backup of "/etc/letsencrypt" directory...
    PHP Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'ispconfig'@'localhost' (using password: YES) in /tmp/update_runner.sh.42kFRWZXm1/install/lib/mysql.lib.php:112
    Stack trace:
    #0 /tmp/update_runner.sh.42kFRWZXm1/install/lib/mysql.lib.php(112): mysqli_connect()
    #1 /tmp/update_runner.sh.42kFRWZXm1/install/update.php(275): db->setDBName()
    #2 {main}
    thrown in /tmp/update_runner.sh.42kFRWZXm1/install/lib/mysql.lib.php on line 112
     
  16. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    I've been using ispconfig for years and it is the first time I have such troubles...
     
  17. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    Maybe Should I restart the migration from scratch ...
    mysql versions are different on the 2 servers. this is the only difference.
    Can I update the mariadb version on the old server to match with the new one ?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you alter the password of the ispconfig mysql user too in mysql? or did you maybe overwrite e.g. the content of the MySQL 'mysql' database manually? Or did you maybe migrated the databases manually in a way that you dumped all databases and then imported all databases in one dump, without excluding databases like dbispconfig and mysql?

    This might be the way to go. Reinstall the new system from scratch and then run the migration tool again to migrate the system. I guess that your manual DB migration overwrote system databases on the new server like mysql or dbispconfig. Take care to re-download the migration tool when doing this as we just released a new version on Friday, which also contains some fixes specific to database migrations between different MariaDB versions, which were needed as some newer mariaDB versions rejected data from older versions now.

    That's fine and usually the case when you migrate to a new server.
     
  19. Michel Davoudian

    Michel Davoudian New Member HowtoForge Supporter

    I have re-installed the new server, updated the mariadb password, etc... Ready to go.
    I will download the latest migration tool as you mention and use it.
    Hopefully it will be OK
    Question : the old server runs Debian 11 and the new one Debian 12. Should I update the old server to Debian 12 ? I don't think this will make a difference.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    No
     
    Michel Davoudian likes this.

Share This Page