• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Unable to find service node for web service on domain with id = 0

spriti25

New Pleskian
Hey.

Got following Problem: Unable to find service node for web service on domain with id = 0

After a Check from http://kb.odin.com/en/114632

I tried this: http://kb.odin.com/en/113475

Result:

+--------------------+--------------+---------------------------------------+------------------------------+------------+
| Domains | Service Type | IpAddressesCollections.ipCollectionId | Current value of ipAddressId | Have to be |
+--------------------+--------------+---------------------------------------+------------------------------+------------+
| XXXXXXXXXXXXX.org | mail | 30 | 0 | 1 |
+--------------------+--------------+---------------------------------------+------------------------------+------------+

Resolution:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e 'Update IpAddressesCollections SET ipAddressId = 1 WHERE ipCollectionId = 30'

Result: ERROR 1062 (23000) at line 1: Duplicate entry '30-0' for key 'PRIMARY'

And now i need help ;)

Thanks!!!
 
What were you trying to do when you got this error?

I had something similar today when I was migrating a server. I needed to delete the domain off the new server, re-create it and using winSCP move over all the files from the old server to the new. This worked for me instead of hacking the DB.
 
I tried to change the Mailserver Configuration.
With Postfix Mail´s don´t work.
Install Qmail works but the Configuration Problem is the same.
 
@ spriti25:

Are you sure that you used the right mysql - commands? Referring to your ouput " Result: ERROR 1062 (23000) at line 1: Duplicate entry '30-0' for key 'PRIMARY' " you have at least TWO primary keys in your database. Could it be, that you changed your entry to an existing one?

I would recommend to start over again and do the step-by-step workaround from 1. to 3. without leaving out any step. If you need help with that workaround, you might consider pasting each reasult of your commands in CODE - Tags ( please leave out any domain-details !!! ) and wait for some one to guide you with further steps.
 
No, spriti25, there is no need to re-install something... you just have to follow the suggested solution from the KB ( http://kb.odin.com/113475 ).

Let' say you have Plesk 12, then please do the following:


mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e 'select * from IpAddressesCollections where ipAddressId = 0'

This command will reply with outputs like this examples:

Code:
+----------------+-------------+
| ipCollectionId | ipAddressId |
+----------------+-------------+
|             11 |           0 |
|             12 |           0 |
|             13 |           0 |
|             15 |           0 |
|             18 |           0 |
|             19 |           0 |
|             20 |           0 |
+----------------+-------------+

In this example, you see several "ipCollectionId" with the "ipAddressId" = 0 ... this means, that something is broken and has to be repaired.

First, you should make a backup, which is done by:

  1. mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > /root/psa.dump.`date +%F.%s`.sql

    After this backup, please use this command:

  2. mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e "select domains.displayName as 'Domains', DomainServices.type as 'Service Type', IpAddressesCollections.ipCollectionId as 'IpAddressesCollections.ipCollectionId', IpAddressesCollections.ipAddressId as 'Current value of ipAddressId', dom_param.val as 'Have to be' from domains, DomainServices, IpAddressesCollections, dom_param where IpAddressesCollections.ipAddressId = 0 and IpAddressesCollections.ipCollectionId = DomainServices.ipCollectionId AND DomainServices.dom_id = domains.id AND dom_param.dom_id = domains.id and dom_param.param like 'ip%_addr_id'"

    You now get outputs like this example:

    Code:
    +----------+--------------+---------------------------------------+------------------------------+------------+
    | Domains  | Service Type | IpAddressesCollections.ipCollectionId | Current value of ipAddressId | Have to be |
    +----------+--------------+---------------------------------------+------------------------------+------------+
    | dom3.tld |         mail |                                    19 |                            0 |    [COLOR="#FF0000"]3[/COLOR] |
    | dom3.tld |          web |                                    20 |                            0 |    [COLOR="#FF0000"]3[/COLOR] |
    |  fwd.com |         mail |                                    13 |                            0 |    1 |
    |  fwd.com |          web |                                    15 |                            0 |    1 |
    | fwd2.com |          web |                                    18 |                            0 |    [COLOR="#FF0000"]3[/COLOR] |
    |  dom.tld |          web |                                    11 |                            0 |    1 |
    | dom1.tld |         mail |                                    12 |                            0 |    1 |
    +----------+--------------+---------------------------------------+------------------------------+------------+

    As you can see here, there are several "HAVE TO BE" outputs, which all should be corrected with the following command examples:

  3. mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e 'Update IpAddressesCollections SET ipAddressId = 3 WHERE ipCollectionId = 19'

    mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e 'Update IpAddressesCollections SET ipAddressId = 3 WHERE ipCollectionId = 20'

    ... and so on.....

If you are unsure, what the correct mysql - commands would be, please copy and paste the output of YOUR Nr. 2 step here, so that we might help you with the right commands and leave out the YOURDOMAIN.COM from the results. If you have questions, please do not hesitate to ask, there are always nice users around this forum, who are willing to help and if you would like a translation into your preferred language, I just checked this post and got a pretty understandable result from Google translation and even if your english is probably not perfect, most of all answers will be understood - just give it a try! ^^
 
So here we go:

1. command output:

ipCollectionId | ipAddressId |
+----------------+-------------+
| 30 | 0 |
+----------------+-------------+

Backup done!

2 command output:

+--------------------+--------------+---------------------------------------+------------------------------+------------+
| Domains | Service Type | IpAddressesCollections.ipCollectionId | Current value of ipAddressId | Have to be |
+--------------------+--------------+---------------------------------------+------------------------------+------------+
| xxxxxxxxxxxxxx.org | mail | 30 | 0 | 1 |
+--------------------+--------------+---------------------------------------+------------------------------+------------+

And now?

Thanks for your help!
 
Your specific command would be like you postet it in your first post:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa -e 'Update IpAddressesCollections SET ipAddressId = 1 WHERE ipCollectionId = 30'


If you did use this solution in the first place, I wonder, why you still have the same entry in your database?

After the mysql - command, please use:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all


Could you explain, when the failure appeared and what site you opened? Is this a new installation of Plesk ( and domain ) and did the rest worked like it is supposed to work? Did you ever received mail and could you as well send mail ? Did this failure appeared after an upgrade/update?
 
Last edited by a moderator:
After your Command: ERROR 1062 (23000) at line 1: Duplicate entry '30-1' for key 'PRIMARY'

The Server is 6 month old and works without Problems.

The Domain is ~1 month old.
After installed the Domain we checked the Emails. In and out worked.
Then i tryed to Change the Email Server settings. The Failure comes up and Postfix was broken.
I installed Qmail + Dovecote and it works but when i change Mail Server settings the failure is still there but email is ok.

What i would change was the maximum Email Filesize
 
Your database has still double entries, as you can see with that last output.

Please try:

/opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/scripts/upgrade_web_domain_services_1010.php​

to get possibly more informations about that issue.
 
We are getting closer. ^^

igor.A. commented this failure from Suse systems ( http://forum.parallels.com/showthread.php?304432-Internal-error-Unable-to-find-service-node-for-web-service-on-domain-with-id&p=735393&viewfull=1#post735393

He wrote as well, that this issue should have been fixed in MU#6. Did all of your upgrades went through without any errors? You might consider watching the upgrade - logs for that ( var/log/plesk/install/ ).

It might be a good idea to re-install the last updates/patches with the following command:

/usr/local/psa/admin/bin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base​

and / or you choose to use the bootstrapper:

/opt/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair​

Depending on your operating system, the path might as well be: "/usr/local/psa/bootstrapper ..." - please check the patch for the latest bootstrapper on your system, before using this command.
 
Both failed..
Bootstrapper repair log as a Picture.. Sorry im not at home an over Tablet i can't Copy this
 
Last edited:
My thoughts are, that you built the second domain twice, or more times and the "auto-increment" field didn't set up a following ID, but took a still existing one, because the process didn't make a clean deletion, before the new/old domain was created again.

I would suggest to retry the above solution and see what the output is right now ( http://forum.parallels.com/showthre...main-with-id-0&p=753402&viewfull=1#post753402 ) . I could imagine, that the "HAVE TO BE" -field for your specific mail-domain might now be "2" , so the next step would be to assign it to "2" instead of the actual 1.

Depending on your actual domains on your server, it could be, that you have to repeat this step. Sure, you might try to delete the domain, but I think it didn't work in the first place, that's why you probably decided to repeat the deletion, which didn't finish in a clean way either.

Please delete the attachment, because it shows your domain, which should be confidential.
 
In this case, I think it is a bug, like igor.A. mentioned within the other thread. You might try the solution from the user "onlinesolutions", but I wouldn't recommend that, because the inconsistence of the psa database isn't solved with this solution.

You could now wait for other suggestions from other users, mods or Plesk employees, or you might contact the support to report the bug and/or ask for technical assistance ( https://odin.com/hcap/support/request/ )
 
Back
Top