Skip to content

Instantly share code, notes, and snippets.

@CedricL46
Last active May 28, 2018 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CedricL46/54cac13e5f9bfc710089dab619036e7c to your computer and use it in GitHub Desktop.
Save CedricL46/54cac13e5f9bfc710089dab619036e7c to your computer and use it in GitHub Desktop.
#How to fix BEA-141281 – unable to get file lock or BEA-280060 The persistent store encountered a fatal error in weblogic
#After an unexpected crash the following error can occur when you startup your weblogic server:
nohup /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/bin/startManagedWebLogic.sh YOUR_SERVER_NAME t3://YOUR_WEBLOGIC_SERVER:7004 2>&1 &
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER ~]$ nohup /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/bin/startManagedWebLogic.sh YOUR_SERVER_NAME t3://YOUR_WEBLOGIC_SERVER:7004 2>&1 &
[1] 14150
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER ~]$ nohup: ignoring input and appending output to nohup.out
#read the nohup.out to get the startup error message
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER ~]$ tail -f nohup.out
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
Starting WLS with line:
/usr/share/jdk1.6.0_25/bin/java -server -Xms3072m -Xmx6144m -XX:MaxPermSize=1536m -Dweblogic.Name=YOUR_SERVER_NAME -Djava.security.policy=/wbl/weblogic_10/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore=/wbl/weblogic_10/wlserver_10.3/server/lib/cacerts -da -Dplatform.home=/wbl/weblogic_10/wlserver_10.3 -Dwls.home=/wbl/weblogic_10/wlserver_10.3/server -Dweblogic.home=/wbl/weblogic_10/wlserver_10.3/server -Dcommon.components.home=/wbl/weblogic_10/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME -Djrockit.optfile=/wbl/weblogic_10/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/fmwconfig/servers/YOUR_SERVER_NAME -Doracle.domain.config.dir=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/fmwconfig -Digf.arisidbeans.carmlloc=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/fmwconfig/carml -Digf.arisidstack.home=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/wbl/weblogic_10/oracle_common/modules/oracle.ossoiap_11.1.1,/wbl/weblogic_10/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dem.oracle.home=/wbl/weblogic_10/oracle_common -Djava.awt.headless=true -Dweblogic.management.discover=false -Dweblogic.management.server=t3://YOUR_WEBLOGIC_SERVER:7004 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/wbl/weblogic_10/patch_wls1036/profiles/default/sysext_manifest_classpath:/wbl/weblogic_10/patch_ocp371/profiles/default/sysext_manifest_classpath -javaagent:/opt/introscope/agent-wl-10.5.2.15.2/Agent.jar -Dcom.wily.introscope.agentProfile=/opt/introscope/agent-wl-10.5.2.15.2/core/config/IntroscopeAgent.weblogic.profile -Dcom.wily.introscope.agent.agentName=sta_weblogic_YOUR_SERVER_NAME -Duser.language=fr -Duser.country=CH -Dadfvdt.disableOjspDeployment=true weblogic.Server
<28 mai 2018 10.19. h CEST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<28 mai 2018 10.19. h CEST> <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>
<28 mai 2018 10.19. h CEST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/dhbcore-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/fscontext-1.2.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/headers-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/jmqi-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/jms-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/mq-client-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/mqjms-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/pcf-7.5.jar:/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/lib/providerutil-1.2.jar>
<28 mai 2018 10.19. h CEST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.0-b11 from Sun Microsystems Inc.>
<28 mai 2018 10.20. h CEST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
<28 mai 2018 10.20. h CEST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
BEA-141281<28 mai 2018 10.20. h CEST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
<28 mai 2018 10.20. h CEST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
<28 mai 2018 10.20. h CEST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...>
#Or This error if the EmbeddedLDAP is locked :
<28 mai 2018 10.23. h CEST> <Critical> <Health> <BEA-310006> <Critical Subsystem PersistentStore._WLS_YOUR_SERVER_NAME has failed. Setting server state to FAILED.
Reason: weblogic.store.PersistentStoreFatalException: [Store:280105]The persistent file store "_WLS_YOUR_SERVER_NAME" cannot open file _WLS_YOUR_SERVER_NAME000000.DAT.>
<28 mai 2018 10.23. h CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<28 mai 2018 10.23. h CEST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<28 mai 2018 10.23. h CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
<28 mai 2018 10.23. h CEST> <Critical> <WebLogicServer> <BEA-000385> <Server health failed. Reason: health of critical service 'PersistentStore._WLS_YOUR_SERVER_NAME' failed>
<28 mai 2018 10.23. h CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
#To fix it, search your weblogic server for *.lok file
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER ~]$ locate *.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/edit.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/config/config.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/AdminServer/data/ldap/ldapfiles/EmbeddedLDAP.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/AdminServer/tmp/AdminServer.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/data/ldap/ldapfiles/EmbeddedLDAP.lok
/YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/tmp/YOUR_SERVER_NAME.lok
#Here we found two lock files on our faulty YOUR_SERVER_NAME weblogic server
#Here's how to remove them and clear the cache
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/data/ldap/ldapfiles/EmbeddedLDAP.lok
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/tmp/YOUR_SERVER_NAME.lok
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/data/store/default/_WLS_YOUR_SERVER_NAME000000.DAT
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm -rf /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/cache/
[YOUR_WEBLOGIC_USER@YOUR_WEBLOGIC_SERVER YOUR_SERVER_NAME]$ rm -rf /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/servers/YOUR_SERVER_NAME/tmp/
#You can now restart YOUR_SERVER_NAME succesfully with
nohup /YOUR_DOMAIN_PATH/domains/YOUR_DOMAIN_NAME/bin/startManagedWebLogic.sh YOUR_SERVER_NAME t3://YOUR_WEBLOGIC_SERVER:7004 2>&1 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment