So basicly i have the problem that after an update I am not able to create new mail addresses. I tracked the problem down to the system->has_service function. Basicly the query where he tries to find the servers does not return any servers (system->server_count is and stays just null). Any ideas how to fix this? Code: ##### SERVER ##### IP-address (as per hostname): ***.***.***.*** [WARN] could not determine server's ip address by ifconfig [INFO] OS version is Debian GNU/Linux 10 (buster) [INFO] uptime: 22:30:10 up 62 days, 18:41, 1 user, load average: 0.08, 0.06, 0.02 [INFO] memory: total used free shared buff/cache available Mem: 3.8Gi 2.5Gi 391Mi 140Mi 928Mi 923Mi Swap: 9Gi 4.0Gi 6.0Gi [INFO] ISPConfig is installed. ##### ISPCONFIG ##### ISPConfig version is 3.2.9p1 ##### VERSION CHECK ##### [INFO] php (cli) version is 7.0.33-65+0~20230409.73+debian10~1.gbp9842f4 [INFO] php-cgi (used for cgi php in default vhost!) is version 7.0.33 [WARN] Your php-cgi in ' . /usr/bin/php-cgi . ' seems to be outdated and might contain known exploits. ##### PORT CHECK ##### [WARN] Port 8080 (ISPConfig) seems NOT to be listening [WARN] Port 8081 (ISPConfig Apps) seems NOT to be listening [WARN] Port 21 (FTP server) seems NOT to be listening ##### MAIL SERVER CHECK ##### ##### RUNNING SERVER PROCESSES ##### [INFO] I found the following web server(s): Unknown process (nginx:) (PID 19071) [INFO] I found the following mail server(s): Postfix (PID 568) [INFO] I found the following pop3 server(s): Dovecot (PID 603) [INFO] I found the following imap server(s): Dovecot (PID 603) [WARN] I could not determine which ftp server is running. ##### LISTENING PORTS ##### (only () Local (Address) [anywhere]:993 (603/dovecot) [anywhere]:995 (603/dovecot) [localhost]:11332 (597/rspamd:) [localhost]:11333 (597/rspamd:) [localhost]:11334 (597/rspamd:) [localhost]:10023 (946/postgrey) [localhost]:6379 (15591/redis-server) [anywhere]:587 (568/master) [localhost]:11211 (752/memcached) [anywhere]:110 (603/dovecot) [anywhere]:143 (603/dovecot) [anywhere]:80 (19071/nginx:) [anywhere]:465 (568/master) ***.***.***.***:53 (783/named) [localhost]:53 (783/named) [anywhere]:22 (798/sshd) [anywhere]:25 (568/master) [localhost]:953 (783/named) [anywhere]:443 (19071/nginx:) [anywhere]:4190 (603/dovecot) *:*:*:*::*:993 (603/dovecot) *:*:*:*::*:995 (603/dovecot) *:*:*:*::*:3306 (32689/mysqld) *:*:*:*::*:6379 (15591/redis-server) *:*:*:*::*:587 (568/master) [localhost]10 (603/dovecot) [localhost]43 (603/dovecot) *:*:*:*::*:80 (19071/nginx:) *:*:*:*::*:465 (568/master) *:*:*:*::*:53 (783/named) *:*:*:*::*:22 (798/sshd) *:*:*:*::*:25 (568/master) *:*:*:*::*:953 (783/named) *:*:*:*::*443 (19071/nginx:) *:*:*:*::*:4190 (603/dovecot) ##### IPTABLES ##### [... too long to post ...] ##### LET'S ENCRYPT ##### acme.sh is installed in /root/.acme.sh/acme.sh
First, please post a screenshot of the error that you get in the ISPConfig GUI. Then go to System > server services in ISPConfig and ensure that the "Mailserver" is enabled for all systems that run mail services. With mail address you probably mean email domain? As there is no server selector at mail addresses at all. What did you update?
No I shure mean Adresses. As stated in the "interface\web\mail\lib\module.conf.php" "Email accounts menu" is disabled if there is no mail service present. Code: if(count($items) && $app->system->has_service($userid, 'mail')) { $module['nav'][] = array( 'title' => 'Email Accounts', 'open' => 1, 'items' => $items); } Disabling this check results in me being able to add new addresses (accounts or mailbox...): The mail service is enabled on the one and only server existing. This ISPConfig was updated from version XXX to the latest quite recently (Last month) Before that the Admin just did not bother updating anything at all. (It still ran on Debian 9) So then i Took over i needed to update alot of stuff. Postfix was not able to start at all in the beginning because of missing DF params.
Latest ISPConfig install should normally fix this because it is already in its installer code, but I forget whether this is covered its updater code. May be try running ISPConfig force update with reconfiguring allservices and see if it will fix this as well?
Ok, so you likely disabled email in the client limits for this client. Go to the client module, edit the client you are currently logged in and take care to set a proper limit for the number of email addresses and domains or set -1 if you want to allow unlimited email domains and mailboxes.
That's all covered in the update, just choose to reconfigure services during the update (which is enabled by default).
@ahrasis thought so too. So i did run the update yesterday before i wrote promting that the service was disabled. so I enabled it but still no change.. Code: -------------------------------------------------------------------------------- _____ ___________ _____ __ _ ____ |_ _/ ___| ___ \ / __ \ / _(_) /__ \ | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ | _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \ \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/ __/ | |___/ -------------------------------------------------------------------------------- >> Update Operating System: Debian 10.0 (Buster) or compatible This application will update ISPConfig 3 on your server. Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: Creating backup of "/usr/local/ispconfig" directory... Creating backup of "/etc" directory... Creating backup of "/root/.acme.sh" directory... Checking MariaDB version 10.3.38 .. OK Checking ISPConfig database .. OK Starting incremental database update. Loading SQL patch file: /tmp/update_runner.sh.mictXcZFGO/install/sql/incremental/upd_dev_collection.sql Reconfigure Permissions in master database? (yes,no) [no]: Service 'mail_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: yes Service 'dns_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Service 'web_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: WARNING: If ISPConfig-Interface (Webfrontend) is installed on this Server we will configure the Web Server anyways but will not enable it in ISPConfig. Service 'firewall_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Service 'db_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Reconfigure Services? (yes,no,selected) [yes]: The following custom templates were found: /usr/local/ispconfig/server/conf-custom/install/nginx_ispconfig.vhost.master Do you want to rename these conf-custom templates now so the default templates are used? (yes,no) [no]: Configuring Postfix Configuring Dovecot Configuring Spamassassin Configuring Amavisd Configuring Rspamd Configuring Getmail Configuring Pureftpd Configuring nginx Skipping config of Apps vhost Configuring Jailkit Configuring Database Updating ISPConfig ISPConfig Port [8080]: Create new ISPConfig SSL certificate (yes,no) [no]: Reconfigure Crontab? (yes,no) [yes]: Updating Crontab Restarting services ... Update finished. @till The limits look good to me. I checked this too.
The update script output shows that you either disabled all services in a prior update or you failed to log in as root user properly. On current Debian systems like Debian 10 and later, you must use: su - to become root. If you would just use: su without the minus (as it was commonly used on old Debian versions before 10), then your account is not a full root account, and any system admin software or system configuration you made must fail as many tools are not available in the PATH then. You can try to fix your system by logging in properöy as root this time and then run: ispconfig_update.sh --force and chose to reconfigure services.
Here is the full log. The mails server seem to be "disabled" again... Code: root@xxx:/usr/local/ispconfig/server/scripts# ispconfig_update.sh --force PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/memcache.so' - /usr/lib/php/20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0 -------------------------------------------------------------------------------- _____ ___________ _____ __ _ |_ _/ ___| ___ \ / __ \ / _(_) | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | __/ | |___/ -------------------------------------------------------------------------------- >> Update Please choose the update method. For production systems select 'stable'. WARNING: The update from GIT is only for development systems and may break your current setup. Do not use the GIT version on servers that host any live websites! Note: On Multiserver systems, enable maintenance mode and update your master server first. Then update all slave servers, and disable maintenance mode when all servers are updated. Select update method (stable,nightly,git-develop) [stable]: Downloading ISPConfig update. Unpacking ISPConfig update. PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/memcache.so' - /usr/lib/php/20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0 -------------------------------------------------------------------------------- _____ ___________ _____ __ _ ____ |_ _/ ___| ___ \ / __ \ / _(_) /__ \ | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ | _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \ \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/ __/ | |___/ -------------------------------------------------------------------------------- >> Update Operating System: Debian 10.0 (Buster) or compatible This application will update ISPConfig 3 on your server. Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: Creating backup of "/usr/local/ispconfig" directory... Creating backup of "/etc" directory... Creating backup of "/root/.acme.sh" directory... Checking MariaDB version 10.3.38 .. OK Checking ISPConfig database .. OK Starting incremental database update. Loading SQL patch file: /tmp/update_runner.sh.yzm9SvHr3s/install/sql/incremental/upd_dev_collection.sql Reconfigure Permissions in master database? (yes,no) [no]: Service 'mail_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: yes Service 'dns_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Service 'web_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: WARNING: If ISPConfig-Interface (Webfrontend) is installed on this Server we will configure the Web Server anyways but will not enable it in ISPConfig. Service 'firewall_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Service 'db_server' has been detected (currently disabled) do you want to enable and configure it? (yes,no) [no]: Reconfigure Services? (yes,no,selected) [yes]: The following custom templates were found: /usr/local/ispconfig/server/conf-custom/install/nginx_ispconfig.vhost.master Do you want to rename these conf-custom templates now so the default templates are used? (yes,no) [no]: Configuring Postfix Configuring Dovecot Configuring Spamassassin Configuring Amavisd Configuring Rspamd Configuring Getmail Configuring Pureftpd Configuring nginx Skipping config of Apps vhost Configuring Jailkit Configuring Database Updating ISPConfig ISPConfig Port [8080]: Create new ISPConfig SSL certificate (yes,no) [no]: Reconfigure Crontab? (yes,no) [yes]: Updating Crontab Restarting services ... Update finished. You can see that i am root.
Login to phpmyadmin and run the following query in the dbispconfig database and post the result: Code: SELECT SUM(mail_server) as mail, SUM(web_server) AS web, SUM(dns_server) AS dns, SUM(file_server) AS file, SUM(db_server) AS db, SUM(vserver_server) AS vserver, SUM(proxy_server) AS proxy, SUM(firewall_server) AS firewall, SUM(xmpp_server) AS xmpp FROM `server` WHERE mirror_server_id = 0
Seems like a problem with SQL migration? Code: MariaDB [dbispconfig]> SELECT SUM(mail_server) as mail, SUM(web_server) AS web, SUM(dns_server) AS dns, SUM(file_server) AS file, -> SUM(db_server) AS db, SUM(vserver_server) AS vserver, SUM(proxy_server) AS proxy, SUM(firewall_server) AS firewall, SUM(xmpp_server) AS xmpp -> FROM `server` WHERE mirror_server_id = 0 -> ; ERROR 1054 (42S22): Unknown column 'vserver_server' in 'field list' same with XMPP: Code: MariaDB [dbispconfig]> SELECT SUM(mail_server) as mail, SUM(web_server) AS web, SUM(dns_server) AS dns, SUM(file_server) AS file, -> SUM(db_server) AS db, SUM(proxy_server) AS proxy, SUM(firewall_server) AS firewall, SUM(xmpp_server) AS xmpp -> FROM `server` WHERE mirror_server_id = 0; ERROR 1054 (42S22): Unknown column 'xmpp_server' in 'field list' Removing both yields: Code: MariaDB [dbispconfig]> SELECT SUM(mail_server) as mail, SUM(web_server) AS web, SUM(dns_server) AS dns, SUM(file_server) AS file, -> SUM(db_server) AS db, SUM(proxy_server) AS proxy, SUM(firewall_server) AS firewall -> FROM `server` WHERE mirror_server_id = 0; +------+------+------+------+------+-------+----------+ | mail | web | dns | file | db | proxy | firewall | +------+------+------+------+------+-------+----------+ | 1 | 1 | 1 | 0 | 1 | 0 | 1 | +------+------+------+------+------+-------+----------+ 1 row in set (0.000 sec)
Ok, so someone must have removed the fields from your DB in the past, e.g. the field vserver_server existed since the early days of ISPConfig and ISPConfig is not migrating a database during the update, so no field can get lost during an update. You must add the two missing fields to the database. The complete table structure of the server table is: Code: CREATE TABLE `server` ( `server_id` int(11) unsigned NOT NULL auto_increment, `sys_userid` int(11) unsigned NOT NULL default '0', `sys_groupid` int(11) unsigned NOT NULL default '0', `sys_perm_user` varchar(5) NOT NULL default '', `sys_perm_group` varchar(5) NOT NULL default '', `sys_perm_other` varchar(5) NOT NULL default '', `server_name` varchar(255) NOT NULL default '', `mail_server` tinyint(1) NOT NULL default '0', `web_server` tinyint(1) NOT NULL default '0', `dns_server` tinyint(1) NOT NULL default '0', `file_server` tinyint(1) NOT NULL default '0', `db_server` tinyint(1) NOT NULL default '0', `vserver_server` tinyint(1) NOT NULL default '0', `proxy_server` tinyint(1) NOT NULL default '0', `firewall_server` tinyint(1) NOT NULL default '0', `xmpp_server` tinyint(1) NOT NULL default '0', `config` text, `updated` bigint(20) unsigned NOT NULL default '0', `mirror_server_id` int(11) unsigned NOT NULL default '0', `dbversion` int(11) unsigned NOT NULL default '1', `active` tinyint(1) NOT NULL default '1', PRIMARY KEY (`server_id`) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Well.. Code: MariaDB [dbispconfig]> DESCRIBE server; +------------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+---------------------+------+-----+---------+----------------+ | server_id | int(11) unsigned | NO | PRI | NULL | auto_increment | | sys_userid | int(11) unsigned | NO | | 0 | | | sys_groupid | int(11) unsigned | NO | | 0 | | | sys_perm_user | varchar(5) | NO | | | | | sys_perm_group | varchar(5) | NO | | | | | sys_perm_other | varchar(5) | NO | | | | | server_name | varchar(255) | NO | | | | | mail_server | tinyint(1) | NO | | 0 | | | web_server | tinyint(1) | NO | | 0 | | | dns_server | tinyint(1) | NO | | 0 | | | file_server | tinyint(1) | NO | | 0 | | | db_server | tinyint(1) | NO | | 0 | | | proxy_server | tinyint(1) | NO | | 0 | | | firewall_server | tinyint(1) | NO | | 0 | | | config | text | YES | | NULL | | | updated | bigint(20) unsigned | NO | | 0 | | | mirror_server_id | int(11) unsigned | NO | | 0 | | | dbversion | int(11) unsigned | NO | | 1 | | | active | tinyint(1) | NO | | 1 | | +------------------+---------------------+------+-----+---------+----------------+ Is there a DB migration available? Or is this system just this old that i need to just wipe the DB? How can this happen? The DB user has no permissions to alter tables..
The ispconfig db user is not used to alter tables on an ISPConfig system. The ispconfig update changes tables as root user. No, as I mentioned above, ISPConfig is not migrating databases during update, it just alters the existing database. Either someone removed columns in the past, or the original install was so old (e.g. an early ISPConfig beta even before ISPConfig had an incremental updater, which was added about 10 - 15 years ago). Then someone installed the latest update skipping major intermediate versions of the past ten years or more. The best option to fix the system is probably this: 1) Back up the complete existing database, just to be sure. 2) Export the data in the database with full column names, but only the data, not the table definitions. 3) Wipe out the old database, create a new one by using install/sql/ispconfig3.sql file from ispconfig tar.gz. 4) Empty all tables, then try to import the data you exported in 2) But there might be minor adjustments necessary to the column layout when doing this though like adding a missing column, but we do not remove columns that often. I have not needed this hard restore method for about 10 years, so I can't say for sure if any adjustments are needed. At least its probably the best way to get a complete and clean database back and in the worst case, you can still restore the backup you made in 1). Or you contact @Th0m from ISPConfig business support and ask him if he can fix the database for you: https://www.ispconfig.org/get-support/?type=ispconfig Alternatively, compare the SQL dump in the file install/sql/ispconfig3.sql and add any missing database tables and columns.