• 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.

Plesk Firewall or DNS Broke

dalydesign

Basic Pleskian
I'm currently on the latest version of plesk. The server is only a month old.

I added a new rule to the firewall, to open ports 49152-65534 for Passive FTP
I also opened Port 26 as an alternative SMTP port.

Now when I apply my firewall rules, I receive the following error:

MySQL query failed: Duplicate entry '1-2-0' for key 'configuration_id'

the problem now is that it has knocked out a few of my domains, but not all!!! When I try to access some of the domains on the server, some will load, others are blocked.

there are no related error messages in /var/log/messages
There are no related error messages in /var/log/mysqld.log
There are no related error messages in /var/log/sw-cp-server/error_log
 
In order to overcome this issue, I have tried to uninstall psa-firewall, then reinstall it

Here's the log from /var/log/plesk/panel.log

Code:
[2015-10-20 14:37:19] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/f2bmng' '--status'] with exit code [1]
[2015-10-20 14:37:19] ERR [1] '/usr/local/psa/admin/bin/f2bmng' '--status' failed with code 1.

stdout:


stderr:
ERROR:f2bmng:Timeout of 10 seconds has been reached. Lock 'service.fail2ban' is already owned by another process with pid <unknown>

[2015-10-20 14:39:54] ERR [1] DB query failed:
insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 6, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:6:\"tomcat\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:8:\"9008/tcp\";i:1;s:8:\"9080/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:1:\"9\";}")

Error: Duplicate entry '1-0-6' for key 'configuration_id'
[2015-10-20 14:39:55] ERR [panel] MySQL query failed: Duplicate entry '1-0-6' for key 'configuration_id':
0: /usr/local/psa/admin/plib/db.php:89
    db_query(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 6, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:6:\"tomcat\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:8:\"9008/tcp\";i:1;s:8:\"9080/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:1:\"9\";}")')
1: /usr/local/psa/admin/plib/db.php:155
    db_query_ex(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (?(configuration), ?(direction), ?(priority), "?(object)")', array)
2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:142
    FwConfigurator->copyConfiguration(integer '2', integer '1')
3: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:38
    plesk__modules__firewall__edit__activate->accessItem(string 'POST', NULL null)
4: /usr/local/psa/admin/plib/UIPointer.php:619
    UIPointer->access(string 'POST')
5: /usr/local/psa/admin/htdocs/plesk.php:36
[2015-10-20 14:39:55] ERR [1] MySQL query failed: Duplicate entry '1-0-6' for key 'configuration_id'
[2015-10-20 15:38:18] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/f2bmng' '--status'] with exit code [1]
[2015-10-20 15:38:18] ERR [1] '/usr/local/psa/admin/bin/f2bmng' '--status' failed with code 1.

stdout:


stderr:
ERROR:f2bmng:Timeout of 10 seconds has been reached. Lock 'service.fail2ban' is already owned by another process with pid <unknown>

[2015-10-20 15:47:10] ERR [1] DB query failed:
insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 16, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:3:\"www\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:6:\"80/tcp\";i:1;s:7:\"443/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:2:\"19\";}")

Error: Duplicate entry '1-0-16' for key 'configuration_id'
[2015-10-20 15:47:11] ERR [panel] MySQL query failed: Duplicate entry '1-0-16' for key 'configuration_id':
0: /usr/local/psa/admin/plib/db.php:89
    db_query(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 16, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:3:\"www\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:6:\"80/tcp\";i:1;s:7:\"443/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:2:\"19\";}")')
1: /usr/local/psa/admin/plib/db.php:155
    db_query_ex(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (?(configuration), ?(direction), ?(priority), "?(object)")', array)
2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:142
    FwConfigurator->copyConfiguration(integer '2', integer '1')
3: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:38
    plesk__modules__firewall__edit__activate->accessItem(string 'POST', NULL null)
4: /usr/local/psa/admin/plib/UIPointer.php:619
    UIPointer->access(string 'POST')
5: /usr/local/psa/admin/htdocs/plesk.php:36
[2015-10-20 15:47:11] ERR [1] MySQL query failed: Duplicate entry '1-0-16' for key 'configuration_id'
[2015-10-20 16:05:01] ERR [1] DB query failed:
insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 16, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:3:\"www\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:6:\"80/tcp\";i:1;s:7:\"443/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:2:\"19\";}")

Error: Duplicate entry '1-0-16' for key 'configuration_id'
[2015-10-20 16:05:02] ERR [panel] MySQL query failed: Duplicate entry '1-0-16' for key 'configuration_id':
0: /usr/local/psa/admin/plib/db.php:89
    db_query(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 0, 16, "a:6:{s:4:\"type\";s:7:\"service\";s:5:\"class\";s:3:\"www\";s:9:\"direction\";s:5:\"input\";s:5:\"ports\";a:2:{i:0;s:6:\"80/tcp\";i:1;s:7:\"443/tcp\";}s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:2:\"19\";}")')
1: /usr/local/psa/admin/plib/db.php:155
    db_query_ex(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (?(configuration), ?(direction), ?(priority), "?(object)")', array)
2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:142
    FwConfigurator->copyConfiguration(integer '2', integer '1')
3: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:38
    plesk__modules__firewall__edit__activate->accessItem(string 'POST', NULL null)
4: /usr/local/psa/admin/plib/UIPointer.php:619
    UIPointer->access(string 'POST')
5: /usr/local/psa/admin/htdocs/plesk.php:36
[2015-10-20 16:05:02] ERR [1] MySQL query failed: Duplicate entry '1-0-16' for key 'configuration_id'
[2015-10-20 16:08:01] ERR [1] DB query failed:
insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 1, 0, "a:5:{s:4:\"type\";s:8:\"catchall\";s:5:\"class\";s:8:\"catchall\";s:9:\"direction\";s:6:\"output\";s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:1:\"3\";}")

