Could not obtain the localhost address...解決方法
作者:張勇波
博主發(fā)表的文章,有的是自己原創(chuàng),有的是這些年本人從網(wǎng)上積累的,方便大家學(xué)習(xí)。
Weblogic:Could not obtain the localhost address…解決方法
啟動(dòng)Weblogic報(bào)錯(cuò):
- <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 查詢(xún))
- 127.0.0.1 localhost.localdomain localhost
- 127.0.0.1 localhost6.localdomain6 localhost6
- 127.0.0.1 bogon #這里就是我添加的,我的主機(jī)名就是bogon
【本文是51CTO專(zhuān)欄作者張勇波的原創(chuàng)文章,轉(zhuǎn)載請(qǐng)通過(guò)51CTO獲取作者授權(quán)】
責(zé)任編輯:武曉燕
來(lái)源:
上下求索的Z先生博客