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
http://blog.csdn.net/weiyangcau/article/details/7411638
分享到:
相关推荐
3. **Monitoring**:通过WebLogic Server控制台实时查看服务器状态,包括内存使用、线程、JVM性能等。 4. **Logging and Tracing**:配置日志和跟踪,用于故障排查和性能分析。 5. **Security**:配置用户、角色、...
3. 管理工具:提供WebLogic Server Administration Console,便于远程管理和监控应用服务器状态。 4. 安全性:内置安全特性,如SSL/TLS加密、用户认证与授权、安全管理策略等。 5. 故障诊断:日志系统和诊断工具帮助...
除了管理控制台,WebLogic Server还支持命令行工具进行管理,如`wlst`(WebLogic Scripting Tool)和`java weblogic.Admin`命令。这些工具允许自动化管理和脚本化的操作,对于批量任务和无人值守的环境特别有用。 ...
- **测试与验证**:启动所有Managed Server,确保它们都能正常加入集群,并通过健康检查验证集群的运行状态。 4. **高可用性与故障恢复**: - **故障检测**:WebLogic Server通过心跳机制检测集群内其他服务器的...
- **WebLogic Server Ant任务**:Ant任务提供了与weblogic.Server、weblogic.Admin(不推荐在新版本中使用)和weblogic.Deployer命令相似的功能,可用于大部分配置需求。 在使用这些工具时,确保环境设置正确至关...
9. **监控与维护**:定期检查集群的运行状态,确保所有的Managed Server都在正常工作,Session复制没有问题。WebLogic Server的管理控制台提供了丰富的监控工具和日志信息。 通过以上步骤,你可以在Windows环境下...
- **管理服务器**(Administration Server):也称为Admin Server,它是域中的一个特殊WebLogic Server实例,负责存储域的配置信息并作为域的中央管理点。 - **被管理服务器**(Managed Server):这些是域中的常规...
2. **管理控制台使用**:深入讲解了如何利用WebLogic Server的管理控制台进行日常管理和监控工作,包括查看服务器状态、配置安全性策略、调整资源分配等。 3. **集群与高可用性**:探讨了如何配置WebLogic Server...
同时,WebLogic Server还提供了性能监控工具,帮助管理员实时监控系统状态,及时发现并解决问题。 四、文档版权与使用限制 BEA Systems对WebLogic Server及其文档拥有完全的版权,任何未经授权的复制、翻译或电子...
WebLogic Server集群通常由管理服务器(Admin Server)和成员服务器(Managed Server)组成。管理服务器负责配置、监控和管理整个集群,而成员服务器执行应用服务。 #### 3.5. 配置集群应用的必要条件 - **网络...
1. **准确描述现象**:首先需要详细记录出现故障的时间、地点以及具体的异常行为,比如系统运行的平台环境(操作系统版本、硬件配置等)、WebLogic Server 的版本、故障发生时的操作步骤以及任何错误或警告信息。...
WebLogic是Oracle公司提供的一个企业级Java应用服务器,主要用于运行和管理Java EE应用程序。MyEclipse是一款强大的集成开发环境(IDE),尤其适合Java EE项目的开发。本教程将详细讲解如何在MyEclipse中配置...
1. `weblogic.management.AdminService`:提供与WebLogic Server进行交互的基本接口,如获取服务器状态、执行管理操作等。 2. `weblogic.management.Deployer`:用于部署、更新和卸载应用程序。 3. `weblogic....
java -cp E:/DevTools/BEA/wlserver_10.3/server/lib/weblogic.jar weblogic.security.utils.AdminAccount weblogic newpass ``` 3. **更新配置文件**: - 更新`boot.properties`文件中的用户名和密码字段。 - ...
3. **`AdminServer.lok`**:这是Admin Server的锁文件,用于标记Admin Server的状态。 4. **`EmbeddedLDAP.lok`**:这是一个与嵌入式LDAP服务器相关的锁文件。 此外,还有一些`.DAT`文件,这些文件通常是WebLogic...
7. **启动和监控**:启动WebLogic Server实例,通过Admin Console监控应用的运行状态。 8. **安全管理**:设置用户、角色和权限,确保只有授权的用户可以访问WebLogic和部署的应用。 9. **故障排查和优化**:学习...
- **WebLogic Server概述**:WebLogic Server是Oracle公司提供的一款基于Java EE架构的企业级应用服务器,主要用于部署和运行大型分布式Java应用程序。 - **版本历史**:了解WebLogic Server的发展历程,包括其从最...