java.net.MalformedURLException: Local host name unknown报错处理

  • 时间:
  • 浏览:3

linux 修改host后启动tomcat报错

127.0.0.1  centos4 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

错误: 代理抛出异常错误: java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: centos4: centos4: 未知的名称或服务

Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: centos4: centos4: Name or service not known

原应 是/etc/hosts文件里没法 主机名为:centos4,处里法律法律依据但是在hosts文件中加入centos4,修改后的hosts的文件是: