[ZBX-25782] Zabbix proxy sqlite3 crashes on startup on rocky linux 8 Created: 2024 Dec 21  Updated: 2025 Nov 05  Resolved: 2025 Jan 16

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P)
Affects Version/s: 7.2.0, 7.2.1
Fix Version/s: 6.0.38rc1, 7.0.9rc1, 7.2.2rc1, 7.4.0alpha1

Type: Problem report Priority: Critical
Reporter: Federico Crepaldi Assignee: Dmitrijs Goloscapovs (Inactive)
Resolution: Fixed Votes: 2
Labels: crash, regression
Remaining Estimate: Not Specified
Time Spent: 5h
Original Estimate: Not Specified
Environment:

[root@lab ~]# getenforce
Disabled

[root@lab ~]# cat /etc/*release*
Rocky Linux release 8.10 (Green Obsidian)
NAME="Rocky Linux"
VERSION="8.10 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.10"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.10 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.10"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.10"
Rocky Linux release 8.10 (Green Obsidian)
Rocky Linux release 8.10 (Green Obsidian)
Derived from Red Hat Enterprise Linux 8.10
Rocky Linux release 8.10 (Green Obsidian)
cpe:/o:rocky:rocky:8:GA

[root@lab ~]# uname -a
Linux lab 4.18.0-553.33.1.el8_10.x86_64 #1 SMP Thu Dec 19 14:28:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux


Issue Links:
Duplicate
duplicates ZBX-25816 Proxy 7.2 fails to open a SQLite3 file Closed
Team: Team A
Sprint: S24-W50/51/52/1, S25-W2/3
Story Points: 1

 Description   

Steps to reproduce:

  1. Update sqllite3 proxy from 7.0 to 7.2.0 or 7.2.1 on Rocky Linux 8
  2. Start zabbix proxy

Result:
Zabbix proxy is unable to create and use it's sqllite database:

14891:20241221:100359.865 Starting Zabbix Proxy (active) [zbxProxy]. Zabbix 7.2.1 (revision 67f3c838b2a).
 14891:20241221:100359.865 **** Enabled features ****
 14891:20241221:100359.865 SNMP monitoring:       YES
 14891:20241221:100359.865 IPMI monitoring:       YES
 14891:20241221:100359.865 Web monitoring:        YES
 14891:20241221:100359.865 VMware monitoring:     YES
 14891:20241221:100359.865 ODBC:                  YES
 14891:20241221:100359.865 SSH support:           YES
 14891:20241221:100359.865 IPv6 support:          YES
 14891:20241221:100359.865 TLS support:           YES
 14891:20241221:100359.865 **************************
 14891:20241221:100359.865 using configuration file: /etc/zabbix/zabbix_proxy.conf
 14891:20241221:100359.865 In zbx_load_modules()
 14891:20241221:100359.865 End of zbx_load_modules():SUCCEED
 14891:20241221:100359.865 In zbx_ipc_service_start() service:rtc
 14891:20241221:100359.865 In zbx_ipc_socket_open()
 14891:20241221:100359.865 End of zbx_ipc_socket_open():FAIL
 14891:20241221:100359.865 End of zbx_ipc_service_start():SUCCEED
 14891:20241221:100359.865 In zbx_init_database_cache()
 14891:20241221:100359.865 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
 14891:20241221:100359.865 valid user addresses: [0x7f2eb9adf170, 0x7f2ebaadeff0] total size: 16776832
 14891:20241221:100359.865 End of zbx_shmem_create()
 14891:20241221:100359.865 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
 14891:20241221:100359.865 valid user addresses: [0x7f2eb96df180, 0x7f2eb9adeff0] total size: 4193904
 14891:20241221:100359.865 End of zbx_shmem_create()
 14891:20241221:100359.865 End of zbx_init_database_cache()
 14891:20241221:100359.865 In zbx_init_configuration_cache() size:8388608
 14891:20241221:100359.865 In zbx_shmem_create() param:'CacheSize' size:8388608
 14891:20241221:100359.865 valid user addresses: [0x7f2eb8edf170, 0x7f2eb96deff0] total size: 8388224
 14891:20241221:100359.865 End of zbx_shmem_create()
 14891:20241221:100359.865 End of zbx_init_configuration_cache()
 14891:20241221:100359.865 In zbx_init_selfmon_collector()
 14891:20241221:100359.865 zbx_init_selfmon_collector() size:33136
 14891:20241221:100359.865 In zbx_shmem_create() param:'(null)' size:33520
 14891:20241221:100359.865 valid user addresses: [0x7f2ec311f170, 0x7f2ec31272e0] total size: 33136
 14891:20241221:100359.865 End of zbx_shmem_create()
 14891:20241221:100359.865 End of zbx_init_selfmon_collector() collector.monitor:0x7f2ec311f170
 14891:20241221:100359.865 In zbx_pb_create() mode:2
 14891:20241221:100359.865 In zbx_shmem_create() param:'ProxyMemoryBufferSize' size:268435456
 14891:20241221:100359.865 valid user addresses: [0x7f2ea8edf180, 0x7f2eb8edeff0] total size: 268435056
 14891:20241221:100359.865 End of zbx_shmem_create()
 14891:20241221:100359.865 End of zbx_pb_create():
 14891:20241221:100359.865 cannot open database file "/tmp/zabbix_proxy.db": [2] No such file or directory
 14891:20241221:100359.865 creating database ...
 14891:20241221:100359.866 [Z3001] connection to database '/tmp/zabbix_proxy.db' failed: [0] unable to open database file
 14891:20241221:100359.866 cannot initialize database: cannot open database

