Greetings, do you know anything about this problem? I'm trying to get Zabbix Server up and running on OpenBSD and it's not working...
The error: # *tail -f /var/log/zabbix/server.log* [...] 22264:20241119:164643.272 using configuration file: /etc/zabbix/zabbix_server.conf 22264:20241119:164643.358 Cannot upgrade database: the database must correspond to version 2.0 or later. Exiting ... 22264:20241119:164643.358 Zabbix Server stopped. Zabbix 6.4.18 (revision f3bc25b1ce1). The System: # *uname -a* OpenBSD obsd.example.com 7.6 GENERIC.MP#338 amd64 The process: # *pkg_add postgresql-server* quirks-7.50 signed on 2024-11-09T19:35:46Z postgresql-server-16.4p0:icu4c-75.1p0v0: ok postgresql-server-16.4p0:libiconv-1.17: ok postgresql-server-16.4p0:xz-5.6.2: ok postgresql-server-16.4p0:libxml-2.13.3p0: ok postgresql-server-16.4p0:postgresql-client-16.4p0: ok useradd: Warning: home directory `/var/postgresql' doesn't exist, and -m was not specified postgresql-server-16.4p0: ok Running tags: ok The following new rcscripts were installed: /etc/rc.d/postgresql See rcctl(8) for details. New and changed readme(s): /usr/local/share/doc/pkg-readmes/postgresql-server # *mkdir /var/postgresql/data* # *chown _postgresql:_postgresql /var/postgresql/data* # *su - _postgresql* $ *initdb -D /var/postgresql/data -E UTF-8 --locale=en_US.UTF-8* The files belonging to this database system will be owned by user "_postgresql". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 20 selecting default shared_buffers ... 128MB selecting default time zone ... America/Bogota creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: rcctl start postgresql To start the PostgreSQL server automatically at boot: rcctl enable postgresql $ *exit* # *ee /etc/login.conf* [...] postgresql:\ :openfiles=102400:\ :tc=daemon: # *ee /etc/sysctl.conf* [...] # Zabbix kern.seminfo.semmni=30 kern.seminfo.semmns=120 kern.shminfo.shmall=524288 # *shutdown -r now* # *ee /var/postgresql/data/postgresql.conf* [...] listen_addresses = '*' #listen_addresses = 'localhost' # what IP address(es) to listen on; # *ee /var/postgresql/data/pg_hba.conf* [...] # IPv4 local connections: #host all all 127.0.0.1/32 trust host all all 127.0.0.1/32 md5 # IPv6 local connections: #host all all ::1/128 trust host all all ::1/128 md5 # *rcctl start postgresql* postgresql(ok) # *netstat -na -f inet | grep 5432* tcp 0 0 *.5432 *.* LISTEN # *netstat -na -f inet6 | grep 5432* tcp6 0 0 *.5432 *.* LISTEN # *psql -U _postgresql template1* psql (16.4) Type "help" for help. *CREATE USER zabbix PASSWORD 'StRoNgPaSsWoRd';* CREATE ROLE *CREATE DATABASE zabbix ENCODING 'UTF8' TEMPLATE template1 owner zabbix;* CREATE DATABASE template1=# *\q* # *rcctl enable postgresql* # *pkg_add zabbix-server-6.4.18p0-pgsql* quirks-7.50 signed on 2024-11-15T09:43:11Z zabbix-server-6.4.18p0-pgsql:libevent-2.1.12p1: ok zabbix-server-6.4.18p0-pgsql:libssh2-1.11.0: ok zabbix-server-6.4.18p0-pgsql:fping-5.2: ok zabbix-server-6.4.18p0-pgsql:net-snmp-5.9.4: ok zabbix-server-6.4.18p0-pgsql: ok The following new rcscripts were installed: /etc/rc.d/netsnmpd /etc/rc.d/netsnmptrapd /etc/rc.d/zabbix_server See rcctl(8) for details. New and changed readme(s): /usr/local/share/doc/pkg-readmes/zabbix-server # *ee /etc/login.conf* [...] zabbix_server:\ :openfiles-cur=102400:\ :openfiles-max=204800:\ :tc=daemon: # *ls /usr/local/share/zabbix-server/schema/postgresql* data.sql images.sql option-patches schema.sql timescaledb https://www.zabbix.com/documentation/current/en/manual/appendix/install/db_scripts # *su - _postgresql* $ *psql zabbix < /usr/local/share/zabbix-server/schema/postgresql/schema.sql* [...] ALTER TABLE ALTER TABLE ALTER TABLE $ *psql zabbix < /usr/local/share/zabbix-server/schema/postgresql/images.sql* [...] INSERT 0 1 INSERT 0 1 INSERT 0 1 $ *psql zabbix < /usr/local/share/zabbix-server/schema/postgresql/data.sql* [...] INSERT 0 1 INSERT 0 1 INSERT 0 1 DELETE 99818 COMMIT $ *psql zabbix* psql (16.4) Type "help" for help. zabbix=# *ALTER TABLE users OWNER TO zabbix;* ALTER TABLE *\q* $ *exit* # *psql -h localhost -p 5432 -U zabbix zabbix* Password for user zabbix: *StRoNgPaSsWoRd* psql (16.4) Type "help" for help. zabbix=> *\q* # *grep -Ev ^'(#|$)' /etc/zabbix/zabbix_server.conf* LogFile=/var/log/zabbix/server.log DBHost= DBName=zabbix DBUser=zabbix DBPassword=StRoNgPaSsWoRd DBSocket=/var/www/var/run/mysql/mysql.sock Timeout=4 AlertScriptsPath=/etc/zabbix/alertscripts/ FpingLocation=/usr/local/sbin/fping Fping6Location=/usr/local/sbin/fping6 LogSlowQueries=3000 StatsAllowedIP=127.0.0.1 # *rcctl enable zabbix_server* # *rcctl start zabbix_server* zabbix_server(ok) # *tail -f /var/log/zabbix/server.log* 88219:20241119:150837.786 Starting Zabbix Server. Zabbix 6.4.18 (revision f3bc25b1ce1). 88219:20241119:150837.787 ****** Enabled features ****** 88219:20241119:150837.788 SNMP monitoring: YES 88219:20241119:150837.788 IPMI monitoring: NO 88219:20241119:150837.788 Web monitoring: YES 88219:20241119:150837.788 VMware monitoring: YES 88219:20241119:150837.788 SMTP authentication: YES 88219:20241119:150837.788 ODBC: NO 88219:20241119:150837.789 SSH support: YES 88219:20241119:150837.790 IPv6 support: YES 88219:20241119:150837.790 TLS support: YES 88219:20241119:150837.790 ****************************** 88219:20241119:150837.791 using configuration file: /etc/zabbix/zabbix_server.conf 88219:20241119:150838.014 Cannot upgrade database: the database must correspond to version 2.0 or later. Exiting ... 88219:20241119:150838.014 Zabbix Server stopped. Zabbix 6.4.18 (revision f3bc25b1ce1). Thanks for your attention and any help! -- M. Ángel Villa G. US +1 (786) 233-9240 | CO +57 (300) 283-6546 ange...@gmail.com https://angelcontents.blogspot.com "We are all atheists about most of the gods that societies have ever believed in. Some of us just go one god further" - Richard Dawkins