Upgrading from Zabbix 3.4 to 4.0 and zabbix-server won't start? Depending on the issue, this may be the fix you're looking for.
After upgrading from 3.4 to 4.0, browsing the web interface of Zabbix results in the following message:
Database error: The frontend does not match Zabbix database. Current database version (mandatory/optional): 3050110/3050110. Required mandatory version: 4000000. Contact your system administrator.
The upgrade of the database that it is talking about should have happened automagically during the start of the zabbix-server service. Unfortunately, upon further investigation, the service would not start. By viewing the log associated with the service (/var/log/zabbix/zabbix_server.log), we can see the following error:
Duplicate column name 'name' [alter table `events` add `name` varchar(2048) default '' not null]
In order to start the automatic DB upgrade, we must first clear this error. Open connection to your DB and run the following query:
mysql -u $zabbix-user -p USE $zabbix-db-name; ALTER TABLE events DROP COLUMN name; exit
The zabbix-server service should now start successfully and being the upgrade. You can watch its progress by viewing: /var/log/zabbix/zabbix_server.log.
A bug has been logged with Zabbix regarding this issue. You can find it here: https://support.zabbix.com/browse/ZBXNEXT-4832