zoukankan      html  css  js  c++  java
  • windos端zabbix_agent重启报错:cannot open service

    window系统故障重启后,发现zabbix报警一直没有报恢复。

    准备重启一下,

    运行:c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -s

    却发现出现报错cannot open service

    在网上搜索报错解决情况,却没有搜到什么有用的信息。那就还是自己琢磨吧。

    停止进程:c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf  -x

    却发还是现出现报错cannot open service

    卸载:c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf  -d

    却发还是现出现报错cannot open service

    安装:c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf  -i

    这次却发现成功安装,然后再启动一下:

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -s

    OK,暂时还没有查到为什么会出现重启后zabbix-agent自动卸载的原因

    先贴一个我从网上看到的一篇windows的ba交互式t文件,省去敲命令的时间。

    zabbix.bat文件内容:

    @echo off

    CHCP 65001

    echo **********************************************

    echo **********Zabbix Agented Operation************

    echo **********************************************

    echo **** a. start Zabbix Agentd**********

    echo **** b. stop Zabbix Agentd**********

    echo **** c. restart Zabbix Agentd**********

    echo **** d. install Zabbix Agentd**********

    echo **** e. uninstall Zabbix Agentd**********

    echo **** f. exit Zabbix Agentd**********

    echo **********************************************

    :loop

    choice /c abcdef /M "plese choose"

    if errorlevel 6 goto :exit

    if errorlevel 5 goto :uninstall

    if errorlevel 4 goto :install

    if errorlevel 3 goto :restart

    if errorlevel 2 goto :stop

    if errorlevel 1 goto :start

    :start

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -s

    :stop

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -x

    :restart

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -x

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -s

    :install

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -i

    :uninstall

    c:zabbixinwin64zabbix_agent.exe -c c:zabbixconfzabbix_agentd.win.conf -d

    :exit

    exit

    后续查找到原因,再继续进行处理,今天先到这里

  • 相关阅读:
    android学习日记19--四大组件之BroadcastReciver(广播接收者)
    android学习日记19--四大组件之Services(服务)
    android学习日记18--Adapter简介
    android学习日记17--Gallery(画廊视图)
    android学习日记16--GridView(网格视图)
    android学习日记15--WebView(网络视图)
    android学习日记14--网络通信
    android报错及解决2--Sdcard进行文件的读写操作报的异常
    android学习日记13--数据存储之File存储
    自定义跨浏览器的事件处理程序
  • 原文地址:https://www.cnblogs.com/chaochao520/p/8950234.html
Copyright © 2011-2022 走看看