Expected:
Zabbix proxy start



 Comments   
Comment by Alexey Pustovalov [ 2024 Dec 21 ]

Is it full log till crash / stop?

I can not reproduce the issue:

     7:20241222:005756.514 Starting Zabbix Proxy (active) [zabbix-proxy-sqlite3]. Zabbix 7.0.7 (revision af5010c).
     7:20241222:005756.514 **** Enabled features ****
     7:20241222:005756.514 SNMP monitoring:       YES
     7:20241222:005756.514 IPMI monitoring:       YES
     7:20241222:005756.514 Web monitoring:        YES
     7:20241222:005756.514 VMware monitoring:     YES
     7:20241222:005756.514 ODBC:                  YES
     7:20241222:005756.514 SSH support:           YES
     7:20241222:005756.514 IPv6 support:          YES
     7:20241222:005756.514 TLS support:           YES
     7:20241222:005756.514 **************************
     7:20241222:005756.514 using configuration file: /etc/zabbix/zabbix_proxy.conf
     7:20241222:005756.514 cannot open database file "/var/lib/zabbix/db_data/zabbix-proxy-sqlite3.sqlite": [2] No such file or directory
     7:20241222:005756.514 creating database ...
     7:20241222:005757.783 current database version (mandatory/optional): 07000000/07000015
     7:20241222:005757.783 required mandatory version: 07000000
Comment by Federico Crepaldi [ 2024 Dec 23 ]

It is the full log indeed. I see you tried with zabbix proxy 7.0.7, I have the issue with 7.2.0  and 7.2.1

 

Comment by Alexey Pustovalov [ 2024 Dec 23 ]

Still the same, can you try to specify different location for proxy database?

Comment by Federico Crepaldi [ 2024 Dec 24 ]

It's still the same:

 

