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

PGRES_FATAL_ERROR with fresh installation (NGINX + PostgreSQL + TimescaleDB + Zabbix 7.0.X) into Zabbix Server logs

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.2, 7.0.3
    • None

      Good evening,

      I am experiencing difficulties while setting up a new Zabbix infrastructure as outlined in the environment section. I have followed the documentation provided:

      I applied the same procedure to two new Zabbix infrastructures (VMs or containers). For each test, I conducted two sub-tests:

      1. Using the public schema (default)
      2. Using the Zabbix schema (custom as per the documentation)

       

      Steps to Reproduce:

      1. Created a usr_owner and the database with that owner as described in the documentation.
      2. Configured a secure schema (only for the sub-test with zabbix schema); Please note the typo with the double quotes around “zabbix”. The correct command should be: ALTER ROLE ALL IN DATABASE zabbix SET search_path = "zabbix"; instead of ALTER ROLE ALL IN DATABASE zabbix SET search_path = "zabbix";
      3. Set up the database using schema.sqlimages.sql, and data.sql.
      4. Create a role and then a user with that role assigned for Zabbix Server communication with the database.
      5. Enable TimescaleDB using the command provided in the documentation:
        • One sub-test without the “WITH SCHEMA zabbix” substring when using the public schema.
        • The other sub-test including it since I used the "zabbix" schema.
      6. Use the script /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql to create hypertables and compression.
      7. Start the Zabbix Server service (Backend).
      8. Check for errors in the logs in zabbix_server.log

      Result: Please see the log file screenshot “zabbix-server-pgsql-public-schema.html”.

      Expected: No errors in the logs.

       

      Comments:

      It appears that the function zbx_ts_unix_now cannot be executed by a user belonging to the zbx_srv role as documented. More importantly, there seems to be an issue preventing that user from having permissions on the Zabbix schema, even though they actually do have them.

      Additionally, after reviewing the screenshot “zabbix-roles.jpg”, I suspect that the “zbx_srv” section might be incorrect. Without the CREATE permission on the schema (whether public or Zabbix), errors such as the following appear (please refer to the screenshot “zbx_ts_unix_now() error.jpg”):

      • PGRES_FATAL_ERROR: ERROR: permission denied for schema public (or zabbix)
      • [create or replace function zbx_ts_unix_now() returns integer language sql stable as select extract(epoch from now())::integer]
      • 826:20240905:130548.305 [Z3005] query failed: [0] PGRES_FATAL_ERROR: ERROR: function “zbx_ts_unix_now” does not exist

      I am also encountering drop_chunks errors as shown in the “drop_chunks error.jpg” screenshot, along with messages like “must be owner of hypertable history”.

      I am unsure how to resolve these issues, especially since this is a fresh and clean installation. Any assistance would be greatly appreciated

       

      Thank you very much.

      Best regards.

            tbross Tomass Janis Bross
            rockandstone Andrea Marconi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: