weblogic启动报错java.net.UnknownHostException
今天接收运维提供一台机器,启动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正常启动。
执行hostname qswm 修改主机名称
ActiveMQ
警告: 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)