Included systemd servicefile contains undefined flag -T

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 6.0.46rc1
    • Component/s: Agent2 (G)
    • None

      Steps to reproduce:

      1.  

      After upgrading the client to 6.0.46 we started getting these errors:

      1. maj 05 09:35:43 new systemd[1]: Starting zabbix-agent2.service - Zabbix Agent 2...
        maj 05 09:35:43 new zabbix_agent2[85231]: failed to parse flags: flag provided but not defined: -T
        maj 05 09:35:43 new zabbix_agent2[85231]: Usage of Zabbix agent 2:
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 [-c config-file]
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 [-c config-file] [-v] -p
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 [-c config-file] [-v] -t item-key
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 [-c config-file] -R runtime-option
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 -h
        maj 05 09:35:43 new zabbix_agent2[85231]:   zabbix_agent2 -V
        maj 05 09:35:43 new systemd[1]: zabbix-agent2.service: Control process exited, code=exited, status=1/FAILURE
        maj 05 09:35:43 new systemd[1]: zabbix-agent2.service: Failed with result 'exit-code'.
        maj 05 09:35:43 new systemd[1]: Failed to start zabbix-agent2.service - Zabbix Agent 2.
      1.  

      Its caused by the ExecStartPre containing the  -T 

      [Unit]
      Description=Zabbix Agent 2
      After=syslog.target
      After=network.target
      [Service]
      Environment="CONFFILE=/etc/zabbix/zabbix_agent2.conf"
      EnvironmentFile=-/etc/default/zabbix-agent2
      Type=simple
      Restart=on-failure
      PIDFile=/run/zabbix/zabbix_agent2.pid
      KillMode=control-group
      ExecStartPre=/usr/sbin/zabbix_agent2 -T -c $CONFFILE
      ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE
      ExecStop=/bin/sh -c '[ -n "$1" ] && kill -s TERM "$1"' -- "$MAINPID"
      RestartSec=10s
      User=zabbix
      Group=zabbix
      LimitNOFILE=8192
      [Install]
      WantedBy=multi-user.target
      

       

      1. Navigate to screen title...
      2. Click on screen element...
      3. ...

      Result:
      See screenshot...
      See log file...
      See memory dump...
      Expected:
      See screenshot....
      See attached patch file...

            Assignee:
            Zabbix Support Team
            Reporter:
            Andreas Nilsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: