Could not obtain the localhost address...解决方法

启动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
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值