It is really weird that the INSERT command is triggering an ALTER command for the mail_user table here. I don't know what is messed up here. Did you add any triggers, procedures or functions in the database especially on dns_rr or mail_user table?
I think ISPConfig does not really uses ALTER SQL queries outside the installer. We have a function in the DB lib to manage tables, but its not really used anymore. So this is really strange and might indeed be something in the database itself than coming from ISPConfig.
Maybe you could try running that SQL insert statement manually in phpmyadmin to see if it triggers the same database behaviour.
Hadn't checked the dns_rr table yet. Turns out records DO get created despite the returned error. Besides what the test script added I found several other acme challenges created by acme.sh on several systems. So it looks like it's the responce that gets messed up big time. And because of the error acme.sh fails to continue (because it expects another responce). For now I've deleted them all but I'm sure there will be new ones tomorrow when renewal commands have been running during the night. Not that I know of. I did add the nextcloud plugin fairly recent but it's not linked to nextcloud yet and have the ddns plugin for ages (which still runs fine) in IPSC. Running this in phpmyadmin executes just fine: INSERT INTO `dns_rr` (`server_id`, `zone`, `name`, `type`, `data`, `ttl`, `active`, `stamp`, `serial`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`) VALUES ('12', '8', 'acme', 'txt', '001jSDSAKLDdj12hjq08dih21', '300', 'y', '2025-07-18 20:40:14', '0', '2', '2', 'riud', 'riud', ''); (copy pasted from the error the test script returned)
Going to the dns_rr table and then clicking the triggers button in phpmyadmin it says there are no triggers.
Because of the error the created records aren't cleaned up afterwards Just deleted over 600 acme challenge records Apparently the error has been going on for a couple of weeks (which fits the ISPC update to 3.3.0, also a couple of weeks ago. About a dozen domains with certificates for multiple hostnames, a lot of them double (rsa and ecdsa), of which renewal is tried daily adds up very quickly
Ok, so let's try to sum up what we have until now: An alter table statement for a table of the mail module is getting executed together with the insert statement for the dns_rr table. @pyte tested it on his system and this does not happen on a clean ISPConfig 3.3.0p2 system. So it is likely something specific to your installation. I just checked the ISPConfig code and alter table statements are only in the ISPConfig installer code except of the alterTable function in the database class. This is an old function, and I have checked the code; it is no longer in use. The installer does not even get installed on the server, so it cannot be executed when you make an API request, as it's not there. You mentioned that you installed two modules that are not part of ISPConfig core, so the most likely reason is that the issue lies within that code. I suggest you download the code of the two modules and use, e.g., grep or a code editor to find any ALTER TABLE statements in the code of these modules to see if any of them try to alter that mail table. Another possible solution might be that you give the ispconfig mysql user the right to alter tables in the ispconfig database, then this query from the external module will likely succeed and the error will go away.
Learning a whole lot again about ISPC under water! Found this: Code: /usr/local/ispconfig/interface/lib/plugins/nextcloud_plugin/sql/mail_user.sql:ALTER TABLE mail_user Looks like you where right in the money. No way I would have come up with that myself Now the million dollar question, how and why does it get triggered on a API dns txt record add?
By the way, it's the plugin you blogged about on your website: https://www.ispconfig.org/blog/new-ispconfig-nextcloud-plugin-for-user-and-password-synchronization/ Since I haven't had the time and hardware resources yet to install an ISPC mailserver (still running Kopano in an older testlab) I only installed the plugin and haven't configured anything yet in ISPC. Edit: Triple checked, the plugin is NOT enabled in any node's server config. Last change on the plugin's github page is 10 month ago. Way before I installed the plugin, so it's the latest version.
The plugin page mentions this behavior and explicitly tells you that you need to edit the mysql user rights. So i don't think you need to report a bug here.
Missed that one. Not sure if I want to do that. The query in the error is completely messed up. It wants to connect to database <ispc master db>.mail_user which doesn't exist! I can understand it wants to alter the mail_user table but apparently the plugin is trying to do much more then just linking ISPC and Nextcloud, at moments it shouldn't. For now I deleted the Nextcloud plugin in my ISPC install and acme renewals are working is they should again Big thank you to the both of you for helping me tracing the source of the issue!