201208197PM-Error on "Unable to obtain lock on *.lok . Server may already be running"

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 /scratch/echua/view_storage/echua_featb/.jdev_user_home/system11.1.1.6.38.61.92/DefaultDomain/servers/DefaultServer/tmp/DefaultServer.lok. Server may already be running
 at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:206)
 at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:67)
 at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:74)
 at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:461)
 at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:166)
 at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:881)
 at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:568)
 at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:469)
 at weblogic.Server.main(Server.java:71)
________

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//tmp/.lok  (In this case: /scratch/echua/view_storage/echua_featb/.jdev_user_home/system11.1.1.6.38.61.92/DefaultDomain/servers/DefaultServer/tmp/DefaultServer.lok) 
b)$DOMAIN_HOME/servers//data/ldap/ldapfiles/EmbeddedLDAP.lok (In this case: /scratch/echua/view_storage/echua_featb/.jdev_user_home/system11.1.1.6.38.61.92/DefaultDomain/servers/DefaultServer/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

If server is running then you should see output like

tcp        0      0 ::ffff::      :::* 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
8001

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/ . When you start managed server again, Admin Server will create these directories.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值