<Could not obtain an exclusive lock for directory – Error while Restarting WebLogic Server

Today one of our students was facing the problem while restarting WebLogic server from back end:

Getting the below error – 

<BEA-171519> <Could not obtain an exclusive lock to the embedded LDAP data files directory: /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/data/ldap/ldapfiles because another WebLogic Server is already using this directory. Ensure that the first WebLogic Server is completely shutdown and restart the server.>

Image

Solution:

Go to Domain Directory:

bash-3.2$ pwd
/u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer
bash-3.2$
bash-3.2$ ls -lrt
total 10
drwxr-x— 2 oracle dba 512 May 12 10:42 security
drwxr—– 3 oracle dba 512 May 12 10:47 cache
drwxr—– 5 oracle dba 512 May 12 10:49 data
drwxr—– 3 oracle dba 512 May 12 14:26 logs
drwxr—– 4 oracle dba 512 May 12 14:27 tmp
bash-3.2$
bash-3.2$
bash-3.2$ cd data/
bash-3.2$ ls -lrt
total 6
drwxr—– 4 oracle dba 512 May 12 10:47 store
drwxr—– 2 oracle dba 512 May 12 10:49 console
drwxr—– 7 oracle dba 512 May 12 12:42 ldap
bash-3.2$

Remove the ldap directory.

bash-3.2$ rm -rf ldap/

Now restart the Weblogic Server:

bash-3.2$ pwd
/u01/app/oracle/OFM/user_projects/domains/test_domain/bin
bash-3.2$

bash-3.2$ nohup ./startWebLogic.sh &

[1] 29040
bash-3.2$ Sending output to nohup.out

bash-3.2$ tail -f nohup.out
* console at http://hostname:port/console *
***************************************************
starting weblogic with Java version:
java version “1.6.0_26”
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
Starting WLS with line:
/usr/jdk/instances/jdk1.6.0/bin/java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -Dweblogic.Name=AdminServer -Djava.security.policy=/u01/app/oracle/OFM/wlserver_10.3/server/lib/weblogic.policy -Xverify:none -da -Dplatform.home=/u01/app/oracle/OFM/wlserver_10.3 -Dwls.home=/u01/app/oracle/OFM/wlserver_10.3/server -Dweblogic.home=/u01/app/oracle/OFM/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/u01/app/oracle/OFM/patch_wls1035/profiles/default/sysext_manifest_classpath weblogic.Server
<May 12, 2014 2:35:45 PM CDT> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<May 12, 2014 2:35:45 PM CDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<May 12, 2014 2:35:47 PM CDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.1-b02 from Sun Microsystems Inc.>
<May 12, 2014 2:35:51 PM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638 >
<May 12, 2014 2:36:03 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<May 12, 2014 2:36:03 PM CDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<May 12, 2014 2:36:03 PM CDT> <Notice> <LoggingService> <BEA-320400> <The log file /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<May 12, 2014 2:36:03 PM CDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/AdminServer.log00005. Log messages will continue to be logged in /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/AdminServer.log.>
<May 12, 2014 2:36:03 PM CDT> <Notice> <Log Management> <BEA-170019> <The server log file /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
<May 12, 2014 2:36:18 PM CDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<May 12, 2014 2:36:32 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<May 12, 2014 2:36:32 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<May 12, 2014 2:36:32 PM CDT> <Notice> <LoggingService> <BEA-320400> <The log file /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/test_domain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<May 12, 2014 2:36:32 PM CDT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/test_domain.log00004. Log messages will continue to be logged in /u01/app/oracle/OFM/user_projects/domains/test_domain/servers/AdminServer/logs/test_domain.log.>
<May 12, 2014 2:36:32 PM CDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<May 12, 2014 2:36:33 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<May 12, 2014 2:36:33 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<May 12, 2014 2:36:33 PM CDT> <Notice> <Server> <BEA-002613> <Channel “Default[1]” is now listening on 127.0.0.1:7003 for protocols iiop, t3, ldap, snmp, http.>
<May 12, 2014 2:36:33 PM CDT> <Notice> <Server> <BEA-002613> <Channel “Default” is now listening on 10.7.100.39:7003 for protocols iiop, t3, ldap, snmp, http.>
<May 12, 2014 2:36:33 PM CDT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server “AdminServer” for domain “test_domain” running in Development Mode>
<May 12, 2014 2:36:33 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<May 12, 2014 2:36:33 PM CDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

Hope it helps..

Thanks !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s