ITeye博客

weblogic启动报错java.net.UnknownHostException

java-xp · 2010-08-18 13:54 · 企业架构 · Markdown

今天接收运维提供一台机器,启动weblogic的时候出现下面的错误: <Aug 18, 2010 9:48:10 PM CST> <Server subsystem failed. Reason: java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine. java.lang.AssertionError: Could not obtain the localhost address. The most likely cause is an error in the network configuration of this machine. at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:40) at weblogic.server.channels.AddressUtils$AddressMaker.(AddressUtils.java:35) at weblogic.server.channels.AddressUtils.getIPAny(AddressUtils.java:105) at weblogic.protocol.configuration.ChannelHelper.checkConsistency(ChannelHelper.java:60) at weblogic.server.channels.ChannelService.start(ChannelService.java:197) Truncated. see log file for complete stacktrace java.net.UnknownHostException: qswm: qswm at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:38) at weblogic.server.channels.AddressUtils$AddressMaker.(AddressUtils.java:35) at weblogic.server.channels.AddressUtils.getIPAny(AddressUtils.java:105) at weblogic.protocol.configuration.ChannelHelper.checkConsistency(ChannelHelper.java:60) Truncated. see log file for complete stacktrace

经过Google,看了几篇文章,问题基本定位在hosts文件上面。打开/etc/hosts文件,果然发现没有配置机器名对应的ip地址,于是在文件里面加入: 127.0.0.1 qswm 注:qswm是机器名称。 保存后,再次启动weblogic正常启动。

评论(3)

  1. #3 楼 · lsy · 2012-09-14 21:18

    执行hostname qswm 修改主机名称

  2. #2 楼 · yubuzhi · 2012-03-20 17:26

    ActiveMQ

  3. #1 楼 · yubuzhi · 2012-03-20 17:25

    警告: could not generate unique stub java.net.UnknownHostException: test.computer: test.computer at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at org.apache.activemq.util.IdGenerator.(IdGenerator.java:51) at org.apache.activemq.ActiveMQConnection.(ActiveMQConnection.java:108)

评论功能维护中,当前仅展示历史评论。