运行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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。