When you try to start weblogic server and if this fails with error message that “Unable to obtain lock on *.lok Server may already be running”
________
weblogic.management.ManagementException: Unable to obtain lock on /u01/oid_domain/servers/wls_ods1/tmp/wls_ods1.lok. Server may already be running at weblogic.management. internal.ServerLocks. getServerLock (ServerLocks.java:159)
________
This could be because of two reasons
1) WebLogic Server (which you are trying to start) is already running.
2) WebLogic Server (which you are trying to start) did not stop cleanly.
When weblogic server starts, it creates two lock files
a) $DOMAIN_HOME/servers/<server_name>/tmp/<servermame>.lok
b) $DOMAIN_HOME/servers/<server_name>/data/ldap/ldapfiles/EmbeddedLDAP.lok
When WebLogic server stops, it removes these two files.
If you hit problem, first identifty if server is running on port configured for WebLogic Server by using netstat.
netstat -an | grep <WebLogic_Server_Port>
If server is running then you should see output like
tcp 0 0 ::ffff:<IP>:<weblogic_port> :::* LISTEN
(Listen here identifies that it is listening)
Note: There could be other process using this port
How to identify which port is configured for weblogic server?
To identify port configured for weblogic server open weblogic configuration file
$DOMAIN_HOME/config/config.xml and serach for listen-port
You should see entry like
<listen-port>8001</listen-port>
Note: There is one listen-port for every weblogic server (Admin & Managed)
If server is not running then you can safely remove these lok files under WebLogic server.
Note: If this is weblogic managed server (not Admin Server) then you can safely remove entire managed server directory (including sub directories) $DOMAIN_HOME/servers/<serverName> . When you start managed server again, Admin Server will create these directories.
Hitting any problem in Oracle WebLogic Server or Fusion Middleware ? Put them under comments section for reply.
Related Posts for Learn WebLogic with Us
- Oracle WebLogic Installation Steps
- Domain , Administration & Managed Server, Cluster in Oracle WebLogic
- Create Domain in Oracle WebLogic
- Oracle WebLogic Server – Startup/Shutdown
- Oracle WebLogic Server 10g R3 10.3 is out now
- Deploy Application on Oracle WebLogic Server
- Cluster Architecture : Oracle WebLogic Server
- Start WebLogic Server on Linux on port 80, 443 <= 1024
- JDBC (Java DataBase Connectivity ) in Oracle WebLogic – Overview
- WebLogic Server JDBC for Database connection : Step by Step
- Security in Oracle WebLogic : Realm, Security Provider, Authentication, Authorization, Users
- Deploy ADF application to Oracle WebLogic Server
- Node Manager in Oracle WebLogic Server
- Configure Oracle HTTP Server infront of Oracle WebLogic Server mod_wl_ohs
- How to install weblogic server on 64 bit O.S. (Linux /Solaris) ?
- Oracle WebLogic Login Issue : Password is not correct (Password Lock Policy)
- Oracle WebLogic Server : Node Manager in nutshell
- Certification : 1Z0-108 Oracle WebLogic Server 10g System Administrator Certified Expert
- How to integrate WebLogic with Oracle Internet Directory for Login : Authentication
- opatch, adpatch and now “smart update” (BSU) to apply weblogic patches
- Disater Recovery documentation for Oracle WebLogic Server 11g (Fusion Middleware)
- Authentication Providers in #WebLogic – Oracle Access Manager Identity Assertion for Single Sign-On and OAM Authenticator
- Error while starting WebLogic Server : java.lang.NumberFormatException: null
- #WebLogic startup prompting from username password : boot.properties
- BEA-000286 : Failed to invoke startup class “JRF Startup Class” oracle.jrf.wls.JRFStartup
- WebLogic Kerberos (SSO) Authentication Issue : Error 401 Forbidden : No Configuration was registered that can handle the configuration named com. sun. security. jgss. krb5. accept
- How to reset Lost Oracle WebLogic Password for Fusion Middleware Applications
- Oracle WebLogic Server Certification : 1Z0-108 Practice Question and Dumps
- WebLogic Startup fails with Unable to obtain lock on Server may already be running
- Oracle Weblogic 12c Launch : Attend online on 1 Dec 2011
- Oracle WebLogic 12c (12.1.1) is now available to download
- How to Install WebLogic 12C (12.1.1) on Mac
- Oracle #WebLogic Server 12c : SE vs EE vs Suite License Options






Good hands-on exercises (installation, patching, cloning), very experienced trainer worth every penny 
10 users commented in " WebLogic Startup fails with Unable to obtain lock on Server may already be running "
Follow-up comment rss or Leave a TrackbackExcellent article, the site is always a great learning place.
very thanks for this post
Hi
I am unable to start my Wl admin server.
Version 10.3 when i tried i gated below msg pls suggest.
<Exception while initializing SingleFileServlet: [java.lang.reflect.InvocationTargetException].
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.netuix.servlets.manager.SingleFileServlet.reinitInternal(SingleFileServlet.java:178)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Unable to extract name from ServletContext.
at com.bea.p13n.management.ApplicationHelper.getWebAppName(ApplicationHelper.java:300)
at com.bea.netuix.servlets.services.WlsLightCommonWebappServices._getWebAppName(WlsLightCommonWebappServices.java:163)
at com.bea.netuix.servlets.services.WlsLightCommonWebappServices.getWebAppName(WlsLightCommonWebappServices.java:63)
at com.bea.portlet.container.AppContainer.(AppContainer.java:141)
at com.bea.portlet.container.AppContainer.getAppContainer(AppContainer.java:112)
Truncated. see log file for complete stacktrace
>
<Received exception while creating connection for pool “PortletDS”: ORA-00257: archiver error. Connect internal only, until freed.
A SOA Admin installed WLS 10.3.4 and SOA 11.1.1.4 on linux and configured soa_domain. After a month or so (there were some O/s related work done on the servers like more memory, upgrade O/s to redhat 2.6 etc) the admin forgot the password. After a few attemots, we saw the error every 30 minutes in my AdminServer log files. I deleted the inventory, middleware folder after uninstalling SOA. Please note that I did not do anything on the DB.
I later installed WLS, SOA SUite and configured using the same DB schemas. When I started the server the first time, the system automaticllly created the boot.properties file but I still see the same error. Any ideas? Do I need to clean out the DB as well?
@ Shanthi
What error message you are getting ?
I am sorry, I should have mentioned this in the earlier post.
The error message is “BEA-090078:User weblogic in security realm myrealm has had 5 invalid login attempts, locking account for 30 minutes”. I see this message every 30 minutes in AdminServer.log
@ Shanthi,
Is this happening regularly ? If this is the case then there is client which is configured to connect to Admin Server and weblogic password at client side is wrong. Monitor network to find client connecting to Admin Server
I start the AdminServer, it goes to running mode and within a few seconds, I start seeing the above message every 30 minutes. I cannot even logon to the console – Access Denied error. There is no client at this point – I have installed WLS 10.3.4 + SOA Suite 11.1.1.4 and configured the soadomain. That is all. I have not logged into console even once.
What perplexes me is even if I cleanout the entire middleware directory and resinstalled the above, I still see the same error. The onle thing I did not redo is the DB cleanup and the RCU before the reinstall. Is it possible that WLS stores something in the DB that it is locking despite the reinstall?
@ Shanthi,
Do you still see this problem when you install middleware in different directory and configure domain in different directory ?
Unfortunately I cannot install in a different directory. I need to have the same directory structure in this environment as my other SOA environments since we have a lot of scripts that we use to automate the maintenance. I have opened a SR for this issue. I will update this post when I get a resolution. Thanks for the follow up.
Leave A Reply