启动Weblogic报错:
<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.<clinit>(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: redhat6.5: redhat6.5
at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
at weblogic.server.channels.AddressUtils$AddressMaker.getLocalHost(AddressUtils.java:38)
at weblogic.server.channels.AddressUtils$AddressMaker.<clinit>(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
>
解决方法:
修改hosts文件
$:vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost6.localhost6 localdomain6
127.0.0.1 redhat6.5
这位置请用echo $HOSTNAME确认你的主机名,我的由于后面的.5没有出现,稍微浪费了点时间