ExportXMLWordPrintable

    • Sprint candidates
    • 1

      Environment

      • Zabbix 8.0.0 (revision "c81e276"), official images:
        • "zabbix/zabbix-proxy-sqlite3:alpine-8.0.0", digest "sha256:7be029140ccdb35da8cdd64e1f0156d93d85b59e7980232454f12d3199122800"
        • "zabbix/zabbix-server-pgsql:alpine-8.0.0", digest "sha256:27a82a0d504e63943697bdccc964e0a8270d7c0176f4f922161bd482eec5b95c"

      Steps to reproduce

      1. Run proxy with "DebugLevel=4" and read its exit code (block 1).
      2. Start PostgreSQL and run server once with "DebugLevel=3" to create schema. Block 2 waits until server log shows "server #0 started [main process]" and then removes this container.
      3. Run server with "DebugLevel=4" and read its exit code (block 3).
      4. Run the same proxy and server with "ubuntu-8.0.0" images in background, wait 30 seconds and check their status (block 4).
      5. Optional: run proxy with "DebugLevel=3" and "LogSlowQueries=1" (block 5). This path is used only when a statement takes more than 1 ms, so result can depend on hardware.

      1. Proxy, DebugLevel=4

      docker run --name prx-dl4 -e ZBX_SERVER_HOST=127.0.0.1 -e ZBX_HOSTNAME=T-repro-proxy -e ZBX_DEBUGLEVEL=4 zabbix/zabbix-proxy-sqlite3:alpine-8.0.0
      docker inspect -f 'exit code: {{.State.ExitCode}}' prx-dl4
      

      2. PostgreSQL and server schema

      docker network create zbx
      docker run -d --name pg --network zbx -e POSTGRES_USER=zabbix -e POSTGRES_PASSWORD=zabbix -e POSTGRES_DB=zabbix postgres:16-alpine
      until docker exec pg pg_isready -h 127.0.0.1 -U zabbix -d zabbix >/dev/null 2>&1; do sleep 1; done
      docker run -d --name srv-init --network zbx -e DB_SERVER_HOST=pg -e POSTGRES_USER=zabbix -e POSTGRES_PASSWORD=zabbix -e POSTGRES_DB=zabbix -e ZBX_DEBUGLEVEL=3 zabbix/zabbix-server-pgsql:alpine-8.0.0
      timeout 180 bash -c '
      until docker logs srv-init 2>&1 | grep -Fq "server #0 started [main process]"; do
        [ "$(docker inspect -f "{{.State.Running}}" srv-init)" = true ] || exit 1
        sleep 1
      done
      ' && docker rm -f srv-init
      

      3. Server, DebugLevel=4

      docker run --name srv-dl4 --network zbx -e DB_SERVER_HOST=pg -e POSTGRES_USER=zabbix -e POSTGRES_PASSWORD=zabbix -e POSTGRES_DB=zabbix -e ZBX_DEBUGLEVEL=4 zabbix/zabbix-server-pgsql:alpine-8.0.0
      docker inspect -f 'exit code: {{.State.ExitCode}}' srv-dl4
      

      4. Ubuntu images, DebugLevel=4

      docker run -d --name prx-dl4-ubuntu -e ZBX_SERVER_HOST=127.0.0.1 -e ZBX_HOSTNAME=T-repro-proxy -e ZBX_DEBUGLEVEL=4 zabbix/zabbix-proxy-sqlite3:ubuntu-8.0.0
      docker run -d --name srv-dl4-ubuntu --network zbx -e DB_SERVER_HOST=pg -e POSTGRES_USER=zabbix -e POSTGRES_PASSWORD=zabbix -e POSTGRES_DB=zabbix -e ZBX_DEBUGLEVEL=4 zabbix/zabbix-server-pgsql:ubuntu-8.0.0
      sleep 30
      docker inspect -f '{{.Name}} {{.State.Status}}' prx-dl4-ubuntu srv-dl4-ubuntu
      

      5. Optional: proxy, DebugLevel=3 and LogSlowQueries=1

      docker run -d --name prx-slow -e ZBX_SERVER_HOST=127.0.0.1 -e ZBX_HOSTNAME=T-repro-proxy -e ZBX_DEBUGLEVEL=3 -e ZBX_LOGSLOWQUERIES=1 zabbix/zabbix-proxy-sqlite3:alpine-8.0.0
      sleep 30
      docker inspect -f '{{.State.Status}} exit code: {{.State.ExitCode}}' prx-slow
      

      Result

      Proxy with "DebugLevel=4" stops about 1 s after start:

      exit code: 0
      

      Log of "supervisor #1" ends when "configuration syncer #1" opens database connection. Main process then cannot reach supervisor and stops proxy:

          16:20261108:153123.686 [configuration syncer #1] starting initial configuration cache synchronization
          16:20261108:153123.686 [configuration syncer #1] In dbconn_open_retry() options:0
           1:20261108:153123.860 failed to wait for the runlevel 1: Cannot receive response
           1:20261108:153123.861 cannot send RTC notification to service "supervisor" #0: Cannot connect to service "supervisor": [111] Connection refused.
           1:20261108:153123.861 zbx_on_exit() called with ret:-1
           1:20261108:153123.874 Zabbix Proxy stopped. Zabbix 8.0.0 (revision c81e276).
      

      This log has no line about crashed process or signal.

      Server with "DebugLevel=4" also stops about 1 s after start with exit code 0. Its last "configuration syncer #1" line is the same:

          17:20261108:163751.562 [configuration syncer #1] In dbconn_open_retry() options:0
      
      Check Result
      proxy SQLite Alpine, "DebugLevel=4" (3 runs) and "DebugLevel=5" (1 run) exited about 1 s after start, exit code 0
      server PostgreSQL Alpine, "DebugLevel=4" (2 runs) exited about 1 s after start, exit code 0
      proxy SQLite Alpine, "DebugLevel=4", "--restart on-failure:3" exited, exit code 0, "RestartCount" 0
      proxy SQLite Alpine, "DebugLevel=3" (2 runs) running after 30 s
      server PostgreSQL Alpine, "DebugLevel=3" running after 30 s
      proxy SQLite Ubuntu, "DebugLevel=4" (2 runs) running after 30 s
      server PostgreSQL Ubuntu, "DebugLevel=4" running after 30 s
      proxy MySQL Alpine with "mysql:8.4", "DebugLevel=4" (2 runs) running after 180 s
      proxy SQLite Alpine, "DebugLevel=3", "LogSlowQueries=1" (3 runs) exited 1 to 6 s after start, exit code 0
      proxy SQLite Ubuntu, "DebugLevel=3", "LogSlowQueries=1" (1 run) running after 30 s

      Expected

      Server and proxy keep running with "DebugLevel=4", as Ubuntu images do. Value 4 of "DebugLevel" is allowed: conf/zabbix_proxy.conf describes it as "for debugging (produces lots of information)".

      Scope: server and proxy 8.0 built for musl libc without "--with-stacksize", including official "alpine-8.0.0" images. Reproduced with proxy SQLite and server PostgreSQL. Proxy MySQL with MySQL 8.4 does not stop at startup.

            Assignee:
            Zabbix Development Team
            Reporter:
            Piotr Wegrzyn
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: