通过weblogic自带脚本正常关闭受管理服务器方法
最近应工作需要,需要搭建weblogic中间件。其中遇到一些列的问题,例如如何在关闭服务器之间,正常关闭weblogic服务。一次非正常关闭weblogic服务带来的麻烦,觉得应该为刚入门weblogic的朋友写点东西。虽然看到网上有各种各样的weblogic资料,但是涉及关闭weblogic服务方面的资料比较少。语言组织能力较差,请轻喷!常用关闭weblogic的服务方法是使用weblogic自带的stopManagedWebLogic.sh脚本,具体使用方法这里不再赘述。但经常遇见管理失败的情况,提示如下:
root@twls08 bin]#sh stopManagedWebLogic.sh twls08 http://10.60.7.2:7001 Stopping Weblogic Server...
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to http://10.60.7.2:7001 with userid weblogic ...This Exception occurred at Sat Oct 31 20:15:20 CST 2015.javax.naming.CommunicationException http://10.60.7.2:7001: Destination unreachable; nested exception is: Problem invoking WLST - Traceback (innermost last):File "/Oracle/Middleware/weblogic/user_projects/domains/lb_domain/shutdown.py", line 3, in ?File "<iostream>", line 22, in connectFile "<iostream>", line 648, in raiseWLSTExceptionWLSTException: Error occured while performing connect : Error getting the initial context. There is no server running at http://10.60.7.2:7001 Use dumpStack() to view the full stacktrace
DoneStopping Derby Server...# ps aux|grep start
非正常关闭weblogic服务的故障如下,数据源无法正常使用,解决方法为删除原数据源,新建数据源。笔者认为,导致该故障的原因为非正常关闭导致数据源相关配置和状态信息改变,导致无法正常使用数据源。
解决方法:方法1. 启用隧道协议关闭 如上报错红色部分提示,没有指定隧道。启用后,需要重新启动weblogic服务器才能使用。 启动隧道方式如下图
方法2. 使用weblogict3协议关闭服务使用方法1关闭weblogic时会发现,必须重新启动服务后才能正常使用,简言之就是仍需要一次非常关闭服务才能使用。这里推荐使用第二种方法,使用t3协议关闭。什么是t3协议,T3也称为丰富套接字,是BEA内部协议,功能丰富,可扩展性好。T3是多工双向和异步协议,经过高度优化,只使用一个套接字和一条线程。借助这种方法,基于Java的客户端可以根据服务器方需求使用多种RMI对象,但仍使用一个套接字和一条线程。默认使用http协议关闭:sh stopManagedWebLogic.sh twls08http://10.60.7.2:7001使用t3协议关闭方式:sh stopManagedWebLogic.sh twls08T3://10.60.7.2:7001
就是如此简单,如果广大网友有更好的方法,请留言,谢谢!
页:
[1]