Server subsystem failed. Reason: java.lang.AssertionError: Could not obtain the localhost address

今天,在虚拟机字符界面安装weblogic11g并命令行创建weblogic domain后,执行startweblogic.sh报错。如下所示:、

/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
<Mar 17, 2019 8:38:54 PM CST> <Critical> <WebLogicServer> <BEA-000386> <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.BasicServerChannelImpl.getLocalHost(BasicServerChannelImpl.java:59)
at weblogic.server.channels.BasicServerChannelImpl.<clinit>(BasicServerChannelImpl.java:54)
at weblogic.rjvm.wls.WLSRJVMEnvironment.createDefaultChannel(WLSRJVMEnvironment.java:130)
at weblogic.protocol.ProtocolHandlerAdmin$ChannelInitializer.<clinit>(ProtocolHandlerAdmin.java:46)
at weblogic.protocol.ProtocolHandlerAdmin.getDefaultServerChannel(ProtocolHandlerAdmin.java:51)
Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: openmake: openmake: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at weblogic.server.channels.BasicServerChannelImpl.getLocalHost(BasicServerChannelImpl.java:57)
at weblogic.server.channels.BasicServerChannelImpl.<clinit>(BasicServerChannelImpl.java:54)
at weblogic.rjvm.wls.WLSRJVMEnvironment.createDefaultChannel(WLSRJVMEnvironment.java:130)
at weblogic.protocol.ProtocolHandlerAdmin$ChannelInitializer.<clinit>(ProtocolHandlerAdmin.java:46)
Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: openmake: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
at weblogic.server.channels.BasicServerChannelImpl.getLocalHost(BasicServerChannelImpl.java:57)
Truncated. see log file for complete stacktrace
>
<Mar 17, 2019 8:38:55 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Mar 17, 2019 8:38:55 PM CST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Mar 17, 2019 8:38:55 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
[root@openmake base_domain]# netstat -na | grep 7001
[root@openmake base_domain]# cd ..

确认无法打开7001端口。

最后解决办法:

[root@openmake ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.179.57 openmake
[root@openmake ~]#

也就是在/etc/hosts加上主机名跟IP的对应映射关系。想不到weblogic 也像websphere一样,要读写/etc/hosts的IP与主机的对应关系。

以下文章点击率最高

Loading…

     

如果这文章对你有帮助,请扫左上角微信支付-支付宝,给于打赏,以助博客运营

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注