Ad Widget

Collapse

Zabbix-Proxy 5.0.30 on FreeBSD 12.2 won't connect to sqlite

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mircsicz
    Junior Member
    • Oct 2020
    • 10

    #1

    Zabbix-Proxy 5.0.30 on FreeBSD 12.2 won't connect to sqlite

    Hi all,

    I've one proxy setup in a FreeBSD jail (all my other proxys & the Server are on Debian). It worked like that for quite a while but a few days ago it broke...

    This is the Config:
    Code:
    Server=myserver.some.domain
    Hostname=mgr.some.client.lan
    LogFile=/var/log/zabbix/zabbix_proxy.log
    LogFileSize=0
    DebugLevel=5
    PidFile=/var/run/zabbix/zabbix_proxy.pid
    DBName=/usr/local/lib/sqlite/zabbix_proxy.db
    ProxyMode=0
    ConfigFrequency=120
    DataSenderFrequency=60
    HeartbeatFrequency=10
    TLSConnect=psk
    TLSAccept=psk
    TLSPSKFile=/usr/local/etc/zabbix4/zabbix-some-lan.psk
    TLSPSKIdentity=mgr.some.client.lan
    Timeout=4
    ExternalScripts=/usr/local/lib/zabbix4/externalscripts
    FpingLocation=/usr/local/sbin/fping
    Fping6Location=/usr/local/sbin/fping6
    LogSlowQueries=300​
    I'm using that config (except for FreeBSD paths) with half a dozen Debian based proxys

    And this is what the log spits at me:
    Code:
    37674:20230326:071132.855 Web monitoring: YES
    37674:20230326:071132.855 VMware monitoring: NO
    37674:20230326:071132.855 ODBC: YES
    37674:20230326:071132.855 SSH support: NO
    37674:20230326:071132.855 IPv6 support: YES
    37674:20230326:071132.855 TLS support: YES
    37674:20230326:071132.855 **************************
    37674:20230326:071132.855 using configuration file: /usr/local/etc/zabbix5/zabbix_proxy.conf
    37674:20230326:071132.855 In zbx_load_modules()
    37674:20230326:071132.855 End of zbx_load_modules():SUCCEED
    37674:20230326:071132.855 In init_database_cache()
    37674:20230326:071132.855 In zbx_mem_create() param:'HistoryCacheSize' size:16777216
    37674:20230326:071132.855 valid user addresses: [0x802200168, 0x8031ffff0] total size: 16776840
    37674:20230326:071132.855 End of zbx_mem_create()
    37674:20230326:071132.855 In zbx_mem_create() param:'HistoryIndexCacheSize' size:4194304
    37674:20230326:071132.856 valid user addresses: [0x803200178, 0x8035ffff0] total size: 4193912
    37674:20230326:071132.856 End of zbx_mem_create()
    37674:20230326:071132.856 End of init_database_cache()
    37674:20230326:071132.856 In init_configuration_cache() size:8388608
    37674:20230326:071132.856 In zbx_mem_create() param:'CacheSize' size:8388608
    37674:20230326:071132.856 valid user addresses: [0x803600168, 0x803dffff0] total size: 8388232
    37674:20230326:071132.856 End of zbx_mem_create()
    37674:20230326:071132.856 End of init_configuration_cache()
    37674:20230326:071132.856 In init_selfmon_collector()
    37674:20230326:071132.856 init_selfmon_collector() size:8560
    37674:20230326:071132.856 End of init_selfmon_collector() collector:0x801b3d000
    37674:20230326:071132.856 In zbx_db_get_database_type()
    37674:20230326:071132.856 In DBconnect() flag:0
    37674:20230326:071132.859 [Z3001] connection to database '/usr/local/lib/sqlite/zabbix_proxy.db' failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    37674:20230326:071132.860 database is down: reconnecting in 10 seconds​
    The file in that path is there and has a recent timestamp:
    mirco@mgr ~ $ sudo ls -alh /usr/local/lib/sqlite/zabbix_proxy.db
    -rw-r--r-- 1 zabbix wheel 4.2M Mar 21 2022 /usr/local/lib/sqlite/zabbix_proxy.db

    I've already double checked the ​docs about my DB Params but so far that seems to fine for sqlite... Is it possible that the FreeBSD Package changed it's builtin supported DB's in the past?
  • mircsicz
    Junior Member
    • Oct 2020
    • 10

    #2
    Reply to myself:

    Just checked the package built options:
    Code:
    mirco@mgr ~ $ pkg options zabbix5-proxy
    zabbix5-proxy - CURL: on
    zabbix5-proxy - FPING: on
    zabbix5-proxy - GNUTLS: off
    zabbix5-proxy - IPMI: off
    zabbix5-proxy - IPV6: on
    zabbix5-proxy - LDAP: off
    zabbix5-proxy - LIBXML2: off
    zabbix5-proxy - MYSQL: on
    zabbix5-proxy - NMAP: off
    zabbix5-proxy - OPENSSL: on
    zabbix5-proxy - ORACLE: off
    zabbix5-proxy - PGSQL: off
    zabbix5-proxy - SQLITE: off
    zabbix5-proxy - SSH: off
    zabbix5-proxy - UNIXODBC: on​
    Impossible that I get this to work... I'll have to look into building it from ports!

    Here's the fix:
    Code:
    portsnap fetch extract
    portsnap fetch update
    cd /usr/ports/net-mgmt/zabbix5-proxy
    make install clean
    Last edited by mircsicz; 27-03-2023, 04:04.

    Comment

    Working...