[ZBX-18655] PostgreSQL - PGRES_FATAL_ERROR using zabbix-server 5.0.5 Created: 2020 Nov 14  Updated: 2024 Apr 10  Resolved: 2020 Nov 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.0.5, 5.2.1
Fix Version/s: 5.0.6rc1, 5.2.2rc1, 5.4.0alpha1, 5.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Alexander Yagupov Assignee: Michael Veksler
Resolution: Fixed Votes: 0
Labels: lld, snmp_interface
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SLES 15.01 Postgresql server 12


Attachments: PNG File HostID_10898.PNG     PNG File HostID_12274.PNG     HTML File ps_ax_grep_zabbix     File zabbix_server.log-20201115    
Issue Links:
Duplicate
is duplicated by ZBX-18797 Zabbix server crashes during LLD disc... Closed
Team: Team C
Sprint: Sprint 70 (Nov 2020)
Story Points: 1

 Description   

After upgrading to version 5.0.5, the zabbix server log contains constant errors:
[Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
DETAIL: Key (interfaceid)=(2414) already exists.

In the postgresql log:
zabbix zabbix [1678]ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
zabbix zabbix [1678]DETAIL: Key (interfaceid)=(706) already exists.
zabbix zabbix [1678]STATEMENT: insert into interface_snmp



 Comments   
Comment by Elina Kuzyutkina (Inactive) [ 2020 Nov 16 ]

Hello!
Please attach full Zabbix server log and ps ax| grep zabbix output from Zabbix server

select hostid from interface where interfaceid in (2414,706);

Find host with these hostid in Zabbix Frontend (You can open any host and modify hostid in URI manually) and attach screenshots of them
Regards, Elina

Comment by Alexander Yagupov [ 2020 Nov 16 ]

Hello! I attach Zabbix server log, ps ax | grep zabbix and screenshots Host with Interfaceid in (2414,706). I have now returned the zabbix-pgsql version 5.0.4.

Comment by Elina Kuzyutkina (Inactive) [ 2020 Nov 16 ]

Thank you!

Comment by Vladislavs Sokurenko [ 2020 Nov 16 ]

Thank you, this is very valuable information, so issue is not present in 5.0.4 and was introduced in 5.0.5 ?

Comment by Alexander Yagupov [ 2020 Nov 16 ]

Hello again! Maybe you can also solve the issue with ZBX-18319 and ZBX-18292. Each update has to be rolled back to zabbix-agent version 2-5.0.1

Comment by Steve DESTIVELLE [ 2020 Nov 18 ]

Hello,

 

got the same with an upgrade to 5.2.1.

 

2020-11-16 22:06:09.444 UTC [62] ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
2020-11-16 22:06:09.444 UTC [62] DETAIL: Key (interfaceid)=(96) already exists.
2020-11-16 22:06:09.444 UTC [62] STATEMENT: insert into interface_snmp (interfaceid,version,bulk,community,securityname,securitylevel,authpassphrase,privpassphrase,authprotocol,privprotocol,contextname) values (96,2,1,'{$SNMP_COMMUNITY}','',0,'','',0,0,'');

2020-11-16 22:10:49.050 UTC [64] ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
2020-11-16 22:10:49.050 UTC [64] DETAIL: Key (interfaceid)=(43) already exists.
2020-11-16 22:10:49.050 UTC [64] STATEMENT: insert into interface_snmp (interfaceid,version,bulk,community,securityname,securitylevel,authpassphrase,privpassphrase,authprotocol,privprotocol,contextname) values (43,2,1,'{$SNMP_COMMUNITY}','',0,'','',0,0,''),(46,2,1,'{$SNMP_COMMUNITY}','',0,'','',0,0,'');

2020-11-16 23:09:03.331 UTC [62] ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
2020-11-16 23:09:03.331 UTC [62] DETAIL: Key (interfaceid)=(39) already exists.
2020-11-16 23:09:03.331 UTC [62] STATEMENT: insert into interface_snmp (interfaceid,version,bulk,community,securityname,securitylevel,authpassphrase,privpassphrase,authprotocol,privprotocol,contextname) values (39,2,1,'{$SNMP_COMMUNITY}','',0,'','',0,0,'');

2020-11-16 23:10:49.421 UTC [62] ERROR: duplicate key value violates unique constraint "interface_snmp_pkey"
2020-11-16 23:10:49.421 UTC [62] DETAIL: Key (interfaceid)=(43) already exists.
2020-11-16 23:10:49.421 UTC [62] STATEMENT: insert into interface_snmp (interfaceid,version,bulk,community,securityname,securitylevel,authpassphrase,privpassphrase,authprotocol,privprotocol,contextname) values (43,2,1,'{$SNMP_COMMUNITY}','',0,'','',0,0,'');

Comment by Michael Veksler [ 2020 Nov 20 ]

Available in:

Generated at Sat Apr 26 02:00:50 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.