[ZBX-18526] [PGSQL] failed to update local proxy configuration copy: database error Created: 2020 Oct 20  Updated: 2023 Nov 10  Resolved: 2023 Nov 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P)
Affects Version/s: 4.0.25
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: LivreAcesso.Pro Assignee: Aigars Kadikis
Resolution: Unsupported version Votes: 0
Labels: database, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux zabbix-proxy-4 5.4.34-1-pve #1 SMP PVE 5.4.34-2 (Thu, 07 May 2020 10:02:02 +0200) x86_64 GNU/Linux
Debian 10.6
psql (PostgreSQL) 13.0 (Debian 13.0-1.pgdg100+1)
zabbix_proxy (Zabbix) 4.0.4
Revision 89349 4 February 2019, compilation time: Feb 6 2019 00:50:40


Attachments: File schema.sql.gz     File zabbix_proxy.log    

 Description   

Steps to reproduce:

Install PostgreSQL

Install Zabbix Proxy for PostgreSQL

Create Zabbix Proxy Database:

zcat /usr/share/zabbix-proxy-pgsql/schema.sql.gz | psql -U zabbix -d zabbixproxy

Result:

1523:20201020:132317.737 received configuration data from server at "10.111.4.134", datalen 3569
 1523:20201020:132317.743 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: insert or update on table "expressions" violates foreign key constraint "c_expressions_1"
DETAIL: Key (regexpid)=(6) is not present in table "regexps".
 [insert into expressions (expressionid,regexpid,expression,expression_type,exp_delimiter,case_sensitive) values (1,1,'^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$',3,',',0),(3,3,'^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$',4,',',1),(5,4,'^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$',4,',',1),(6,5,'^(automatic|automatic delayed)$',3,',',1),(7,2,'^Software Loopback Interface',4,',',1),(8,2,'^(In)?[Ll]oop[Bb]ack[0-9._]*$',4,',',1),(9,2,'^NULL[0-9.]*$',4,',',1),(10,2,'^[Ll]o[0-9.]*$',4,',',1),(11,2,'^[Ss]ystem$',4,',',1),(12,2,'^Nu[0-9.]*$',4,',',1),(13,2,'^\<pppoe',4,',',0),(14,6,'([\d+])',0,',',0);
]
 1523:20201020:132317.744 failed to update local proxy configuration copy: database error

Expected:
Normal sync



 Comments   
Comment by Alexey Pustovalov [ 2020 Oct 20 ]

Can you try to use latest Zabbix proxy 4.0.11?

Also show us table definition expressions.

Comment by Aigars Kadikis [ 2020 Oct 26 ]

Hello LivreAcesso.Pro,

The bug tracker was designed with a purpose to have only the last 3 versions available.

Sorry, but we have to reproduce the issue on a version which has been released in approximately last 60 days.

The zabbix_proxy.log states it's 4.0.4. 

I will close this issue, but you are very welcomed here if you run into the issue in the recent build with 4.0 LTS version.

Kind regards, Aigars

Comment by LivreAcesso.Pro [ 2023 Oct 06 ]

Same issue:

zabbix_proxy -V
zabbix_proxy (Zabbix) 4.0.49
Revision cbbcb2bf47d 25 September 2023, compilation time: Sep 25 2023 06:40:09
cat /etc/debian_version 
11.7
psql (PostgreSQL) 13.11 (Debian 13.11-0+deb11u1)

zabbix_proxy.log:

5580:20231005:222452.529 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  insert or update on table "expressions" violates foreign key constraint "c_expressions_1"
DETAIL:  Key (regexpid)=(6) is not present in table "regexps".
 [insert into expressions (expressionid,regexpid,expression,expression_type,exp_delimiter,case_sensitive) values (1,1,'^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$',3,',',0),(3,3,'^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$',4,',',1),(5,4,'^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$',4,',',1),(6,5,'^(automatic|automatic delayed)$',3,',',1),(7,2,'^Software Loopback Interface',4,',',1),(8,2,'^(In)?[Ll]oop[Bb]ack[0-9._]*$',4,',',1),(9,2,'^NULL[0-9.]*$',4,',',1),(10,2,'^[Ll]o[0-9.]*$',4,',',1),(11,2,'^[Ss]ystem$',4,',',1),(12,2,'^Nu[0-9.]*$',4,',',1),(13,2,'^\<pppoe',4,',',0),(14,6,'([\d+])',0,',',0);
]
  5580:20231005:222452.529 failed to update local proxy configuration copy: database error
Comment by LivreAcesso.Pro [ 2023 Oct 10 ]

LTS version.

Comment by Aigars Kadikis [ 2023 Nov 10 ]

Zabbix 4.0 is not supported anymore:
https://www.zabbix.com/life_cycle_and_release_policy

Please upgrade to a supported version.

Generated at Fri Apr 04 19:22:46 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.