Error: Duplicate entry '1-1-0' for key 'configuration_id'
[2015-10-20 16:08:02] ERR [panel] MySQL query failed: Duplicate entry '1-1-0' for key 'configuration_id':
0: /usr/local/psa/admin/plib/db.php:89
    db_query(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 1, 0, "a:5:{s:4:\"type\";s:8:\"catchall\";s:5:\"class\";s:8:\"catchall\";s:9:\"direction\";s:6:\"output\";s:6:\"action\";s:5:\"allow\";s:10:\"originalId\";s:1:\"3\";}")')
1: /usr/local/psa/admin/plib/db.php:155
    db_query_ex(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (?(configuration), ?(direction), ?(priority), "?(object)")', array)
2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:142
    FwConfigurator->copyConfiguration(integer '2', integer '1')
3: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:38
    plesk__modules__firewall__edit__activate->accessItem(string 'POST', NULL null)
4: /usr/local/psa/admin/plib/UIPointer.php:619
    UIPointer->access(string 'POST')
5: /usr/local/psa/admin/htdocs/plesk.php:36
[2015-10-20 16:08:02] ERR [1] MySQL query failed: Duplicate entry '1-1-0' for key 'configuration_id'
[2015-10-20 16:18:49] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:18:53] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:18:56] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:18:59] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:02] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:06] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:10] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:13] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:17] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:21] ERR [panel] PleskBadURIException: Unknown or inappropriate locator: firewall
[2015-10-20 16:19:29] ERR [1] DB query failed:
select object from module_firewall_objects where tag = "bootstrapped"
 
At this point I had uninstalled the firewall, and was now re-installing it.

Then I re-added 2 firewall rules (to block MySQL unless its my IP, and to open Port 26 again)
So here's the rest of the log since its been back up and running....

Code:
Error: Table 'psa.module_firewall_objects' doesn't exist

[2015-10-20 16:19:31] ERR [panel] MySQL query failed: Table 'psa.module_firewall_objects' doesn't exist:

0: /usr/local/psa/admin/plib/db.php:89

    db_query(string 'select object from module_firewall_objects where tag = "bootstrapped"')

1: /usr/local/psa/admin/plib/db.php:155

    db_query_ex(string 'select object from module_firewall_objects where tag = "?(tag)"', array)

2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:55

    FwConfigurator->loadObject(string 'bootstrapped')

3: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:40

    FwConfigurator->FwConfigurator(boolean true)

4: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:27

    FwConfigurator::getInstance()

5: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:17

    plesk__modules__firewall__edit__activate->accessItem(string 'GET', NULL null)

6: /usr/local/psa/admin/plib/UIPointer.php:619

    UIPointer->access(string 'GET')

7: /usr/local/psa/admin/htdocs/plesk.php:36

[2015-10-20 16:19:31] ERR [1] MySQL query failed: Table 'psa.module_firewall_objects' doesn't exist

[2015-10-20 16:20:46] ERR [panel] Invalid URL was requested.

[2015-10-20 16:20:47] ERR [panel] Invalid URL was requested.

[2015-10-20 16:24:10] ERR [1] DB query failed:

insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 2, 0, "a:5:{s:4:\"type\";s:8:\"catchall\";s:5:\"class\";s:8:\"catchall\";s:9:\"direction\";s:7:\"forward\";s:6:\"action\";s:4:\"deny\";s:10:\"originalId\";s:1:\"1\";}")




Error: Duplicate entry '1-2-0' for key 'configuration_id'

[2015-10-20 16:24:11] ERR [panel] MySQL query failed: Duplicate entry '1-2-0' for key 'configuration_id':

0: /usr/local/psa/admin/plib/db.php:89

    db_query(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (1, 2, 0, "a:5:{s:4:\"type\";s:8:\"catchall\";s:5:\"class\";s:8:\"catchall\";s:9:\"direction\";s:7:\"forward\";s:6:\"action\";s:4:\"deny\";s:10:\"originalId\";s:1:\"1\";}")')

1: /usr/local/psa/admin/plib/db.php:155

    db_query_ex(string 'insert into module_firewall_rules (configuration_id, direction, priority, object) values (?(configuration), ?(direction), ?(priority), "?(object)")', array)

2: /usr/local/psa/admin/plib/modules/firewall/FwConfigurator.php:142

    FwConfigurator->copyConfiguration(integer '2', integer '1')

3: /usr/local/psa/admin/plib/modules/firewall/ui/modules.firewall.edit.activate.php:38

    plesk__modules__firewall__edit__activate->accessItem(string 'POST', NULL null)

4: /usr/local/psa/admin/plib/UIPointer.php:619

    UIPointer->access(string 'POST')

5: /usr/local/psa/admin/htdocs/plesk.php:36

[2015-10-20 16:24:11] ERR [1] MySQL query failed: Duplicate entry '1-2-0' for key 'configuration_id'
 
I have logged into the psa database and deleted 2 custom records from module_firewall_rules table (duplicate port 26 rules).

Then uninstalled Firewall, Then reinstalled it just to be safe (it deleted the module_firewall_rules table anyway!! lol).

Firewall behaving properly now, but some domains not working still. Could not telnet port 53, but other ports were ok.

Then switched DNS off/On for one of the affected domains and was then able to telnet 53 successfully!

So the DNS now working again! ...until I tester the server. ....then the DNS is broke again... So I go to a domain, switch it's DNS config to disabled, then re-enable. ....and it works again.

I've rebooted several times and same things happened again.... Disable/re-enable any domain DNS config and it fixes it until next reboot.!
 
Last edited:
Back
Top