78894:20241224:091746.937 Starting Zabbix Proxy (active) [Proxy interno]. Zabbix 7.2.1 (revision 67f3c838b2a).
 78894:20241224:091746.937 **** Enabled features ****
 78894:20241224:091746.937 SNMP monitoring:       YES
 78894:20241224:091746.937 IPMI monitoring:       YES
 78894:20241224:091746.937 Web monitoring:        YES
 78894:20241224:091746.937 VMware monitoring:     YES
 78894:20241224:091746.937 ODBC:                  YES
 78894:20241224:091746.937 SSH support:           YES
 78894:20241224:091746.937 IPv6 support:          YES
 78894:20241224:091746.937 TLS support:           YES
 78894:20241224:091746.937 **************************
 78894:20241224:091746.937 using configuration file: /etc/zabbix/zabbix_proxy.conf
 78894:20241224:091746.937 In zbx_load_modules()
 78894:20241224:091746.937 End of zbx_load_modules():SUCCEED
 78894:20241224:091746.937 In zbx_ipc_service_start() service:rtc
 78894:20241224:091746.937 End of zbx_ipc_service_start():SUCCEED
 78894:20241224:091746.937 In zbx_init_database_cache()
 78894:20241224:091746.937 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
 78894:20241224:091746.937 valid user addresses: [0x7f009d6d4170, 0x7f009e6d3ff0] total size: 16776832
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
 78894:20241224:091746.937 valid user addresses: [0x7f009d2d4180, 0x7f009d6d3ff0] total size: 4193904
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 End of zbx_init_database_cache()
 78894:20241224:091746.937 In zbx_init_configuration_cache() size:8388608
 78894:20241224:091746.937 In zbx_shmem_create() param:'CacheSize' size:8388608
 78894:20241224:091746.937 valid user addresses: [0x7f009cad4170, 0x7f009d2d3ff0] total size: 8388224
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 End of zbx_init_configuration_cache()
 78894:20241224:091746.937 In zbx_init_selfmon_collector()
 78894:20241224:091746.937 zbx_init_selfmon_collector() size:33136
 78894:20241224:091746.937 In zbx_shmem_create() param:'(null)' size:33520
 78894:20241224:091746.937 valid user addresses: [0x7f00a6d14170, 0x7f00a6d1c2e0] total size: 33136
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 End of zbx_init_selfmon_collector() collector.monitor:0x7f00a6d14170
 78894:20241224:091746.937 In zbx_pb_create() mode:2
 78894:20241224:091746.937 In zbx_shmem_create() param:'ProxyMemoryBufferSize' size:268435456
 78894:20241224:091746.937 valid user addresses: [0x7f008cad4180, 0x7f009cad3ff0] total size: 268435056
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 End of zbx_pb_create():
 78894:20241224:091746.937 In zbx_shmem_create() param:'(null)' size:488
 78894:20241224:091746.937 valid user addresses: [0x7f00a6d3a168, 0x7f00a6d3a1d8] total size: 112
 78894:20241224:091746.937 End of zbx_shmem_create()
 78894:20241224:091746.937 In zbx_dbconn_open() options:0
 78894:20241224:091746.937 query without transaction detected
 78894:20241224:091746.937 query [txnlev:0] [pragma synchronous=0]
 78894:20241224:091746.940 query without transaction detected
 78894:20241224:091746.940 query [txnlev:0] [pragma foreign_keys=on]
 78894:20241224:091746.940 query without transaction detected
 78894:20241224:091746.940 query [txnlev:0] [pragma temp_store=2]
 78894:20241224:091746.940 query without transaction detected
 78894:20241224:091746.940 query [txnlev:0] [pragma temp_store_directory='/etc/zabbix/db/']
 78894:20241224:091746.940 End of zbx_dbconn_open():0
 78894:20241224:091746.940 In zbx_db_get_database_type()
 78894:20241224:091746.940 query [txnlev:0] [select userid from users limit 1]
 78894:20241224:091746.940 no records in "users" table
 78894:20241224:091746.940 End of zbx_db_get_database_type():ZBX_DB_PROXY
 78894:20241224:091746.940 In zbx_dbconn_extract_version_info()
 78894:20241224:091746.940 End of zbx_dbconn_extract_version_info() version:0
 78894:20241224:091746.940 In zbx_db_check_version_and_upgrade()
 78894:20241224:091746.940 query [txnlev:0] [select 1 from sqlite_master where tbl_name='dbversion' and type='table']
 78894:20241224:091746.940 query [txnlev:0] [select mandatory,optional from dbversion]
 78894:20241224:091746.940 The proxy does not match Zabbix database. Current database version (mandatory/optional): 07000000/07000000. Required mandatory version: 07020000.
 78894:20241224:091746.940 Zabbix does not support SQLite3 database upgrade.
 78894:20241224:091746.940 End of zbx_db_check_version_and_upgrade():FAIL
 78894:20241224:091746.940 removing database file: "/etc/zabbix/db/zabbix_proxy.db"
 78894:20241224:091746.940 cannot open database file "/etc/zabbix/db/zabbix_proxy.db": [2] No such file or directory
 78894:20241224:091746.940 creating database ...
 78894:20241224:091746.940 [Z3001] connection to database '/etc/zabbix/db/zabbix_proxy.db' failed: [0] unable to open database file
 78894:20241224:091746.940 cannot initialize database: cannot open database
 
[root@lab ~]# ll /etc/zabbix/db/
totale 0
drwxr-xr-x 2 zabbix zabbix   6 24 dic 09.17 .
drwxr-xr-x 5 root   root   235 24 dic 09.16 ..

 

Comment by Alexey Pustovalov [ 2024 Dec 24 ]

Try to start manually Zabbix proxy from console. For example:

zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf --foreground  

Also, please share:

systemctl status zabbix-proxy

after unsuccessful start using systemctl.

Comment by Federico Crepaldi [ 2024 Dec 26 ]

It just crashes

[root@lab ~]# zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf --foreground
Starting Zabbix Proxy (active) [Proxy interno]. Zabbix 7.2.1 (revision 67f3c838b2a).
Press Ctrl+C to exit.

[root@lab ~]# echo $?
1
[root@lab ~]#

With systemd

