[FATAL] Data not found for subdomain (ID 4)

  • Hello everyone,


    I'm having trouble after a recent upgrade from Ubuntu 16.04 to Ubuntu 18.04, after the upgrade I re-ran the i-MSCP installer and it wouldn't install giving out an error about Data not found for subdomain, so I manually deleted the conflicting subdomains from the mysql database thinking that after a successful install I can just re-add them back, the problem is that now they are stuck in Addition in progress... and when i try to run perl /var/www/imscp/engine/imscp-rqst-mngr -v it gives out the following error :


    Code
    1. [FATAL] iMSCP::DbTasksProcessor::_processModuleDbTasks: Modules::Subdomain::_loadData: Data not found for subdomain (ID 4) at /var/www/imscp/engine/PerlLib/Modules/Subdomain.pm line 156, <$fh> line 408.
    2. ...propagated at /var/www/imscp/engine/PerlLib/iMSCP/DbTasksProcessor.pm line 496, <$fh> line 408.

    I tried to edit the database and change de subdomain status from toadd to -> ok, now the addition in progress disappeared but the subdomains still don't work, when I try to dig @localhost they won't resolve.

    Any ideas how to fix this ?!


    Forgot to mention, i-MSCP version 1.5.3 Build: 2018120800 running on Ubuntu 18.04

  • Good evening,


    The module that is responsible for subdomains processing join many database tables while retrieving data. Therefore, if one of required data is not found in a specific table, this can lead to such error. Data not found generally mean that data from another table doesn't exists.


    Anyway, you should really avoid removing database rows manually. By doing this, you can end with corrupted database, producing worse result. So here, you have a subdomain with ID 4. For that subdomain please check the following:

    • The parent domain exists: In the subdomain table, search for the domain_id column value, then check that the corresponding ID exists in the domain table.
    • The IP address assigned to the parent domain exists: In the domain table, search for the domain_ip_id column, then make sure that the referenced ID exist in the server_ips table.

    Please next time, ask us before doing anything... Asking us after playing with something you don't understand is not really the right way. A customer that is processing such way would lose free support.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thank you for your reply Nuxwin but Bulli managed to help me out before you posted the reply, big thanks to him for the support.

    Quote

    Please next time, ask us before doing anything... Asking us after playing with something you don't understand is not really the right way. A customer that is processing such way would lose free support.

    You have to understand that I didn't have much choices, it is a production server which could only be upgraded during the night because during the day there is intense traffic. So when I updated from Ubuntu 16.04 to 18.04, rebooted, ran the imscp-autoinstall with the same version which was installed on 16.04 and the installer would quit spitting errors I panicked, the server cannot be offline for a very long period of time and services must be running, with the installer failing and everything offline at 2 AM I didn't have much choice but to try to fix the errors which were displayed in the setup dialog in order to successfully install i-MSCP and resume the services, thinking that after everything is running I can correct the errors manually. I don't see any other way I could have played this. I'm not really sure what the exact problem was, Bulli knows better, he fixed it, but I suspect something went wrong with the secondary IP of the server during the upgrade, which I also had to remove manually from the sql database before being able to successfully install i-MSCP, but by removing the IP manually after your reply I realize that most likely that was the cause why the subdomains kept failing and giving the error because they were assigned to the secondary IP and the secondary IP was deleted. At least now I have a better understanding of some things. :rolleyes:

  • but I suspect something went wrong with the secondary IP of the server during the upgrade, which I also had to remove manually from the sql database before being able to successfully install i-MSCP, but by removing the IP manually after your reply I realize that most likely that was the cause why the subdomains kept failing and giving the error because they were assigned to the secondary IP and the secondary IP was deleted. At least now I have a better understanding of some things.

    Exactly ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206