Ad Widget

Collapse

Installation problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guizaro
    Junior Member
    • Jul 2019
    • 3

    #1

    Installation problem

    Hello,

    I have a problem during installation of Zabbix Agent on windows OS (As a service).
    Indeed, there was a previous installation of zabbix agent on some post with an old agent.conf.
    I installed a new zabbix server on Debian 9 because we changed the zabbix server.

    I first tried to simply change the agentd.conf with the new IP address (The new server address) and try to restart agent service : Windows Error 1053.
    I tried to properly uninstall zabbix agent with this batch :

    cd %programfiles%\Zabbix Agent\
    zabbix_agentd.exe --config zabbix_agentd.conf --stop
    zabbix_agentd.exe --config zabbix_agentd.conf --uninstall
    del /s "zabbix_agentd.conf" /q
    copy \\srv-quadra-s\Reptransfert\zabbix_agentd.conf zabbix_agentd.conf
    zabbix_agentd.exe --config zabbix_agentd.conf --install
    zabbix_agentd.exe --config zabbix_agentd.conf --start

    Same error : 1053.
    With command line zabbix_agentd.exe --config zabbix_agentd.conf --uninstall, it seems that something not uninstalled in the system.

    Secondly, I thought about manually deleting "zabbix Agent" Folder with this batch:

    cd %programfiles%\Zabbix Agent\
    zabbix_agentd.exe --config zabbix_agentd.conf --uninstall
    cd ..
    del /s "Zabbix Agent" /q
    rmdir "Zabbix Agent/zabbix_agentd.conf.d"
    rmdir "Zabbix Agent"
    cd C:\
    copy \\xxxxxxx\zabbix_agent-4.2.3-win-amd64-openssl.msi zabbix_agent-4.2.3-win-amd64-openssl.msi
    msiexec /l*v log.txt /i zabbix_agent-4.2.3-win-amd64-openssl.msi Server=192.168.16.61 ServerActive=192.168.16.61:10051 /qn
    del zabbix_agent-4.2.3-win-amd64-openssl.msi

    New problem, the msi don't install anything, it seems that something not uninstalled in the system again...
    To verify, I tried to install agent with msi file manually and it don't ask me to install zabbix agent but he detect something on the system and i have a menu to "Change" features and "Remove" Zabbix Agent...

    Nothing in appdata local and appdata roaming. Maybe in registry key ?

    Thanks for helping.
  • AmandC
    Junior Member
    • Jul 2019
    • 2

    #2
    Originally posted by Guizaro
    Hello,

    I have a problem during installation of Zabbix Agent on windows OS (As a service).
    Indeed, there was a previous installation of zabbix agent on some post with an old agent.conf.
    I installed a new zabbix server on Debian 9 because we changed the zabbix server.

    I first tried to simply change the agentd.conf with the new IP address (The new server address) and try to restart agent service : Windows Error 1053.
    I tried to properly uninstall zabbix agent with this batch :

    cd %programfiles%\Zabbix Agent\
    zabbix_agentd.exe --config zabbix_agentd.conf --stop
    zabbix_agentd.exe --config zabbix_agentd.conf --uninstall
    del /s "zabbix_agentd.conf" /q
    copy \\srv-quadra-s\Reptransfert\zabbix_agentd.conf zabbix_agentd.conf
    zabbix_agentd.exe --config zabbix_agentd.conf --install
    zabbix_agentd.exe --config zabbix_agentd.conf --start

    Same error : 1053.
    With command line zabbix_agentd.exe --config zabbix_agentd.conf --uninstall, it seems that something not uninstalled in the system.

    Secondly, I thought about manually deleting "zabbix Agent" Folder with this batch:

    cd %programfiles%\Zabbix Agent\
    zabbix_agentd.exe --config zabbix_agentd.conf --uninstall
    cd ..
    del /s "Zabbix Agent" /q
    rmdir "Zabbix Agent/zabbix_agentd.conf.d"
    rmdir "Zabbix Agent"
    cd C:\
    copy \\xxxxxxx\zabbix_agent-4.2.3-win-amd64-openssl.msi zabbix_agent-4.2.3-win-amd64-openssl.msi
    msiexec /l*v log.txt /i zabbix_agent-4.2.3-win-amd64-openssl.msi Server=192.168.16.61 ServerActive=192.168.16.61:10051 /qn
    del zabbix_agent-4.2.3-win-amd64-openssl.msi

    New problem, the msi don't install anything, it seems that something not uninstalled in the system again...
    To verify, I tried to install agent gimp freejobalert notepad++ with msi file manually and it don't ask me to install zabbix agent but he detect something on the system and i have a menu to "Change" features and "Remove" Zabbix Agent...

    Nothing in appdata local and appdata roaming. Maybe in registry key ?

    Thanks for helping.
    I also need help with the same. Help is appreciated.

    Thanks in advance,
    Regards,
    Amanda
    Last edited by AmandC; 14-07-2019, 19:14.

    Comment

    • DaneTorson
      Junior Member
      • Jul 2019
      • 13

      #3
      Originally posted by Guizaro
      To verify, I tried to install agent with msi file manually and it don't ask me to install zabbix agent but he detect something on the system and i have a menu to "Change" features and "Remove" Zabbix Agent...
      Have you tried to use "remove" option for Zabbix Agent? Presence of "Change" and "Remove" suggests it is not completely uninstalled.

      Comment

      • Guizaro
        Junior Member
        • Jul 2019
        • 3

        #4
        Hello DaneTorson,

        Thanks for your reply.

        That's specifically my problem here.

        When I run the msi agent manually, It appear the agent is not completely uninstalled by using the "zabbix_agentd.exe --config zabbix_agentd.conf --uninstall" command.

        When I remove the agent with this method, there is no problem, and the agent is fully uninstall. But unfortunaly, I can't uninstall manually on all computer on my Network.

        Does anyone have a solution in command line ? It's probably a registry key or an appdata file but I need an Expert to confirm it.

        Best regards,
        Guizaro

        Comment

        • DaneTorson
          Junior Member
          • Jul 2019
          • 13

          #5
          If you use "zabbix_agentd.exe --config zabbix_agentd.conf --uninstall" command you will remove only one instance of the agent - one using that particular config file.
          To remove multiple instances you need to use:
          zabbix_agentd.exe --config <configuration_file_for_instance_1> --uninstall --multiple-agents
          zabbix_agentd.exe --config <configuration_file_for_instance_2> --uninstall --multiple-agents
          ...
          zabbix_agentd.exe --config <configuration_file_for_instance_N> --uninstall --multiple-agents

          Comment

          • Guizaro
            Junior Member
            • Jul 2019
            • 3

            #6
            Same issue, something is still not completely installed. Please find the log file when i try to install the new agent. Maybe you could find something interesting...

            The simple, quick and secure way to send your files around the world without an account. Share your files, photos, and videos today for free.


            I can't upload it directly ... (170 ko is too high ? really ?)

            Comment

            • DaneTorson
              Junior Member
              • Jul 2019
              • 13

              #7
              Hello Guizaro

              You can try solution from here:
              Populate Zabbix agent on Windows computer. Contribute to aigarskadikis/zabbix-agent-populate-windows development by creating an account on GitHub.

              To delete the already running agent:
              Code:
              uninstall-zabbix-agent.cmd

              Comment

              • J_Adatasol
                Member
                • Dec 2018
                • 74

                #8
                I too was having trouble uninstalling an existing Zabbix Agent (v3.4) from a 'Host' computer. This Agent was installed with a custom installer, and the Service used a non-standard name: "Zabbix Agent [blah-blah.server.com]".

                • The Agent doesn't show up in the Add/Remove programs.
                • The custom installer we were given does not offer an uninstall option.
                • I tried the command line, specifying the current config file that this Agent loads with: zabbix_agentd.exe --config .\zabbix_agentd.custom.conf --uninstall

                I was able to get it to uninstall after finding a clue in the Service of the running Agent. According to the Service entry, the path is:
                Code:
                "c:\Zabbix_custom\zabbix_agentd.exe" --multiple-agents --config "c:\Zabbix_adatasol\zabbix_agentd.custom.conf"
                Based on that path (specifically the fact that it had the "--multiple-agents" flag), EVEN THOUGH this was the only Agent running on this machine, I had to use the "--multiple-agents" flag in the uninstall command. I also had to change the "Hostname" definition in the config file to match the current Service Name: "Zabbix Agent [blah-blah.server.com]".

                Once I did that, this command worked for me:
                Code:
                .\zabbix_agentd.exe --config .\zabbix_agentd.custom.conf --uninstall --multiple-agents

                Thanks, J

                Comment

                • mfredholm
                  Junior Member
                  • Nov 2022
                  • 2

                  #9
                  I found out in my case that I had removed (using Ansible win_service 'absent') the service before running uninstall and then missed the error, next time trying to reinstall Zabbix Agent 2 I git the error (zabbix_agent2 [2500]: ERROR: failed to install Zabbix Agent 2 as service: failed to report service into the event log: SYSTEM\CurrentControlSet\Services\EventLog\Applica tion\Zabbix Agent 2 registry key already exists​")

                  Comment

                  Working...