[root@lab ~]# systemctl start zabbix-proxy
Job for zabbix-proxy.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status zabbix-proxy.service" and "journalctl -xe" for details.
[root@lab ~]# systemctl status zabbix-proxy
● zabbix-proxy.service - Zabbix Proxy
   Loaded: loaded (/usr/lib/systemd/system/zabbix-proxy.service; disabled; vend>
  Drop-In: /etc/systemd/system/zabbix-proxy.service.d
           └─override.conf
   Active: activating (auto-restart) (Result: protocol) since Thu 2024-12-26 11>
  Process: 23175 ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE (code=exited, st>
[root@lab ~]#
--
-- The unit zabbix-proxy.service has entered the 'failed' state with result 'protocol'.
dic 26 11:03:28 lab systemd[1]: Failed to start Zabbix Proxy.
-- Subject: L'unità zabbix-proxy.service è fallita
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- L'unità zabbix-proxy.service è fallita.
--
-- Il risultato è failed.
dic 26 11:03:35 lab qemu-ga[936]: info: guest-ping called
dic 26 11:03:38 lab systemd[1]: zabbix-proxy.service: Service RestartSec=10s expired, scheduling restart.
dic 26 11:03:38 lab systemd[1]: zabbix-proxy.service: Scheduled restart job, restart counter is at 6.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Automatic restarting of the unit zabbix-proxy.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
dic 26 11:03:38 lab systemd[1]: Stopped Zabbix Proxy.
-- Subject: L'unità zabbix-proxy.service termina la fase di spegnimento
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- L'unità zabbix-proxy.service ha terminato la fase di spegnimento.
dic 26 11:03:38 lab systemd[1]: Starting Zabbix Proxy...
-- Subject: L'unità zabbix-proxy.service inizia la fase di avvio
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- L'unità zabbix-proxy.service ha iniziato la fase di avvio.
dic 26 11:03:40 lab systemd[1]: zabbix-proxy.service: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory
dic 26 11:03:40 lab systemd[1]: zabbix-proxy.service: Failed with result 'protocol'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The unit zabbix-proxy.service has entered the 'failed' state with result 'protocol'.
dic 26 11:03:40 lab systemd[1]: Failed to start Zabbix Proxy.
-- Subject: L'unità zabbix-proxy.service è fallita
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- L'unità zabbix-proxy.service è fallita.
--
-- Il risultato è failed.
dic 26 11:03:46 lab qemu-ga[936]: info: guest-ping called
Comment by Edgar Akhmetshin [ 2024 Dec 26 ]

So with root you have started it:

[root@lab ~]# zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf --foreground
Starting Zabbix Proxy (active) [Proxy interno]. Zabbix 7.2.1 (revision 67f3c838b2a).
Press Ctrl+C to exit.

Do you have log file during this execution?

Show also output from:

sestatus
Comment by Federico Crepaldi [ 2024 Dec 26 ]

So, as you can see the process immediately crashes:

[root@lab ~]# time zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf --foreground
Starting Zabbix Proxy (active) [Proxy interno]. Zabbix 7.2.1 (revision 67f3c838b2a).
Press Ctrl+C to exit.
real    0m0,012s
user    0m0,005s
sys     0m0,006s
[root@lab ~]# echo $?
1
[root@lab ~]# sestatus
SELinux status:                 disabled 

And here you have the log file contents:

26611:20241226:184501.007 Starting Zabbix Proxy (active) [Proxy interno]. Zabbix 7.2.1 (revision 67f3c838b2a).
 26611:20241226:184501.007 **** Enabled features ****
 26611:20241226:184501.007 SNMP monitoring:       YES
 26611:20241226:184501.007 IPMI monitoring:       YES
 26611:20241226:184501.007 Web monitoring:        YES
 26611:20241226:184501.007 VMware monitoring:     YES
 26611:20241226:184501.007 ODBC:                  YES
 26611:20241226:184501.007 SSH support:           YES
 26611:20241226:184501.007 IPv6 support:          YES
 26611:20241226:184501.007 TLS support:           YES
 26611:20241226:184501.007 **************************
 26611:20241226:184501.007 using configuration file: /etc/zabbix/zabbix_proxy.conf
 26611:20241226:184501.007 In zbx_load_modules()
 26611:20241226:184501.007 End of zbx_load_modules():SUCCEED
 26611:20241226:184501.007 In zbx_ipc_service_start() service:rtc
 26611:20241226:184501.007 End of zbx_ipc_service_start():SUCCEED
 26611:20241226:184501.007 In zbx_init_database_cache()
 26611:20241226:184501.007 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
 26611:20241226:184501.007 valid user addresses: [0x7f6c647b7170, 0x7f6c657b6ff0] total size: 16776832
 26611:20241226:184501.007 End of zbx_shmem_create()
 26611:20241226:184501.007 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
 26611:20241226:184501.007 valid user addresses: [0x7f6c643b7180, 0x7f6c647b6ff0] total size: 4193904
 26611:20241226:184501.007 End of zbx_shmem_create()
 26611:20241226:184501.007 End of zbx_init_database_cache()
 26611:20241226:184501.007 In zbx_init_configuration_cache() size:8388608
 26611:20241226:184501.007 In zbx_shmem_create() param:'CacheSize' size:8388608
 26611:20241226:184501.007 valid user addresses: [0x7f6c63bb7170, 0x7f6c643b6ff0] total size: 8388224
 26611:20241226:184501.007 End of zbx_shmem_create()
 26611:20241226:184501.007 End of zbx_init_configuration_cache()
 26611:20241226:184501.007 In zbx_init_selfmon_collector()
 26611:20241226:184501.007 zbx_init_selfmon_collector() size:33136
 26611:20241226:184501.007 In zbx_shmem_create() param:'(null)' size:33520
 26611:20241226:184501.007 valid user addresses: [0x7f6c6ddf7170, 0x7f6c6ddff2e0] total size: 33136
 26611:20241226:184501.007 End of zbx_shmem_create()
 26611:20241226:184501.007 End of zbx_init_selfmon_collector() collector.monitor:0x7f6c6ddf7170
 26611:20241226:184501.007 In zbx_pb_create() mode:2
 26611:20241226:184501.007 In zbx_shmem_create() param:'ProxyMemoryBufferSize' size:268435456
 26611:20241226:184501.007 valid user addresses: [0x7f6c53bb7180, 0x7f6c63bb6ff0] total size: 268435056
 26611:20241226:184501.007 End of zbx_shmem_create()
 26611:20241226:184501.007 End of zbx_pb_create():
 26611:20241226:184501.007 In zbx_shmem_create() param:'(null)' size:488
 26611:20241226:184501.008 valid user addresses: [0x7f6c6de1d168, 0x7f6c6de1d1d8] total size: 112
 26611:20241226:184501.008 End of zbx_shmem_create()
 26611:20241226:184501.008 In zbx_dbconn_open() options:0
 26611:20241226:184501.008 query without transaction detected
 26611:20241226:184501.008 query [txnlev:0] [pragma synchronous=0]
 26611:20241226:184501.010 query without transaction detected
 26611:20241226:184501.010 query [txnlev:0] [pragma foreign_keys=on]
 26611:20241226:184501.010 query without transaction detected
 26611:20241226:184501.010 query [txnlev:0] [pragma temp_store=2]
 26611:20241226:184501.010 query without transaction detected
 26611:20241226:184501.010 query [txnlev:0] [pragma temp_store_directory='/etc/zabbix/db/']
 26611:20241226:184501.010 End of zbx_dbconn_open():0
 26611:20241226:184501.010 In zbx_db_get_database_type()
 26611:20241226:184501.010 query [txnlev:0] [select userid from users limit 1]
 26611:20241226:184501.010 no records in "users" table
 26611:20241226:184501.010 End of zbx_db_get_database_type():ZBX_DB_PROXY
 26611:20241226:184501.010 In zbx_dbconn_extract_version_info()
 26611:20241226:184501.010 End of zbx_dbconn_extract_version_info() version:0
 26611:20241226:184501.010 In zbx_db_check_version_and_upgrade()
 26611:20241226:184501.010 query [txnlev:0] [select 1 from sqlite_master where tbl_name='dbversion' and type='table']
 26611:20241226:184501.010 query [txnlev:0] [select mandatory,optional from dbversion]
 26611:20241226:184501.010 The proxy does not match Zabbix database. Current database version (mandatory/optional): 07000000/07000000. Required mandatory version: 07020000.
 26611:20241226:184501.010 Zabbix does not support SQLite3 database upgrade.
 26611:20241226:184501.010 End of zbx_db_check_version_and_upgrade():FAIL
 26611:20241226:184501.010 removing database file: "/etc/zabbix/db/zabbix_proxy.db"
 26611:20241226:184501.011 cannot open database file "/etc/zabbix/db/zabbix_proxy.db": [2] No such file or directory
 26611:20241226:184501.011 creating database ...
 26611:20241226:184501.011 [Z3001] connection to database '/etc/zabbix/db/zabbix_proxy.db' failed: [0] unable to open database file
 26611:20241226:184501.011 cannot initialize database: cannot open database

It is inconsistent as it removes the database file; it is supposed to do so as part of the upgrade process. Then it tries to create a database file, it fails to create it, thus it cannot open said file and it crashes.

26611:20241226:184501.010 The proxy does not match Zabbix database. Current database version (mandatory/optional): 07000000/07000000. Required mandatory version: 07020000.
 26611:20241226:184501.010 Zabbix does not support SQLite3 database upgrade.
 26611:20241226:184501.010 End of zbx_db_check_version_and_upgrade():FAIL
 26611:20241226:184501.010 removing database file: "/etc/zabbix/db/zabbix_proxy.db"
 26611:20241226:184501.011 cannot open database file "/etc/zabbix/db/zabbix_proxy.db": [2] No such file or directory
 26611:20241226:184501.011 creating database ...
 26611:20241226:184501.011 [Z3001] connection to database '/etc/zabbix/db/zabbix_proxy.db' failed: [0] unable to open database file
 26611:20241226:184501.011 cannot initialize database: cannot open database
Comment by Edgar Akhmetshin [ 2024 Dec 27 ]

Provide also content of this files:

  • /etc/systemd/system/zabbix-proxy.service.d/override.conf
  • /usr/lib/systemd/system/zabbix-proxy.service

And output from 'ps aux' even with a stopped Proxy.

Comment by Federico Crepaldi [ 2024 Dec 27 ]

Here you are:

  • /etc/systemd/system/zabbix-proxy.service.d/override.conf
    [root@lab ~]# cat /etc/systemd/system/zabbix-proxy.service.d/override.conf
    [Service]
    LimitNOFILE=102400
    
  • /usr/lib/systemd/system/zabbix-proxy.service
    [root@lab ~]# cat /usr/lib/systemd/system/zabbix-proxy.service
    [Unit]
    Description=Zabbix Proxy
    After=syslog.target
    After=network.target
    After=mysql.service
    After=mysqld.service
    After=mariadb.service
    After=postgresql.service
    After=pgbouncer.service
    After=postgresql-9.4.service
    After=postgresql-9.5.service
    After=postgresql-9.6.service
    After=postgresql-10.service
    After=postgresql-11.service
    After=postgresql-12.service
    After=postgresql-13.service
    After=postgresql-14.service
    After=postgresql-15.service
    After=postgresql-16.service
    
    [Service]
    Environment="CONFFILE=/etc/zabbix/zabbix_proxy.conf"
    EnvironmentFile=-/etc/sysconfig/zabbix-proxy
    Type=forking
    Restart=on-failure
    PIDFile=/run/zabbix/zabbix_proxy.pid
    KillMode=control-group
    ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE
    ExecStop=/bin/kill -SIGTERM $MAINPID
    RestartSec=10s
    TimeoutSec=0
    LimitNOFILE=65536:1048576
    
    [Install]
    WantedBy=multi-user.target
    

And process list with proxy crashed

[root@lab ~]# ps ax
    PID TTY      STAT   TIME COMMAND
      1 ?        Ss     0:06 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
      2 ?        S      0:00 [kthreadd]
      3 ?        I<     0:00 [rcu_gp]
      4 ?        I<     0:00 [rcu_par_gp]
      5 ?        I<     0:00 [slub_flushwq]
      7 ?        I<     0:00 [kworker/0:0H-events_highpri]
     10 ?        I<     0:00 [mm_percpu_wq]
     11 ?        S      0:00 [rcu_tasks_rude_]
     12 ?        S      0:00 [rcu_tasks_trace]
     13 ?        S      0:00 [ksoftirqd/0]
     14 ?        I      0:36 [rcu_sched]
     15 ?        S      0:00 [migration/0]
     16 ?        S      0:00 [watchdog/0]
     17 ?        S      0:00 [cpuhp/0]
     18 ?        S      0:00 [cpuhp/1]
     19 ?        S      0:00 [watchdog/1]
     20 ?        S      0:00 [migration/1]
     21 ?        S      0:00 [ksoftirqd/1]
     24 ?        S      0:00 [cpuhp/2]
     25 ?        S      0:00 [watchdog/2]
     26 ?        S      0:00 [migration/2]
     27 ?        S      0:00 [ksoftirqd/2]
     29 ?        I<     0:00 [kworker/2:0H-events_highpri]
     30 ?        S      0:00 [cpuhp/3]
     31 ?        S      0:00 [watchdog/3]
     32 ?        S      0:00 [migration/3]
     33 ?        S      0:00 [ksoftirqd/3]
     36 ?        S      0:00 [cpuhp/4]
     37 ?        S      0:00 [watchdog/4]
     38 ?        S      0:00 [migration/4]
     39 ?        S      0:00 [ksoftirqd/4]
     41 ?        I<     0:00 [kworker/4:0H-events_highpri]
     42 ?        S      0:00 [cpuhp/5]
     43 ?        S      0:00 [watchdog/5]
     44 ?        S      0:00 [migration/5]
     45 ?        S      0:00 [ksoftirqd/5]
     48 ?        S      0:00 [cpuhp/6]
     49 ?        S      0:00 [watchdog/6]
     50 ?        S      0:00 [migration/6]
     51 ?        S      0:00 [ksoftirqd/6]
     54 ?        S      0:00 [cpuhp/7]
     55 ?        S      0:00 [watchdog/7]
     56 ?        S      0:00 [migration/7]
     57 ?        S      0:00 [ksoftirqd/7]
     59 ?        I<     0:00 [kworker/7:0H-events_highpri]
     68 ?        S      0:00 [kdevtmpfs]
     69 ?        I<     0:00 [netns]
     70 ?        S      0:00 [kauditd]
     71 ?        S      0:00 [khungtaskd]
     72 ?        S      0:00 [oom_reaper]
     73 ?        I<     0:00 [writeback]
     74 ?        S      0:00 [kcompactd0]
     75 ?        SN     0:00 [ksmd]
     76 ?        SN     0:00 [khugepaged]
     77 ?        I<     0:00 [crypto]
     78 ?        I<     0:00 [kintegrityd]
     79 ?        I<     0:00 [kblockd]
     80 ?        I<     0:00 [blkcg_punt_bio]
     81 ?        I<     0:00 [tpm_dev_wq]
     82 ?        I<     0:00 [md]
     83 ?        I<     0:00 [md_bitmap]
     84 ?        I<     0:00 [edac-poller]
     85 ?        S      0:00 [watchdogd]
     87 ?        I<     0:02 [kworker/0:1H-kblockd]
    107 ?        S      0:00 [kswapd0]
    170 ?        I<     0:00 [kthrotld]
    171 ?        I<     0:00 [acpi_thermal_pm]
    173 ?        I<     0:00 [kmpath_rdacd]
    174 ?        I<     0:00 [kaluad]
    178 ?        I<     0:00 [ipv6_addrconf]
    179 ?        I<     0:00 [kstrp]
    220 ?        I<     0:00 [zswap-shrink]
    240 ?        I<     0:03 [kworker/4:1H-kblockd]
    270 ?        I<     0:02 [kworker/2:1H-kblockd]
    274 ?        I<     0:02 [kworker/7:1H-kblockd]
    454 ?        S      0:00 [scsi_eh_0]
    455 ?        I<     0:00 [scsi_tmf_0]
    461 ?        I<     0:00 [ata_sff]
    467 ?        S      0:00 [scsi_eh_1]
    468 ?        I<     0:00 [scsi_tmf_1]
    469 ?        S      0:00 [scsi_eh_2]
    470 ?        I<     0:00 [scsi_tmf_2]
    476 ?        I<     0:00 [ttm]
    592 ?        I<     0:00 [kdmflush/253:0]
    601 ?        I<     0:00 [kdmflush/253:1]
    629 ?        I<     0:00 [xfsalloc]
    630 ?        I<     0:00 [xfs_mru_cache]
    631 ?        I<     0:00 [xfs-buf/dm-0]
    632 ?        I<     0:00 [xfs-conv/dm-0]
    633 ?        I<     0:00 [xfs-cil/dm-0]
    634 ?        I<     0:00 [xfs-reclaim/dm-]
    635 ?        I<     0:00 [xfs-blockgc/dm-]
    636 ?        I<     0:00 [xfs-log/dm-0]
    637 ?        S      0:35 [xfsaild/dm-0]
    731 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
    768 ?        I<     0:00 [rpciod]
    769 ?        I<     0:00 [xprtiod]
    780 ?        Ss     0:00 /usr/lib/systemd/systemd-udevd
    792 ?        I<     0:00 [xfs-buf/sda1]
    794 ?        I<     0:00 [xfs-conv/sda1]
    795 ?        I<     0:00 [xfs-cil/sda1]
    796 ?        I<     0:00 [xfs-reclaim/sda]
    797 ?        I<     0:00 [xfs-blockgc/sda]
    798 ?        I<     0:00 [xfs-log/sda1]
    799 ?        S      0:00 [xfsaild/sda1]
    893 ?        Ss     0:00 /usr/bin/rpcbind -w -f
    898 ?        S<sl   0:00 /sbin/auditd
    900 ?        S<     0:00 /usr/sbin/sedispatch
    902 ?        Ss     0:00 /usr/sbin/rpc.idmapd
    905 ?        Ss     0:00 /usr/sbin/nfsdcld
    926 ?        Ss     0:00 /usr/sbin/sssd -i --logger=files
    928 ?        Ss     0:03 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
    931 ?        Ss     0:00 /usr/bin/lsmd -d
    932 ?        Ssl    0:06 /usr/sbin/irqbalance --foreground
    936 ?        Ssl    1:15 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-ports/org.qemu.guest_agent.0 --blacklist=guest-file-open,guest-file-close,guest-file-
    937 ?        Ss     0:00 /usr/sbin/smartd -n -q never
    940 ?        Ssl    0:11 /usr/sbin/NetworkManager --no-daemon
    946 ?        S      0:00 /usr/sbin/chronyd
    953 ?        Ss     0:00 /usr/sbin/oddjobd -n -p /run/oddjobd.pid -t 300
    956 ?        Ssl    4:04 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
    957 ?        Ss     0:00 /usr/sbin/sshd -D [email protected],[email protected],aes256-ctr,aes256-cbc,[email protected],aes128-ctr,aes128-
    962 ?        S      0:02 /usr/libexec/sssd/sssd_be --domain intranet.lan --uid 0 --gid 0 --logger=files
    967 ?        Ssl    0:19 /usr/bin/containerd
    977 ?        Ssl    0:00 /usr/sbin/gssproxy -D
    989 ?        Ssl    0:00 /usr/sbin/rpc.gssd
   1009 ?        Ss     0:06 /usr/sbin/httpd -DFOREGROUND
   1058 ?        Ssl    9:59 /usr/libexec/mysqld --basedir=/usr
   1070 ?        Ssl    0:09 /usr/sbin/rsyslogd -n
   1074 ?        Ss     0:03 /usr/sbin/snmptrapd -Lsd -f
   1077 ?        Ss     0:00 /usr/sbin/rpc.mountd
   1084 ?        Ss     0:00 /usr/sbin/rpc.statd
   1095 ?        Ss     0:00 /usr/pgsql-17/bin/postgres -D /var/lib/pgsql/17/data/
   1113 ?        S      0:01 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
   1116 ?        S      0:01 /usr/libexec/sssd/sssd_pam --uid 0 --gid 0 --logger=files
   1118 ?        S      0:01 /usr/libexec/sssd/sssd_pac --uid 0 --gid 0 --logger=files
   1208 ?        Ss     0:01 /usr/lib/systemd/systemd-logind
   1217 ?        Ss     0:00 postgres: logger
   1220 ?        Ss     0:00 /usr/sbin/atd -f
   1223 ?        Ss     0:00 /usr/sbin/crond -n
   1224 ?        S      0:00 /usr/sbin/httpd -DFOREGROUND
   1225 ?        Sl     0:44 /usr/sbin/httpd -DFOREGROUND
   1227 ?        Sl     0:44 /usr/sbin/httpd -DFOREGROUND
   1229 ?        Sl     0:45 /usr/sbin/httpd -DFOREGROUND
   1236 tty1     Ss+    0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
   1245 ?        Ss     0:00 postgres: checkpointer
   1246 ?        Ss     0:00 postgres: background writer
   1493 ?        S      0:00 [nfsd]
   1495 ?        S      0:00 [nfsd]
   1498 ?        S      0:00 [nfsd]
   1499 ?        S      0:00 [nfsd]
   1500 ?        S      0:00 [nfsd]
   1502 ?        S      0:00 [nfsd]
   1503 ?        S      0:00 [nfsd]
   1504 ?        S      0:00 [nfsd]
   1516 ?        Ss     0:00 postgres: walwriter
   1517 ?        Ss     0:00 postgres: autovacuum launcher
   1518 ?        Ss     0:00 postgres: logical replication launcher
   1609 ?        Ssl    0:19 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
   1767 ?        Ssl    0:00 /usr/lib/polkit-1/polkitd --no-debug
  28612 ?        I      0:00 [kworker/4:0-cgroup_pidlist_destroy]
  29254 ?        I      0:00 [kworker/6:2-events]
  29352 ?        I      0:00 [kworker/u16:2-events_unbound]
  30375 ?        I      0:00 [kworker/7:0-xfs-sync/sda1]
  30501 ?        I      0:00 [kworker/1:1-xfs-sync/sda1]
  30972 ?        I<     0:00 [kworker/5:14H-ttm]
  31221 ?        I      0:00 [kworker/u16:3-events_unbound]
  31248 ?        I<     0:00 [kworker/1:1H-ttm]
  31317 ?        I<     0:00 [kworker/1:2H-kblockd]
  31405 ?        I<     0:00 [kworker/5:2H-kblockd]
  31567 ?        I<     0:00 [kworker/3:2H-ttm]
  31598 ?        I<     0:00 [kworker/3:0H-kblockd]
  31844 ?        I      0:00 [kworker/6:0-mm_percpu_wq]
  32227 ?        I      0:00 [kworker/3:0-xfs-sync/sda1]
  32443 ?        I      0:00 [kworker/7:1-xfs-conv/dm-0]
  32569 ?        I      0:00 [kworker/3:1-mm_percpu_wq]
  32570 ?        I<     0:00 [kworker/6:0H-ttm]
  32598 ?        I      0:00 [kworker/2:1-cgroup_pidlist_destroy]
  32634 ?        I      0:00 [kworker/0:3-cgroup_destroy]
  32824 ?        I      0:00 [kworker/2:2-cgroup_destroy]
  32840 ?        I      0:00 [kworker/5:0-ata_sff]
  32879 ?        I      0:00 [kworker/2:3-events_power_efficient]
  32880 ?        I<     0:00 [kworker/6:1H-ttm]
  32897 ?        I      0:00 [kworker/1:2-events_power_efficient]
  32934 ?        I      0:01 [kworker/5:1-ata_sff]
  32986 ?        I      0:00 [kworker/u16:1-events_unbound]
  33007 ?        I      0:00 [kworker/4:2-events]
  33026 ?        I      0:00 [kworker/0:2-cgroup_pidlist_destroy]
  33047 ?        I      0:00 [kworker/5:3-events]
  33063 ?        Ss     0:00 sshd: root [priv]
  33068 ?        Ss     0:00 /usr/lib/systemd/systemd --user
  33071 ?        S      0:00 (sd-pam)
  33076 ?        I      0:00 [kworker/4:1-cgroup_pidlist_destroy]
  33078 ?        S      0:00 sshd: root@pts/0
  33079 pts/0    Ss     0:00 -bash
  33107 ?        I<     0:00 [kworker/6:2H-ttm]
  33173 ?        I<     0:00 [kworker/6:3H-ttm]
  33201 ?        I<     0:00 [kworker/6:4H-ttm]
  33218 ?        I      0:00 [kworker/0:0-events]
  33222 ?        I      0:00 [kworker/2:0-events]
  33229 ?        Ssl    0:00 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf
  33235 ?        I      0:00 [kworker/6:1]
  33628 ?        I      0:00 [kworker/4:3-mm_percpu_wq]
  33656 ?        I<     0:00 [kworker/6:5H-ttm]
  33698 pts/0    R+     0:00 ps ax
Comment by MArk [ 2025 Jan 01 ]

As demonstrated on ZBX-25816, and discussed on the forum, I'm having the same issue.

I've tested on a Debian 12 and Ubuntu 24 system, and the Proxy works on them.

So, it seems that the problem may be related to the Fedora (RHEL) family.

Comment by Dmitrijs Goloscapovs (Inactive) [ 2025 Jan 02 ]

The rootcause of problem was an incorrect set of flags passed to sqlite when creating a database. A fix is on the way.

This issue is limited to db file creation. As a temporary workaround, the db file can be created manually (should be readable by zabbix user).

sqlite3 /var/lib/zabbix/proxy.db < /usr/share/zabbix/sql-scripts/sqlite3/proxy.sql

SELinux is not responsible for this.

Comment by Dmitrijs Goloscapovs (Inactive) [ 2025 Jan 02 ]

Available in:

Generated at Sun Jun 07 04:06:31 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.