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

ZBX_SERVER_PORT not respected for zabbix-proxy docker container

    XMLWordPrintable

Details

    • Incident report
    • Status: Confirmed
    • Minor
    • Resolution: Unresolved
    • 6.0.4
    • None
    • Documentation (D)
    • None

    Description

      The docker comand:

      docker run --name z60prx -t \
      -e ZBX_HOSTNAME="z60prx" \
      -e ZBX_SERVER_HOST="zbx.contoso.lan" \
      -e ZBX_SERVER_PORT="16051" \
      -d zabbix/zabbix-proxy-sqlite3:ol-6.0.4 

      Logs:

      # docker logs z60prx
      Preparing Zabbix proxy
      ** Preparing Zabbix proxy configuration file
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ProxyMode": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "Server": 'zbx.contoso.lan'...updated
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ServerPort": '16051'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "Hostname": 'z60prx'...updated
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "HostnameItem": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ListenIP": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ListenPort": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ListenBacklog": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SourceIP": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LogType": 'console'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LogFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LogFileSize": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "PidFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DebugLevel": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "EnableRemoteCommands": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LogRemoteCommands": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DBHost": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DBName": '/var/lib/zabbix/db_data/z60prx.sqlite'...updated
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DBUser": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DBPort": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DBPassword": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VaultDBPath": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VaultURL": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ProxyLocalBuffer": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ProxyOfflineBuffer": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "HeartbeatFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ConfigFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "DataSenderFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StatsAllowedIP": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartPreprocessors": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartIPMIPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartPollersUnreachable": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartTrappers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartPingers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartDiscoverers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartHistoryPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartHTTPPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartODBCPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "JavaGateway": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "JavaGatewayPort": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartJavaPollers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartVMwareCollectors": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VMwareFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VMwarePerfFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VMwareCacheSize": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "VMwareTimeout": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SNMPTrapperFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartSNMPTrapper": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "HousekeepingFrequency": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "CacheSize": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "StartDBSyncers": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "HistoryCacheSize": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "HistoryIndexCacheSize": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "Timeout": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TrapperTimeout": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "UnreachablePeriod": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "UnavailableDelay": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "UnreachableDelay": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "AlertScriptsPath": '/usr/lib/zabbix/alertscripts'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "ExternalScripts": '/usr/lib/zabbix/externalscripts'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "FpingLocation": '/usr/sbin/fping'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "Fping6Location": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SSHKeyLocation": '/var/lib/zabbix/ssh_keys'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LogSlowQueries": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SSLCertLocation": '/var/lib/zabbix/ssl/certs/'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SSLKeyLocation": '/var/lib/zabbix/ssl/keys/'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "SSLCALocation": '/var/lib/zabbix/ssl/ssl_ca/'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "LoadModulePath": '/var/lib/zabbix/modules/'...added
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSConnect": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSAccept": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCAFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCRLFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSServerCertIssuer": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSServerCertSubject": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCertFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherAll": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherAll13": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherCert": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherCert13": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherPSK": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSCipherPSK13": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSKeyFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSPSKIdentity": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "TLSPSKFile": ''...removed
      ** Updating '/etc/zabbix/zabbix_proxy.conf' parameter "User": 'zabbix'...added
      Starting Zabbix Proxy (active) [z60prx]. Zabbix 6.0.4 (revision 3d787ff).
      Press Ctrl+C to exit.     7:20220503:195325.837 Starting Zabbix Proxy (active) [z60prx]. Zabbix 6.0.4 (revision 3d787ff).
           7:20220503:195325.840 **** Enabled features ****
           7:20220503:195325.842 SNMP monitoring:       YES
           7:20220503:195325.844 IPMI monitoring:       YES
           7:20220503:195325.846 Web monitoring:        YES
           7:20220503:195325.849 VMware monitoring:     YES
           7:20220503:195325.851 ODBC:                  YES
           7:20220503:195325.853 SSH support:           YES
           7:20220503:195325.855 IPv6 support:          YES
           7:20220503:195325.856 TLS support:           YES
           7:20220503:195325.857 **************************
           7:20220503:195325.857 using configuration file: /etc/zabbix/zabbix_proxy.conf
           7:20220503:195325.860 cannot open database file "/var/lib/zabbix/db_data/z60prx.sqlite": [2] No such file or directory
           7:20220503:195325.864 creating database ...
           7:20220503:195335.116 current database version (mandatory/optional): 06000000/06000000
           7:20220503:195335.120 required mandatory version: 06000000
           7:20220503:195335.129 proxy #0 started [main process]
         149:20220503:195335.134 proxy #1 started [configuration syncer #1]
         153:20220503:195335.244 proxy #5 started [trapper #4]
         152:20220503:195335.250 proxy #4 started [trapper #3]
         151:20220503:195335.258 proxy #3 started [trapper #2]
         154:20220503:195335.270 proxy #6 started [trapper #5]
         150:20220503:195335.274 proxy #2 started [trapper #1]
         155:20220503:195335.293 proxy #7 started [preprocessing manager #1]
         156:20220503:195335.314 proxy #8 started [preprocessing worker #1]
         157:20220503:195335.324 proxy #9 started [preprocessing worker #2]
         158:20220503:195335.353 proxy #10 started [preprocessing worker #3]
         159:20220503:195335.371 proxy #11 started [heartbeat sender #1]
         149:20220503:195335.374 Unable to connect to [zbx.contoso.lan]:10051 [cannot connect to [[zbx.contoso.lan]:10051]: [111] Connection refused]
         149:20220503:195335.376 Will try to reconnect every 120 second(s)
         160:20220503:195335.400 proxy #12 started [data sender #1]
         161:20220503:195335.444 proxy #13 started [housekeeper #1]
         162:20220503:195335.461 proxy #14 started [http poller #1]
         163:20220503:195335.480 proxy #15 started [discoverer #1]
         164:20220503:195335.512 proxy #16 started [history syncer #1]
         165:20220503:195335.544 proxy #17 started [history syncer #2]
         166:20220503:195335.553 proxy #18 started [history syncer #3]
         167:20220503:195335.588 proxy #19 started [history syncer #4]
         169:20220503:195335.613 proxy #21 started [task manager #1]
         168:20220503:195335.623 proxy #20 started [self-monitoring #1]
         170:20220503:195335.640 proxy #22 started [poller #1]
         172:20220503:195335.664 proxy #24 started [poller #3]
         171:20220503:195335.682 proxy #23 started [poller #2]
         173:20220503:195335.693 proxy #25 started [poller #4]
         174:20220503:195335.728 proxy #26 started [poller #5]
         175:20220503:195335.752 proxy #27 started [unreachable poller #1]
         176:20220503:195335.804 proxy #28 started [icmp pinger #1]
         177:20220503:195335.817 proxy #29 started [history poller #1]
         178:20220503:195335.856 proxy #30 started [availability manager #1]
         179:20220503:195335.901 proxy #31 started [odbc poller #1]
         160:20220503:195336.651 Unable to connect to [zbx.contoso.lan]:10051 [cannot connect to [[zbx.contoso.lan]:10051]: [111] Connection refused]
         160:20220503:195336.655 Will try to reconnect every 1 second(s) 

      env:

      # docker exec -it z60prx env
      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      HOSTNAME=c3a1bfb919a2
      TERM=xterm
      ZBX_HOSTNAME=z60prx
      ZBX_SERVER_HOST=zbx.contoso.lan
      ZBX_SERVER_PORT=16051
      ZBX_VERSION=6.0.4
      ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
      MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs
      MIBS=+ALL
      HOME=/var/lib/zabbix/ 

      Inside container:

      grep -v "^#" /etc/zabbix/zabbix_proxy.conf | sort
      DBName=/var/lib/zabbix/db_data/z60prx.sqlite
      ExternalScripts=/usr/lib/zabbix/externalscripts
      FpingLocation=/usr/sbin/fping
      Hostname=z60prx
      LoadModulePath=/var/lib/zabbix/modules/
      LogType=console
      SSHKeyLocation=/var/lib/zabbix/ssh_keys
      SSLCALocation=/var/lib/zabbix/ssl/ssl_ca/
      SSLCertLocation=/var/lib/zabbix/ssl/certs/
      SSLKeyLocation=/var/lib/zabbix/ssl/keys/
      Server=zbx.contoso.lan
      User=zabbix 

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            aigars.kadikis Aigars Kadikis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: