• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cannot remove PTR record with dns command

CharKr

New Pleskian
Hi,

i have to delete all PTR records in over 80 domains in a Plesk 12 panel, when i tried to run the dns command to remove the PTR record from a domain, i got the error :
Code:
Unable del record in DNS server: unable find DNS record

There is a KB article about this specifix problem : http://kb.odin.com/en/9406 , but it refers to older Plesk versions (8.x-10.x). I gave it a shot by copying the fix file from all 3 different versions to /usr/local/psa/admin/plib/api-common/ and i got the following PHP errors:

Code:
PHP Warning: include_once(class.PHostingManager.php): failed to open stream: No such file or directory; File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4

PHP Warning: include_once(): Failed opening 'class.PHostingManager.php' for inclusion (include_path='/usr/local/psa/admin/plib:/usr/local/psa/admin/externals'); File: /usr/local/psa/admin/plib/api-common/cuDns.php, Line: 4

PHP Notice: Use of undefined constant CU_REGEX_ALLOW_IP - assumed 'CU_REGEX_ALLOW_IP'; File: /usr/local/psa/admin/plib/api-common/AbstractCuExecutor.php, Line: 55

PHP Notice: Use of undefined constant CU_REGEX_ALLOW_DNS_IP_MASK - assumed 'CU_REGEX_ALLOW_DNS_IP_MASK'; File: /usr/local/psa/admin/plib/api-common/AbstractCuExecutor.php, Line: 55

PHP Notice: Use of undefined constant CU_REGEX_ALLOW_IP - assumed 'CU_REGEX_ALLOW_IP'; File: /usr/local/psa/admin/plib/api-common/AbstractCuExecutor.php, Line: 55

PHP Fatal error:  Call to undefined method cu::cu() in /usr/local/psa/admin/plib/api-common/cuDns.php on line 287

Is there any workaround this PTR issue? Also, is Parallels going to update the article and provide solution for Plesk 12?
 
Please describe in more details how exactly you try to remove PTR record? How I can reproduce it?
 
Hi Igor,

in the domain domain.tld there is the following PTR record:
123.123.123.123/24 PTR domain.tld.

I run the command via SSH according to Plesk 12 CLI Documentation:

Code:
/usr/local/psa/bin/dns --del domain.tld -ptr domain.tld -subnet 123.123.123.123/24

and i get the following output:
Code:
Unable to del record in DNS server: unable to find DNS record

I'm running this on:
Plesk: v.12.0.18
OS: CentOS release 6.5 (Final)
 
Hi
-ptr option accepts "subdomain" in the given DNS zone:
-ptr '' or <subdomain-name> PTR resource record
In your example it tries to remove "domain.tld.domain.tld PTR 123.123.123.123/24" record and cannot find it.
Use '' for removing PTR record equal DNS zone name:
Code:
[root@a10-52-53-101 ~]# /usr/local/psa/bin/dns --info a10-52-53-101.qa.plesk.ru | grep PTR
10.52.53.101 PTR 24 a10-52-53-101.qa.plesk.ru.
[root@a10-52-53-101 ~]# /usr/local/psa/bin/dns --del a10-52-53-101.qa.plesk.ru -ptr '' -subnet 10.52.53.101/24
SUCCESS: Removal of DNS record in Domain 'a10-52-53-101.qa.plesk.ru' complete.
 
Hello RuslanT,

thank you for your response, your suggestion worked great! I successfully deleted the PTR record using -ptr '' option.
Thank you very much!
 
Back
Top