全部产品
云市场
    添加监控服务器不成功?

添加监控服务器不成功?

更新时间:2017-06-07 13:26:11

运行radar,添加监控服务器不成功?
查看radar日志agent.log,报如下错误:
[root@hostname-001 radar-for-linux]# cat agent.log 
*******************************************************
*         Welcome to PTS-RADAR (version 1.0.0)        *
*******************************************************
Try RegisteredHost 1:java.net.UnknownHostException: hostname-001: hostname-001
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at com.taobao.qa.perf.agent.biz.HostRegClient.registeredHost(HostRegClient.java:26)
        at com.taobao.qa.perf.agent.main.MonitorAgentServer.main(MonitorAgentServer.java:77)
Try RegisteredHost 2:java.net.UnknownHostException: hostname-001: hostname-001
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at com.taobao.qa.perf.agent.biz.HostRegClient.registeredHost(HostRegClient.java:26)
        at com.taobao.qa.perf.agent.main.MonitorAgentServer.main(MonitorAg
entServer.java:77)
Try RegisteredHost 3:java.net.UnknownHostException: hostname-001: hostname-001
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at com.taobao.qa.perf.agent.biz.HostRegClient.registeredHost(HostRegClient.java:26)
        at com.taobao.qa.perf.agent.main.MonitorAgentServer.main(MonitorAgentServer.java:77)
Try RegisteredHost 4:java.net.UnknownHostException: hostname-001: hostname-001
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at com.taobao.qa.perf.agent.biz.HostRegClient.registeredHost(HostRegClient.java:26)
        at com.taobao.qa.perf.agent.main.MonitorAgentServer.main(MonitorAgentServer.java:77)
Try RegisteredHost 5:java.net.UnknownHostException: hostname-001: hostname-001
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at com.taobao.qa.perf.age
nt.biz.HostRegClient.registeredHost(HostRegClient.java:26)
        at com.taobao.qa.perf.agent.main.MonitorAgentServer.main(MonitorAgentServer.java:77)
RegisteredHost Failed!
 
问题原因:
在系统的/etc/hostname中配置了“hostname-001” 作为主机名,而在/etc/hosts文件中没有 相应的“hostname-001”或绑定了127.0.0.1。
解决方法:
在/etc/hosts里加一行: 本机IP   hostname-001