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与主机的对应关系。

weblogic线程阻塞性能调优(图解)转

声明:出现这个问题有程序方面、网络方面、weblogic设置方面等等原因,此文章主要讲述由于weblogic设置而导致的解决办法。

因为:

1.程序问题,需要项目自己去解决,weblogic在做优化处理也于事无补。

2.网络中断或者认为关闭交互这种情况也不能用weblogic处理.

一、说明:

,”weblogic.kernel.Default”是从客户端提交请求后产生的线程所在的队列名。这个队列的线程数默认是15个。如果超过15个线程堵塞,则部署的应用将不能访问。同时后台报:
<2008-2-27 下午09时37分48秒 CST> <Error> <WebLogicServer> <BEA-000337> <ExecuteThread: ’14’ for queue: ‘weblogic.kernel.Default’ has been busy for “1,720” seconds working on the request “Http Request: /myapp/test/index.jsp”, which is more than the configured time (StuckThreadMaxTime) of “600” seconds.>
2,线程数(Tread Count):指派到weblogic.kernel.Default队列的线程数。如果你不需要使用超过15个线程(默认),就不必更改这个属性值。

如果发送该请求较多,很有可能会导致weblogic的线程阻塞,严重会引起weblogic挂起现象。
可以通过以下几种方法解决:
1)修改StuckThreadMaxTime参数,将默认的600s改成1200s,或者其它适合的值。
2)增大线程数,防止线程阻塞问题。
3)优化程序,减少处理时间。

二、修改办法

—————————————修改办法——————————————————————-

1) 如何修改StuckThreadMaxTime参数值:

启动weblogic服务,进入控制台:

your_domain->Environment->Servers->your_server->Configuration->Tuning->Stuck Thread Max Time

如下图:

阅读更多