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

  • 时间:
  • 浏览:1

linux 修改host后启动tomcat报错

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

127.0.0.1  centos4 localhost localhost.localdomain localhost4 localhost4.localdomain4

意味着着是/etc/hosts文件里这麼主机名为:centos4,出理 最好的法子 而是在hosts文件中加入centos4,修改后的hosts的文件是:

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

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6