• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

DNS commande line utility fails to delete TXT record

ESKIS

New Pleskian
Although running
>>
/usr/local/psa/bin/dns --info dev.sname.c002.aname.domain.com
>>
shows the 'ecz1' TXT record exists for "dev.sname.c002.aname.domain.com" :
...
ecz1.dev.sname.c002.aname.domain.com. TXT ecz1
...

running
>>
/usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt '' -domain 'ecz1'
>>
or even :
>>
/usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt 'ecz1' -domain 'ecz1'
>>
failsn with the following error message :

"unable to find DNS record"

Any help appreciated.
 
Last edited:
Thanks IgorG, but already found and checked and nothing helped.
Could you try to delete a dns TXT entry with CLI and tell me what I am doing wrong if you succeed?
 
Really strange - same commands works fine for me:
Code:
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt ecz1 -domain ecz1
SUCCESS: Creation of DNS record in Domain 'dev.sname.c002.aname.domain.com' complete.
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --info dev.sname.c002.aname.domain.com | grep ecz1
ecz1.dev.sname.c002.aname.domain.com. TXT  ecz1
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt 'ecz1' -domain 'ecz1'
SUCCESS: Removal of DNS record in Domain 'dev.sname.c002.aname.domain.com' complete.
 
the issue can be caused by extra spaces in the TXT record:
Code:
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt 'ecz1       ' -domain ecz1
SUCCESS: Creation of DNS record in Domain 'dev.sname.c002.aname.domain.com' complete.
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt 'ecz1' -domain ecz1
Unable to del record in DNS server: unable to find DNS record

in the following example I have 3 such TXT records with 3, 5, 7 extra spaces and remove record with 3 spaces:
Code:
[root@a10-52-143-28 ~]# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e  "select host, val, (length(val) - length(rtrim(val))) as extraspaces from dns_recs where host='ecz1.dev.sname.c002.aname.domain.com.' and val like 'ecz1%'"
+---------------------------------------+-------------+-------------+
| host                                  | val         | extraspaces |
+---------------------------------------+-------------+-------------+
| ecz1.dev.sname.c002.aname.domain.com. | ecz1        |           5 |
| ecz1.dev.sname.c002.aname.domain.com. | ecz1        |           3 |
| ecz1.dev.sname.c002.aname.domain.com. | ecz1        |           7 |
+---------------------------------------+-------------+-------------+
[root@a10-52-143-28 ~]# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt 'ecz1   ' -domain ecz1SUCCESS: Removal of DNS record in Domain 'dev.sname.c002.aname.domain.com' complete.
[root@a10-52-143-28 ~]# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e  "select host, val, (length(val) - length(rtrim(val))) as extraspaces from dns_recs where host='ecz1.dev.sname.c002.aname.domain.com.' and val like 'ecz1%'"
+---------------------------------------+-------------+-------------+
| host                                  | val         | extraspaces |
+---------------------------------------+-------------+-------------+
| ecz1.dev.sname.c002.aname.domain.com. | ecz1        |           5 |
| ecz1.dev.sname.c002.aname.domain.com. | ecz1        |           7 |
+---------------------------------------+-------------+-------------+
 
Thanks,

But, no extra spaces... (see below)

root@ns330505:~# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt ecz2 -domain ecz2
SUCCESS
: Creation of DNS record in DomainAlias 'dev.sname.c002.aname.domain.com' complete.

root@ns330505:~# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt ecz2 -domain ecz2
unable to find DNS record


root@ns330505:~# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "select host, val, (length(val) - length(rtrim(val))) as extraspaces from dns_recs where host='ecz2.dev.sname.c002.aname.domain.com.' and val like 'ecz2%'"
+--------------------------------------------+------+-------------+
| host | val | extraspaces |
+--------------------------------------------+------+-------------+
| ecz2.dev.sname.c002.aname.domain.com. | ecz2 | 0 |
+--------------------------------------------+------+-------------+


Is there any log that may help ? I've searched into /var/log/plesk, but found none containing "ecz2"

==
PLESK is : 12.0.18 Mise à jour n° 43, dernière mise à jour à 17 Avril 2015 06:25
OS : Ubuntu 14.04.2 LTS
==
 
Hmm, very strange...
Can you remove such records in GUI?
If you are able to remove them from the panel then try to enable debug in your panel.ini. Type command # plesk conf panel.ini
and uncomment or add following sections:

[debug]

