Could not obtain the localhost address...解決方法
阿新 • • 發佈:2018-12-31
啟動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: bogon: bogon
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
#新增 IP hostname ($:hostname 查詢)
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost6.localdomain6 localhost6
127.0.0.1 bogon #這裡就是我新增的,我的主機名就是bogon
<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: bogon: bogon
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
#新增 IP hostname ($:hostname 查詢)
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost6.localdomain6 localhost6
127.0.0.1 bogon #這裡就是我新增的,我的主機名就是bogon