• 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

Issue Cannot delete IPv6 addresses

Branko

Basic Pleskian
Hello.

I delete IPv6 addresses but after reboot and IP reread they pop up again.

Any suggestions?

Thank you.
 
Create a backup of the psa-database:
Code:
mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa > /tmp/psa.`date +%F_%H.%M`.sql
Find the domains whose DNS zones prevent the IP address from being deleted:
Code:
mysql> set @ip_address := '101.10.10.10';
mysql> select d.name as DomainName, dnsr.type, dnsr.host, dnsr.id as DNS_record_ID from domains as d join dns_recs as dnsr on d.dns_zone_id=dnsr.dns_zone_id where dnsr.val=@ip_address;
For each domain shown in the issue, go to Plesk> Domains> example.com> Manage Hosting> Sites & Domains> DNS Settings and remove the related entry.
If the domain does not exist in Plesk, manually delete the entry from the output using the associated value of the DNS_record_ID.
For example, if example.com does not exist:
Code:
+-------------------------------+------+----------------------------------------+---------------+
| DomainName | type | host | DNS_record_ID |
+-------------------------------+------+----------------------------------------+---------------+
| test.tld | A | mail.test.tld. | 358 |
| example.com | A | mail.example.com. | 134 |
...then call the following command (be careful not to delete entries for active domains):
Code:
mysql> delete from dns_recs where id=134;
If the issue has occurred after switching to a new IP with all subscriptions, the DNS records may not have been updated properly. In this case, you can search for the non-updated entries in the dns_recs table:
Code:
mysql> SELECT * from `dns_recs` WHERE `val` = '<old_ip>';
Before the IP can be deleted, all of these entries must be updated (the old IP in val must be changed to something else).
To correct the visual representation (in the Plesk web interface), you may need to start the following query:
Code:
mysql> UPDATE `dns_recs` SET `displayVal` = `val` WHERE `val` <> `displayVal`;

If you have any further questions, let me know.
 
Thank you very much @m3lezZ
I am sure that this is the solution, what you said.

But, can you please give more detail how to get into psa-database?

I entered by command
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa

This is what I got, and what I tried to do
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5332
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [psa]> select d.name as DomainName, dnsr.type, dnsr.host, dnsr.id as DNS _record_ID from domains as d join dns_recs as dnsr on d.dns_zone_id=dnsr.dns_zon e_id where dnsr.val=@ip_address;
Empty set (0.00 sec)

MariaDB [psa]> set @ip_address := '2a05:4f8:111:40a3::2';
Query OK, 0 rows affected (0.00 sec)

MariaDB [psa]> mysql> set @ip_address := '101.10.10.10';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mys ql> set @ip_address := '101.10.10.10'' at line 1
MariaDB [psa]> set @ip_address := '101.10.10.10';
Query OK, 0 rows affected (0.00 sec)

MariaDB [psa]> select d.name as DomainName, dnsr.type, dnsr.host, dnsr.id as DNS _record_ID from domains as d join dns_recs as dnsr on d.dns_zone_id=dnsr.dns_zon e_id where dnsr.val=@ip_address;
Empty set (0.00 sec)

MariaDB [psa]> Ctrl-C -- exit!



I am not sure what to do. Can you give me some additional hint?
 
To get into the psa database is simple.

Just login to mysql:
Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
or
Code:
plesk db

With "plesk db" you enter MariaDB with selected psa database.

With the mysql -uadmin login use must select manualy the databse:
Code:
SHOW DATABASES;
USE psa;

Notice it's important while handle with databases, to know how work with databases and how they work.

If you have any questions, let know.
 
Last edited:
Back
Top