; Enable debug mode (do not use in production environment)
enabled = on

[log]

; Log messages verbosity level (from 0 to 7)
; 0 - only critical errors, 7 - all including debug messages, default - 3
filter.priority = 7

; Enable logging of external utilities calls
show.util_exec = on

; Enable logging of stdin and stdout for external utilities calls (do not use in production environment)
show.util_exec_io = on

Start watching the panel.log (# plesk log panel.log) and remove the problem record.
 
Also check the same steps with en_US locale set:
# export LANG=en_US
# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt ecz3 -domain ecz3
# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt ecz3 -domain ecz3
 
Thanks for your help RuslanT.

Here's traces of deleting record 'ecz2' from GUI in debug mode (record is actually deleted) :

>>>
[2015-04-20 10:27:59] INFO [panel] Les modifications appliquées aux enregistrements DNS ont été enregistrées.
[2015-04-20 10:27:59] WARN [panel] CommonPanel_Controller_Helper_Url::_getUrlWithCtx: Seriously malformed URL. Skip context challenging: /dns-zone/records-list/id/a:7
[2015-04-20 10:27:59] WARN [panel] CommonPanel_Controller_Helper_Url::_getUrlWithCtx: Seriously malformed URL. Skip context challenging: /dns-zone/records-list/id/a:7
[2015-04-20 10:27:59] DEBUG [util_exec] [5534b88f5beba] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'dev.sname.c002.aname.domain.com'
[2015-04-20 10:27:59] DEBUG [util_exec] [5534b88f5beba] Finished in 0.19638s, Result: TRUE
>>>

When changing LANG to en_US (Default is "LANG=fr_FR.UTF-8") it gives :
>>>
root@ns330505:~# export LANG=en_US
root@ns330505:~# /usr/local/psa/bin/dns --add dev.sname.c002.aname.domain.com -txt ecz3 -domain ecz3
Warning: Current locale is unusable. Using 'C' instead.
SUCCESS: Creation of DNS record in DomainAlias 'dev.sname.c002.aname.domain.com' complete.
[2015-04-20 10:32:47] DEBUG [util_exec] [5534b9afeb061] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'dev.sname.c002.aname.domain.com'
[2015-04-20 10:32:47] DEBUG [util_exec] [5534b9afeb061] Finished in 0.02019s, Result: TRUE
root@ns330505:~# /usr/local/psa/bin/dns --del dev.sname.c002.aname.domain.com -txt ecz3 -domain ecz3
Warning: Current locale is unusable. Using 'C' instead.
unable to find DNS record
>>
 
Try to use quotes in commands:
# export LANG=C
# /usr/local/psa/bin/dns --add 'dev.sname.c002.aname.domain.com' -txt 'ecz3' -domain 'ecz3'
# /usr/local/psa/bin/dns --del 'dev.sname.c002.aname.domain.com' -txt 'ecz3' -domain 'ecz3'

If this won't help there another way to try to debug it:
Add or uncomment following In [log] block of panel.ini:
; Enable logging of SQL queries
show.sql_query = on

It will add SQL queries on each operation in the panel.log. Then you can try to compare SQL queries for "working" removing from GUI and "broken" from CLI.
 
Many thanks again for your help,

Unfortunately, 'C' lang and quotes didn't help a lot...

Is there a way to send you a zip of following traces (with SQL query logging enabled) ?

150421_PLESK_CLI_add_quoted.txt : Ading 'ecz4'
150421_PLESK_CLI_add.txt : same, without quotes
150421_PLESK_CLI_del_quoted.txt : Deleting 'ecz4'
150421_PLESK_CLI_del.txt : same, without quotes
150421_PLESK_GUI_del_quoted.txt : Traces when deleting 'ecz4' from GUI
150421_PLESK_GUI_del.txt : When deleting from GUI the entry added without quotes (probably, useless, but...)
 
Last edited:
No "upload" button in conversations GUI
 

Attachments

  • Capture du 2015-04-28 08:24:45.png
    Capture du 2015-04-28 08:24:45.png
    27.2 KB · Views: 3
Hi, ESKIS
Thanks for logs, I was able to reproduce the issue. It's a product bug - I reported it with the internal ID PPPM-2800 "Removing TXT record from domain alias' DNS zone with dns CLI utility failed with: unable to find DNS record". It probably will be fixed in one of the nearest updates - please watch the changes log.


http://talk.plesk.com/members/eskis.168765/
 
Back
Top