Trouble after migrating to multi server setup

Discussion in 'Installation/Configuration' started by [email protected], May 2, 2025.

  1. Hi
    I just completed changing my ISPconfig setup from 1 server + 3 mirror dns servers, to setup:
    controlpanel + main db
    webserver1
    mailserver1
    mailserver2
    dns1
    dns2-3 mirrors of 1
    Webmail server
    Most things work well but I can not change sites every site comes with the error Please select a valid Server. Server ID must be > 0.
    I also noted that even though I wanted webservers to have local database there is no site data in the webservers local database so i really have no idea how they work or how to set up an new web since it does error in contol panel and to my knowledge all
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you migrate the servers?
     
  3. Servers were migrated using ISPconfig Migration tool, control panel first and then web, DNS and mail to their destinations.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check System > server services to ensure the web servers where the sites are located on have web server service enabled. if these servers shall also provide databases for the sites, then database services must also be enabled.
     
  5. It is enabled see table
    Server
    Name Mail Web DNS File DB
    controlpanel No Yes No Yes Yes -- contol panel, master SQL
    WEB1 No Yes No Yes Yes -- Main webserver
    Mail1 Yes Yes No Yes Yes -- main mailsever
    Mail2 Yes Yes No Yes Yes -- mirror of mail1
    DNS1 No Nc Yes No Yes -- main DNS
    DNS2 No No Yes No Yes -- mirror of dns1
    DNS3 No No Yes No Yes -- mirror of dns1
    DNS4 No No Yes No Yes -- mirror of dns1
    Webmail No Yes No Yes Yes
    WEB2 No Yes No Yes Yes -- mirror of WEB1

    Database on web1 does not have site databases according to web1 phpmyadmin, still all sites are working and are configured to use localhost database.
    If any change is made in websites on save we get this error Please select a valid Server. Server ID must be > 0.
    Regards Stefan
     
  6. Hi
    I'm sorry how the table turned out but all servers seem to have yes in the right places.
    I checked Server ID column in ispconfig database and it had 0 in every record maybe that is the culprit, I have how ever no idea if or how it would be sensible to change it.
    Or does this belong in different thread?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    In which table do you have server_id = 0?
     
  8. Hi
    Sorry fort the late reply, server_ID is 0 on all imported webs in controlpanels localhost - dbispconfig -[​IMG] web_domain
    My main web server is server_ID 2, do you think that it is advisable to change the 0 to 2 on the imported web sites ?
     
  9. I did a test and it seems to work, now it just forming the Query to fix the table, and figure out where to create the data base for all to work.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    That's really strange, never seen that. If it works, you can fix it in the database and then use Tools > resync to write the changes to disk.
     
  11. It seems to have gone wrong in Migration but changing sever_id fixed it, now I can manage web sites again.
     
  12. Now since all sites claim to reside on the web server none of them reaches database since it does not replicate from control panel master database, how can I fix that, it should do that according to my understanding when using multi server setup.
    Or do I need to export all db from min SQL to the webserver ?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Not sure what you mean. The cms systems in your websites do not connect to your new database server? Have you checked their config files if they contain the correct database server? And if that's the case, do the database exist on the database server and does it contain the actual database data?
     
  14. This is ok form outside I got to figure out how to fix my internal network nating, sorry
     
  15. data bases are still non exsistent on web servers SQL database server, they are on the control panels SQL DB server, I ho ever can't figure out how websites are serving the WordPress sites that reside on the web server and have their database host configured as localhost.
    All webs on webserver show up from local networks with no data base connection but are ok coming from outside, there must be some logic in this that I'm missing.
    Checked DBs using cli to be shure.
     
    Last edited: May 9, 2025
  16. Hi, it has been quite eventful since my last post, once I resynced all tables dissappeared from both servers and all sites down.
    I fortunately had them available few days old backup.
    Since all CMS are set up for database host = locahost I read them into the web servers dbserver with out them coming up, once I read them into control panel dbserver they came in.
    This is fully unrational behavior and frankly should not work this way.
    I'm almost up again so once I get fully up I will have to figure out how it all works.
     
  17. Hi
    I'm finally operational for most part, I however can't get contol panel to create databases on web-server for webs, so I have to create the db in phpMyAdmin, db user seems to be OK, and now at least for new webs they are using web servers database server.
    That leaves only creating database on other server left.
    I also am not quite sure if all client databases have to exist on the main Database server on control panel server, I'm somewhat reluctant to have extra data that is possibly not current lying around where it does not belong.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Use debug mode to find out why your multiserver setup is not able to create databases, chapter 5 from this guide:

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

    Don't create databases or database users manually; you will not be able to manage them with ISPConfig. I recommend formatting your new systems and starting over; something is completely wrong with that setup, and it's unlikely it will work stable without being set up correctly.

    Databases shall exist only on the database server where they belong to. I guess your issue is still with having server_id = 0 for records. Database users with server_id = 0 must exist in all ISPConfig databases (they are not created in mysql unless used), but databases never have server_id = 0, if you would create them with ID 0, then they would be created on all systems.
     
  19. Now it seems to be impossible to generate Let's encrypt certificate for web sites nothing happens on either server they only check own certificates acme log has no other requests.
     
  20. Found out that SNI tick was missing in Web servers settings > web > SSL certificates are no generated
     

Share This Page