This domain name already exists

Discussion in 'Plesk Automation Suggestions and Feedback' started by ChristianCr, Feb 14, 2014.

  1. ChristianCr

    ChristianCr Kilo Poster

    I'm sure this must have been encountered before.

    I've seen a few posts regarding Plesk Panel, but nothing specific to PPA

    The issue is effectively that we created a subscription with the domain. Which has since been deleted. The domain now wants to be added to another subscription on the account.

    The domain can be seen in both the PBAS and PPA domains and everything seems to point at the right subscriptions. I presume all this is right as we have other domains quite happily added to the subscription in a similar manner.

    Does anyone have an insight on how to remove this issue? I'm not really wanting to rip out the entire domain from the system as we spent the morning putting in 132 records, due to a bizarre lack of bulk insertion tools.
  2. Andrew Andriatis

    Andrew Andriatis Odin Team

    Can you, please, clarify the situation? What I read is:
    1. You are creating a subscription with a domain, which used to exist before, but was deleted.
    2. The creation of a new subscription fails, but you see the domain in PBAS and PPA assigned to the right subscription.

    The questions are:
    - where do you see the failure - in PBAS or PPA?
    - what is exactly the error message seen? Is there a particular task in subscription provisioning that failed?

  3. Andrey Dobrenko

    Andrey Dobrenko Odin Team

    Hi, ChristianCr,

    The situation when customer creates a new webspace using existing a domain name will be improved in MU#03. It's your case. Right now, no way to assign a domain to webspace. Thanks!
  4. ChristianCr

    ChristianCr Kilo Poster

    I see the error through the PBAS panel for the customer.

    When I try to add website or a domain forwarder it tells me "This domain name already exists" in the page.

    So customer control panel -> Websites -> Add New Domain

    I either

    Add the new domain as "Website Hosting" pointing it to the existing used folder


    Add "Forwarding" and add "Standard Forwarding" pointing to the other working domains.

    In both situations it gives me the error "This domain name already exists"

    There is only one webspace in the account. We have several other domains assigned in this way. I am presuming something is stuck inside the system.
    If I could find out how to find what is stuck I am happy to do some manual removing.

    As a confirmation, I tried also to change the domain on the website, and also received the same error
    Last edited: Feb 17, 2014
  5. ChristianCr

    ChristianCr Kilo Poster

    So I've done a bit more digging.

    Having not seen anything on the PPA node or PBAS node that appears to be amiss. I decided to have a dig on our plesk panel node that would host this and previous accounts.

    I look in

    /var/www/vhosts and find the affected domain, with a corresponding httpd.conf file

    The owning user of the folders is different, so I can only presume that this is from the previous subscription.

    I'm not sure if this is what is blocking the creation of the new webdomain, but it seems highly likely. I'm therefore wondering why this is still in the system.

    Does plesk usually keep this data?
    How can we purge this config from the system?
    Has the design of Plesk/PPA/PBAS taken into account this idea of removing a subscription and reapplying the domain elsewhere? I cannot imagine this is not done on an unregular basis.
  6. ChristianCr

    ChristianCr Kilo Poster

    I've now been able to find some references in the mysql database to the domain.

    I have to say I'm finding things a little odd that the system seems to be using both MySql and Postgresql.

    I have a reference to the domain in the

    domains table
    select * from domains where name like '';
    | id | cr_date | name | displayName | dns_zone_id | status | htype | real_size | cl_id | cert_rep_id | limits_id | params_id | guid | external_id | overuse | gl_filter | vendor_id | webspace_id | webspace_status | parentDomainId | permissions_id |
    | 24 | 2014-02-10 | <xxx>.com | <xxx>.com | 25 | 0 | vrt_hst | 884736 | 16 | 0 | NULL | NULL | 253f91fb-1552-44ab-86b6-fb01ed684d1f | 30 | false | on | 1 | 0 | 0 | 0 | 0 |

    Which then points to a domain in the DomainServices table

    select * from DomainServices where dom_id = 24;
    | id | dom_id | type | status | parameters_id | ipCollectionId |
    | 35 | 24 | web | 0 | 0 | 35 |

    I'm noticing the webspace and webspace_status are both 0?

    Is there effectively corruption in the DB? Is this domain supposed to be dead and available for reuse?
  7. Andrew Andriatis

    Andrew Andriatis Odin Team


    There seem to be a lack of understanding how PPA is built.

    PPA is an integration project consisting of POA (Parallels Operations Automation) core and Parallels Plesk Panel (Plesk) as a shared hosting component. PAO is responsible for account management (customers, service templates, subscriptions) and infrastructure management (software installation and updates, installation and monitoring of service nodes, IP pools, DNS hosting). Plesk configures web and mail hosting remotely on the web and mail node via its own agent installed there. Both POA and Plesk are installed on the Management Node. Plesk screens are imbedded into POA screens inside both provider and customer panels. PostgreSQL belongs to POA. MySQL DB belongs to Plesk.

    When a hosting subscription is created in POA, it involves Plesk API to create a corresponding subscription in Plesk. That's why you see a domain in both databases. If you have a situation when a domain is missing in PPA (POA), but is still present in Plesk, this means that the previous subscription was not removed cleanly. Most probably there was a failed task in the Task Manager. If it was canceled without resolving the issue, which caused the failure, you'll get exactly this situation.

    When PBAS comes to the picture, it adds the 3rd layer of integration. Now the subscription is first created in PBAS as the business system, then it invokes PPA to provision the subscription via API, and PPA invokes Plesk API to create a hosting subscription in it. PBAS has its own DNS management. It uses a special plugin in POA to propagate the DNS zones from POA to its own DNS farm.

    Usually if a domain is not seen in PPA, but still hangs in Plesk, it is safe to remove it from the Pleks DB manually.

    Hope this helps.

    Andrey Andriatis
    Parallels Plesk Automation Program Manager
  8. ChristianCr

    ChristianCr Kilo Poster

    Corruption in the database, how do I fix this

    Okay definitely something gone wrong.

    I'm seeing a failed task to do with a subscription that no longer exists, which seems to be a delete something

    Remove the webspace #30

    This is blocking a second taask

    Remove the webspace #31

    One of these I suspect is to do with the domain that it still thinks is around.

    The first task (removing #30) is being blocked by this task

    Update the web hosting settings of the webspace #30

    Which fails with the error

    Last execution output Resource #1365 does not exist.

    So I suspect something got removed but only partially. Anyone got an idea how to fix?
  9. ChristianCr

    ChristianCr Kilo Poster

    Thanks Andrew things becoming a little clearer now.

    Okay so I've found references in postgresql to the two webspaces mentioned above.
    webspace_id | account_id | sub_id | domain | is_enabled | is_brand
    30 | 32 | 56 | | y | n
    31 | 32 | 64 | | y | n

    Now can I simply amended those to is_enabled = no

    Or is there something else I need to clear down. As mentioned previously we have some resource that is missing somewhere, and I'm not quite sure where I should be looking.


    So adding to this

    select * from subscriptions where sub_id = 64 or sub_id = 56;
    sub_id | owner_id | st_id | c_date | name | description | st_version | is_active | is_trial

    So there seems to be an element whereby it's got partially through closing down the subscription/webspace but not all the way, failing at this resource element.
    Is there any method I can follow by hand to clear down the issue?

    So delving even deeper I managed to find this table and the result below

    select * from plesk_webspace_resources where webspace_id = 30 or webspace_id = 31;
    webspace_id | resource_class | resource_instance_id | is_provisioned
    30 | pleskweb_hosting | 1365 | n
    30 | plesk_mail | 1376 | n
    30 | plesk_integration | 1361 | y
    31 | plesk_integration | 1560 | y
    31 | pleskweb_hosting | 1542 | y
    31 | plesk_mail | 1553 | y

    So this is the real heart of the issue. This bit seems to have been deprovisioned before the other works.

    I'm thinking here that because there is no point to making the changes to the subscription, can I cancel those blocking tasks and move to the two deletions? However we seem to have the plesk integration still live, do I change this to a 'n';
    Last edited: Feb 19, 2014
  10. ChristianCr

    ChristianCr Kilo Poster

    Final Solution

    So the cause is indeed the blocking task where there are changes trying to be applied to a cancelled subscription. I'm not sure what cause the issue, whether we did try to alter something, or this is part of the deletion process that some how got out of sync.

    The solution, was to individually cancel insignificant tasks. i.e the ones that are trying alter the cancelled subscription. At that point the two removal tasks can be run.

    This was done and confirmed by Parallels support team, so thanks to them for that.

    I'll update the thread if I ever find out what caused the process to fail.

Share This Page