Weblogic server是ADMIN状态

转载 2012年03月30日 15:27:30
Here we are going to see a Scenario which is very common but troublesome. Many times we observe that while trying to restart the Managed Servers the Servers move to ADMIN State rather than moving to the RUNNING State.  This usually happens  If it is unable to activate some of the Modules which are deployed on this Server. usually it happens If any Application is Not getting activated properly or a Datasource or JTA recovery or a JMS System / SubSystem is not getting activated properly then also it moves into the Admin State. So To find out the Root cause we need to keenly observer the Logs. Specially we need to check what configuration changes we made on the Server recently.

More Alerts On the same Monitoring:  http://middlewaremagic.com/weblogic/?p=5838

Most Probable Cause: Most of the cases it happens if any of the Database is down and WebLogic tries to create the Connection Pool at the boot up time.  One way to avoid this kind of scenario is to set the InitialCapacity of the DataSource to  0 (Zero) so that weblogic will not try to create any JDBC Connection object at the start up time so like this we can avoid Connection creation failure conditions and avoid moving our server to ADMIN State.

NOTE: We have an option to forcibily move our WLS Server to the RUNNING State (from ADMIN State) which works almost 80% cases….Still it is must that we find the root cause of Why the Server is moving to ADMIN State.  So please consider this article as a Workaround …And not as a solution. Because even if we can bring our server in RUNNING state …still we have to find out why the Server Moved to ADMIN State.

In this Demonstration we will see a simple WLST script which will check if any of the server present inside Domain is in ADMIN State or not?  If YES then it will try to force them to move to RUNNING State.

Step1). Create a Directory somewhere in your file system like :  “C:\WLST_AdminStateCheck”

Step2). Write a Properties file “domain.properties” inside “C:\WLST_AdminStateCheck” like following:
domain.name=7001_Plain_Domain
admin.url=t3://localhost:7001
admin.userName=weblogic
admin.password=weblogic1

totalServersToMonitor=2
server.1.url=t3://localhost:7001
server.2.url=t3://localhost:7003

Step3). Write the  WLST Script “serverAdminState.py” inside “C:\WLST_AdminStateCheck” directory.

#############################################################################
#
# @author Copyright (c) 2010 - 2011 by Middleware Magic, All Rights Reserved.
#
#############################################################################

from java.io import FileInputStream

propInputStream = FileInputStream("domain.properties")
configProps = Properties()
configProps.load(propInputStream)

domainName=configProps.get("domain.name")
adminURL=configProps.get("admin.url")
adminUserName=configProps.get("admin.userName")
adminPassword=configProps.get("admin.password")
totalServerToMonitor=configProps.get("totalServersToMonitor")

i=1
while (i <= int(totalServerToMonitor)) :
	url=configProps.get("server."+ str(i)+".url")
	connect(adminUserName,adminPassword,url)
	serverRuntime()
	state=cmo.getState()
	name=cmo.getName()
	if state == 'ADMIN' :
		print "ALERT::::::::Server Name: " + name + " Is currently in State: " + state
		try:
			print 'Resuming Server: .....'
			cmo.resume()
			print "Server: "+name +"Moved to State : " + cmo.getState()
		except:
			print "NOTE:::::::::Unable to Move Server: " + name + " To good State"
	else:
		print ''
		print ''
		print "GOOD::::::::> Server Name: " + name + " Is currently in State: " + state + '                     <img src="http://middlewaremagic.com/weblogic/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"> '
	i = i + 1


Step4). Run the “. ./setWLSEnv.sh” by adding two DOTs separated by a single space …..before the actual script like following : (use ‘cd’ command to move inside the <BEA_HOME>/wlserver_10.3/server/bin) then run the following command….
.  ./setWLSEnv.sh

Note: the first DOT represents that set the Environment in the current Shell, AND the second ./ represents execute the script from the current directory.

Step5). Now run the WLS Script like following:


