Tuesday, September 3, 2013

Enterprise Manager 12c: AdminServer Could Not Be Started

I got an error when trying to start Oracle Enterprise Manager Cloud Control 12c. It says AdminServer couldn’t be started:
[oracle@oem12c bin]$./emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 3  
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Already Started
AdminServer Could Not Be Started
Check Admin Server log file for details: /u01/oracle/gc_inst/user_projects/
domains/GCDomain/servers/EMGC_ADMINSERVER/logs/EMGC_ADMINSERVER.out
When I examined the EMGC_ADMINSERVER.out file, I see that “<BEA-141281> <unable to get file lock, will retry …> weblogic.management.ManagementException: Unable to obtain lock” message. As you know, Enterprise Manager Cloud Control uses Weblogic. Weblogic uses “lock” (*.lok) files to prevent a server to run multiple times. I checked if EMGC_ADMINSERVER is running:
ps -ef | grep EMGC_ADMINSERVER
and see that it’s not up, so it’s obvious that somehow locks files were not properly cleaned. I shutdown the rest of OMS processes:
[oracle@oem12c bin]$./emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 3  
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
AdminServer Already Stopped
Oracle Management Server is Down
then searched for the lock files and removed them
[root@oem12c ~]# locate *.lok | grep EMGC_ADMINSERVER
/u01/oracle/gc_inst/user_projects/domains/GCDomain/servers/
EMGC_ADMINSERVER/data/ldap/ldapfiles/EmbeddedLDAP.lok
/u01/oracle/gc_inst/user_projects/domains/GCDomain/servers/
EMGC_ADMINSERVER/tmp/EMGC_ADMINSERVER.lok

[root@oem12c ~]# rm /u01/oracle/gc_inst/user_projects/domains/GCDomain/servers/
EMGC_ADMINSERVER/data/ldap/ldapfiles/EmbeddedLDAP.lok
[root@oem12c ~]# rm /u01/oracle/gc_inst/user_projects/domains/GCDomain/servers/
EMGC_ADMINSERVER/tmp/EMGC_ADMINSERVER.lok
After removing the lock files, I succesfully started OMS including AdminServer.

No comments:

Post a Comment