Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24759

zabbix-proxy-sqlite3 doesn't auto create DB

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • None
    • 6.4.16
    • Proxy (P)
    • None
    • Raspberry Pi
      VERSION="11 (bullseye)"
      zabbix-proxy-sqlite3 6.4.16

      After upgrade to 6.4.16 proxy can no longer auto create sqlite3 DB:

       9188:20240701:204911.180 Starting Zabbix Proxy (active) [pumpura_avene]. Zabbix 6.4.16 (revision 0bc8c627cc0).
        9188:20240701:204911.180 **** Enabled features ****
        9188:20240701:204911.180 SNMP monitoring:       YES
        9188:20240701:204911.180 IPMI monitoring:       YES
        9188:20240701:204911.180 Web monitoring:        YES
        9188:20240701:204911.180 VMware monitoring:     YES
        9188:20240701:204911.180 ODBC:                  YES
        9188:20240701:204911.180 SSH support:           YES
        9188:20240701:204911.180 IPv6 support:          YES
        9188:20240701:204911.180 TLS support:           YES
        9188:20240701:204911.180 **************************
        9188:20240701:204911.180 using configuration file: /etc/zabbix/zabbix_proxy.conf
        9188:20240701:204911.180 In zbx_load_modules()
        9188:20240701:204911.180 End of zbx_load_modules():SUCCEED
        9188:20240701:204911.180 In zbx_ipc_service_start() service:rtc
        9188:20240701:204911.180 In zbx_ipc_socket_open()
        9188:20240701:204911.180 End of zbx_ipc_socket_open():FAIL
        9188:20240701:204911.180 End of zbx_ipc_service_start():SUCCEED
        9188:20240701:204911.181 In init_database_cache()
        9188:20240701:204911.181 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
        9188:20240701:204911.181 valid user addresses: [0xf35f50e0, 0xf45f4ff0] total size: 16776976
        9188:20240701:204911.181 End of zbx_shmem_create()
        9188:20240701:204911.181 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
        9188:20240701:204911.181 valid user addresses: [0xf31f50f0, 0xf35f4ff0] total size: 4194048
        9188:20240701:204911.181 End of zbx_shmem_create()
        9188:20240701:204911.181 End of init_database_cache()
        9188:20240701:204911.181 In init_configuration_cache() size:8388608
        9188:20240701:204911.181 In zbx_shmem_create() param:'CacheSize' size:8388608
        9188:20240701:204911.181 valid user addresses: [0xf29f50e0, 0xf31f4ff0] total size: 8388368
        9188:20240701:204911.181 End of zbx_shmem_create()
        9188:20240701:204911.181 End of init_configuration_cache()
        9188:20240701:204911.181 In zbx_init_selfmon_collector()
        9188:20240701:204911.181 zbx_init_selfmon_collector() size:26704
        9188:20240701:204911.181 In zbx_shmem_create() param:'(null)' size:26944
        9188:20240701:204911.182 valid user addresses: [0xf7b460e0, 0xf7b4c930] total size: 26704
        9188:20240701:204911.182 End of zbx_shmem_create()
        9188:20240701:204911.182 End of zbx_init_selfmon_collector() collector.monitor:0xf7b460e0
        9188:20240701:204911.182 In zbx_db_connect() flag:0
        9188:20240701:204911.182 query without transaction detected
        9188:20240701:204911.182 query [txnlev:0] [pragma synchronous=0]
        9188:20240701:204911.183 query without transaction detected
        9188:20240701:204911.183 query [txnlev:0] [pragma foreign_keys=on]
        9188:20240701:204911.183 query without transaction detected
        9188:20240701:204911.183 query [txnlev:0] [pragma temp_store=2]
        9188:20240701:204911.183 query without transaction detected
        9188:20240701:204911.183 query [txnlev:0] [pragma temp_store_directory='/ramdrive/']
        9188:20240701:204911.183 End of zbx_db_connect():0
        9188:20240701:204911.183 In zbx_db_get_database_type()
        9188:20240701:204911.183 query [txnlev:0] [select userid from users limit 1]
        9188:20240701:204911.183 [Z3005] query failed: [0] no such table: users [select userid from users limit 1]
        9188:20240701:204911.183 cannot select records from "users" table
        9188:20240701:204911.183 End of zbx_db_get_database_type():ZBX_DB_UNKNOWN
        9188:20240701:204911.183 cannot use database "/ramdrive/zabbix_proxy.sqlite": database is not a Zabbix database
      root@pumpuraavene:~# rm /ramdrive/zabbix_proxy.sqlite
      root@pumpuraavene:~# zabbix_proxy -f
      Starting Zabbix Proxy (active) [pumpura_avene]. Zabbix 6.4.16 (revision 0bc8c627cc0).
      Press Ctrl+C to exit.
      
        9194:20240701:204923.530 Starting Zabbix Proxy (active) [pumpura_avene]. Zabbix 6.4.16 (revision 0bc8c627cc0).
        9194:20240701:204923.531 **** Enabled features ****
        9194:20240701:204923.531 SNMP monitoring:       YES
        9194:20240701:204923.531 IPMI monitoring:       YES
        9194:20240701:204923.531 Web monitoring:        YES
        9194:20240701:204923.531 VMware monitoring:     YES
        9194:20240701:204923.531 ODBC:                  YES
        9194:20240701:204923.531 SSH support:           YES
        9194:20240701:204923.532 IPv6 support:          YES
        9194:20240701:204923.532 TLS support:           YES
        9194:20240701:204923.532 **************************
        9194:20240701:204923.532 using configuration file: /etc/zabbix/zabbix_proxy.conf
        9194:20240701:204923.532 In zbx_load_modules()
        9194:20240701:204923.532 End of zbx_load_modules():SUCCEED
        9194:20240701:204923.532 In zbx_ipc_service_start() service:rtc
        9194:20240701:204923.532 In zbx_ipc_socket_open()
        9194:20240701:204923.533 End of zbx_ipc_socket_open():FAIL
        9194:20240701:204923.533 End of zbx_ipc_service_start():SUCCEED
        9194:20240701:204923.533 In init_database_cache()
        9194:20240701:204923.533 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
        9194:20240701:204923.534 valid user addresses: [0xf35c80e0, 0xf45c7ff0] total size: 16776976
        9194:20240701:204923.534 End of zbx_shmem_create()
        9194:20240701:204923.534 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
        9194:20240701:204923.534 valid user addresses: [0xf31c80f0, 0xf35c7ff0] total size: 4194048
        9194:20240701:204923.534 End of zbx_shmem_create()
        9194:20240701:204923.534 End of init_database_cache()
        9194:20240701:204923.534 In init_configuration_cache() size:8388608
        9194:20240701:204923.535 In zbx_shmem_create() param:'CacheSize' size:8388608
        9194:20240701:204923.535 valid user addresses: [0xf29c80e0, 0xf31c7ff0] total size: 8388368
        9194:20240701:204923.535 End of zbx_shmem_create()
        9194:20240701:204923.535 End of init_configuration_cache()
        9194:20240701:204923.536 In zbx_init_selfmon_collector()
        9194:20240701:204923.536 zbx_init_selfmon_collector() size:26704
        9194:20240701:204923.536 In zbx_shmem_create() param:'(null)' size:26944
        9194:20240701:204923.536 valid user addresses: [0xf7b190e0, 0xf7b1f930] total size: 26704
        9194:20240701:204923.536 End of zbx_shmem_create()
        9194:20240701:204923.536 End of zbx_init_selfmon_collector() collector.monitor:0xf7b190e0
        9194:20240701:204923.536 In zbx_db_connect() flag:0
        9194:20240701:204923.537 query without transaction detected
        9194:20240701:204923.537 query [txnlev:0] [pragma synchronous=0]
        9194:20240701:204923.538 query without transaction detected
        9194:20240701:204923.539 query [txnlev:0] [pragma foreign_keys=on]
        9194:20240701:204923.539 query without transaction detected
        9194:20240701:204923.539 query [txnlev:0] [pragma temp_store=2]
        9194:20240701:204923.539 query without transaction detected
        9194:20240701:204923.539 query [txnlev:0] [pragma temp_store_directory='/ramdrive/']
        9194:20240701:204923.539 End of zbx_db_connect():0
        9194:20240701:204923.539 In zbx_db_get_database_type()
        9194:20240701:204923.539 query [txnlev:0] [select userid from users limit 1]
        9194:20240701:204923.540 [Z3005] query failed: [0] no such table: users [select userid from users limit 1]
        9194:20240701:204923.540 cannot select records from "users" table
        9194:20240701:204923.540 End of zbx_db_get_database_type():ZBX_DB_UNKNOWN
        9194:20240701:204923.540 cannot use database "/ramdrive/zabbix_proxy.sqlite": database is not a Zabbix database
      root@pumpuraavene:~# ls -lah /ramdrive/zabbix_proxy.sqlite
      -rw-r--r-- 1 zabbix zabbix 0 Jul  1 20:49 /ramdrive/zabbix_proxy.sqlite
      

      As can be seen, the DB file is create with size 0.
      After downgrading back to 6.4.15 it initially fails with the same error, but after the file is deleted is successfully creates a new one and starts:

      root@pumpuraavene:~# rm /ramdrive/zabbix_proxy.sqlite
      root@pumpuraavene:~# zabbix_proxy -f
      Starting Zabbix Proxy (active) [pumpura_avene]. Zabbix 6.4.15 (revision 09711f1760b).
      Press Ctrl+C to exit.
      
        9410:20240701:205405.121 Starting Zabbix Proxy (active) [pumpura_avene]. Zabbix 6.4.15 (revision 09711f1760b).
        9410:20240701:205405.121 **** Enabled features ****
        9410:20240701:205405.121 SNMP monitoring:       YES
        9410:20240701:205405.121 IPMI monitoring:       YES
        9410:20240701:205405.121 Web monitoring:        YES
        9410:20240701:205405.121 VMware monitoring:     YES
        9410:20240701:205405.121 ODBC:                  YES
        9410:20240701:205405.121 SSH support:           YES
        9410:20240701:205405.121 IPv6 support:          YES
        9410:20240701:205405.121 TLS support:           YES
        9410:20240701:205405.121 **************************
        9410:20240701:205405.121 using configuration file: /etc/zabbix/zabbix_proxy.conf
        9410:20240701:205405.121 In zbx_load_modules()
        9410:20240701:205405.122 End of zbx_load_modules():SUCCEED
        9410:20240701:205405.122 In zbx_ipc_service_start() service:rtc
        9410:20240701:205405.122 In zbx_ipc_socket_open()
        9410:20240701:205405.122 End of zbx_ipc_socket_open():FAIL
        9410:20240701:205405.122 End of zbx_ipc_service_start():SUCCEED
        9410:20240701:205405.122 In init_database_cache()
        9410:20240701:205405.122 In zbx_shmem_create() param:'HistoryCacheSize' size:16777216
        9410:20240701:205405.122 valid user addresses: [0xf36000e0, 0xf45ffff0] total size: 16776976
        9410:20240701:205405.122 End of zbx_shmem_create()
        9410:20240701:205405.122 In zbx_shmem_create() param:'HistoryIndexCacheSize' size:4194304
        9410:20240701:205405.122 valid user addresses: [0xf32000f0, 0xf35ffff0] total size: 4194048
        9410:20240701:205405.122 End of zbx_shmem_create()
        9410:20240701:205405.122 End of init_database_cache()
        9410:20240701:205405.122 In init_configuration_cache() size:8388608
        9410:20240701:205405.122 In zbx_shmem_create() param:'CacheSize' size:8388608
        9410:20240701:205405.123 valid user addresses: [0xf2a000e0, 0xf31ffff0] total size: 8388368
        9410:20240701:205405.123 End of zbx_shmem_create()
        9410:20240701:205405.123 End of init_configuration_cache()
        9410:20240701:205405.123 In zbx_init_selfmon_collector()
        9410:20240701:205405.123 zbx_init_selfmon_collector() size:26704
        9410:20240701:205405.123 In zbx_shmem_create() param:'(null)' size:26944
        9410:20240701:205405.123 valid user addresses: [0xf7b510e0, 0xf7b57930] total size: 26704
        9410:20240701:205405.123 End of zbx_shmem_create()
        9410:20240701:205405.123 End of zbx_init_selfmon_collector() collector.monitor:0xf7b510e0
        9410:20240701:205405.123 cannot open database file "/ramdrive/zabbix_proxy.sqlite": [2] No such file or directory
        9410:20240701:205405.123 creating database ...
        9410:20240701:205405.125 query without transaction detected
        9410:20240701:205405.125 query [txnlev:0] [CREATE TABLE role (
      roleid bigint  NOT NULL,
      name varchar(255) DEFAULT '' NOT NULL,
      type integer DEFAULT '0' NOT NULL,
      readonly integer DEFAULT '0' NOT NULL,
      PRIMARY KEY (roleid)
      );
      

            zabbix.dev Zabbix Development Team
            zux Edgars Melveris
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: