且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在log4j里出现Name or service not known时该怎么办【备忘】

更新时间:2022-06-24 12:35:04

出现以下问题时

2013-05-09 22:40:28 [net.rubyeye.xmemcached.XMemcachedClient]-[WARN] - XMemcachedClient use Binary protocol
2013-05-09 22:40:28 [net.rubyeye.xmemcached.monitor.XMemcachedMbeanServer]-[ERROR] - Get HostName Error
java.net.UnknownHostException: Test159: Test159: Name or service not known

在hosts文件中增加Memcached中连接的IP 和机器名,例如Memcached中的IP为10.10.3.159,机器名为Test159

vi /etc/hosts

10.10.3.159    Test159