java weblogic.WLST serverAdminState.py


Following would be the output:

java weblogic.WLST serverAdminState.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain '7001_Plain_Domain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help(serverRuntime)

GOOD::::::::> Server Name: AdminServer Is currently in State: RUNNING                     <img src="http://middlewaremagic.com/weblogic/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley">
Connecting to t3://localhost:7003 with userid weblogic ...
Successfully connected to managed Server 'ManagedServer-1' that belongs to domain '7001_Plain_Domain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

ALERT::::::::Server Name: ManagedServer-1 Is currently in State: ADMIN
Resuming Server: .....
Server: ManagedServer-1Moved to State : RUNNING


Regards,
Jay SenSharma
转载自:http://middlewaremagic.com/weblogic/?p=6407

weblogic 停在starting状态的解决办法

http://www.techpaste.com/2013/10/weblogic-admin-server-startup-hanging-coming-running-state/ ...
  • pkuyjxu
  • pkuyjxu
  • 2016年04月13日 23:42
  • 7874

weblogic启动缓慢解决方案

(一)遇到场景   ts -Dlcunp50_config=/data/lcims/lcunp50/config/cm/sn/systemconfig.xml -Dweblogic.Nam...
  • anhuixiaozi
  • anhuixiaozi
  • 2013年12月10日 16:35
  • 11236

WebLogic自保护之一:让WebLogic免于过载之苦

在系统容量达到极限之时,如果中间件仍旧持续接受请求,则必然会导致应用的稳定性和性能急转直下。WebLogic Server从9系起引入了过载保护这一特性,致力于避免业务系统在已经达到容量极限的前提下依...
  • czl8897098
  • czl8897098
  • 2016年07月13日 11:46
  • 1526

Weblogic的Admin server进程将CPU消耗尽问题解决

weblogic admin server进程将CPU耗尽
  • ljunjie82
  • ljunjie82
  • 2014年07月30日 09:12
  • 1148

Server(Admin) start is failing in WLST as outofmemory error permgen space for weblogic 12c

OutOfMemory Causes and First Aid Steps? In response to the Comment: http://middlewaremagic.co...
  • lzy_168
  • lzy_168
  • 2012年07月25日 14:09
  • 2915

Weblogic admin server与manager server内存分配缺陷优化

Weblogic服务器一般会为每一个业务系统设计一个或多个域(domain),每一个域(domain)服务主体必须由Admin server和Manage Server两类Server组成,两类Ser...
  • ljunjie82
  • ljunjie82
  • 2015年02月23日 11:10
  • 2147

WebLogic Server中jms message的状态

WebLogic Server中jms message的状态说明 今天同事问我说,如何处理RECEIVE、VISIBLE的JMS消息?有点懵,之前从没有关注过消息的状态。We...
  • aaronrao
  • aaronrao
  • 2011年11月08日 23:03
  • 378

weblogic.Admin

weblogic.Admin 2010年6月4日发表评论阅读评论 通过命令行远程方式来连接weblogic服务完成监控和管理weblogic  –weblogic自身提供多种途径的监控管...
  • rocklei123
  • rocklei123
  • 2015年02月02日 10:26
  • 377

weblogic.Admin 初见

    由于生产系统上需要对WebLogic Server的内存使用情况以及线程情况进行监控,通过weblogic console的话非常费劲并且结果也不容易保 存。所以需要通过脚本的方法来获取,此时...
  • xychidy520_java
  • xychidy520_java
  • 2011年07月01日 11:58
  • 1295

C# 调用ArcGIS server admin api

一、AGS server admin api 介绍 1.1什么是admin api AGS Server Admin api 官方的称呼是 AGS Server administrator api, ...
  • myyouthlife
  • myyouthlife
  • 2014年01月06日 15:36
  • 1913
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Weblogic server是ADMIN状态
举报原因:
原因补充:

(最多只允许输入30个字)