[ZBX-14445] Something impossible has just happened. Created: 2018 Jun 07  Updated: 2020 Jan 01  Resolved: 2018 Jun 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 3.4.10
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Sebastian Vandrey Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: interface
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 6 updated to current patch level


Attachments: Microsoft Word select_star_interface.csv     Text File zabbix_log.txt    
Issue Links:
Duplicate
duplicates ZBX-12657 ERROR dbconfig.c Something impossible... Closed
is duplicated by ZBX-17131 zabbix_server [10181]: ERROR [file:db... Closed

 Description   

We did migrate Zabbix from 3.0 to 3.2 and then 3.4.10.
After the process was done we see the following messages on zabbix server start. (full log attached)

26319:20180607:082042.022 using configuration file: /etc/zabbix/zabbix_server.conf
26319:20180607:082042.098 current database version (mandatory/optional): 03040000/03040007
26319:20180607:082042.098 required mandatory version: 03040000
zabbix_server [26319]: ERROR [file:dbconfig.c,line:1999] Something impossible has just happened.
zabbix_server [26319]: ERROR [file:dbconfig.c,line:1999] Something impossible has just happened.

The server starts and the system is usable, but we are not sure if anything is broken in the system.
We would be very grateful for any tips or a analysis.

Thanks
Sebastian

 



 Comments   
Comment by Alexey Pustovalov [ 2018 Jun 07 ]

Please execute the following SQL query to Zabbix DB:

select h.host, h.hostid from hosts h left join interface i ON  i.hostid = h.hostid where h.status IN (0,1) and h.flags in (0,4) and i.interfaceid is null; 
Comment by Sebastian Vandrey [ 2018 Jun 07 ]

I ran the query on the DB ... 0 row(s) returned

 

Comment by Vladislavs Sokurenko [ 2018 Jun 07 ]

This is a long shot but could try showing output of

show create table interface;
select * from interface where hostid not in (select hostid from hosts);
Comment by Sebastian Vandrey [ 2018 Jun 11 ]

Here is the output of 

show create table interface;
select * from interface where hostid not in (select hostid from hosts);

OUTPUT:

 

CREATE TABLE `interface` (
`interfaceid` bigint(20) unsigned NOT NULL,
`hostid` bigint(20) unsigned NOT NULL,
`main` int(11) NOT NULL DEFAULT 0,
`type` int(11) NOT NULL DEFAULT 0,
`useip` int(11) NOT NULL DEFAULT 1,
`ip` varchar(64) CHARACTER SET utf8 COLLATE utf8mb4_bin NOT NULL DEFAULT '127.0.0.1',
`dns` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`port` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '10050',
`bulk` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`interfaceid`),
KEY `interface_1` (`hostid`,`type`),
KEY `interface_2` (`ip`,`dns`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

 

Comment by Vladislavs Sokurenko [ 2018 Jun 11 ]

I am sorry but I don't see output of

select * from interface where hostid not in (select hostid from hosts);

Also you are missing foreign key:

| interface | CREATE TABLE `interface` (
  `interfaceid` bigint(20) unsigned NOT NULL,
  `hostid` bigint(20) unsigned NOT NULL,
  `main` int(11) NOT NULL DEFAULT 0,
  `type` int(11) NOT NULL DEFAULT 0,
  `useip` int(11) NOT NULL DEFAULT 1,
  `ip` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '127.0.0.1',
  `dns` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `port` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '10050',
  `bulk` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`interfaceid`),
  KEY `interface_1` (`hostid`,`type`),
  KEY `interface_2` (`ip`,`dns`),
  CONSTRAINT `c_interface_1` FOREIGN KEY (`hostid`) REFERENCES `hosts` (`hostid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin |
Comment by Sebastian Vandrey [ 2018 Jun 11 ]

sorry, i attached the output of

select * from interface where hostid not in (select hostid from hosts);

select_star_interface.csv

Comment by Sebastian Vandrey [ 2018 Jun 11 ]

Thanks, will check and add the foreign key.

Comment by Vladislavs Sokurenko [ 2018 Jun 11 ]

It's possible that someone edited database manually, nothing to fix in zabbix as this should never happen, closing issue as Duplicate of Won't Fix issue.

Comment by Alexey Pustovalov [ 2018 Jun 11 ]

Sebastian, I recommend you check all tables in Zabbix database for consistency with Zabbix vanilla database schema.

Comment by Sebastian Vandrey [ 2018 Jun 11 ]

Thanks a lot for the analysis. Will go through the database and check the schema.

We did some optimization experiments using different DB engines a couple of years ago and moved the database quite a lot. Probably there were some loses during the moves. ;P

Generated at Fri Apr 04 15:53:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.