- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- Re: How to release lock from objects in R80.10
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to release lock from objects in R80.10
I want to relase the lock on 1198 objects. I tried to delete them all at once in a SmartConsole session but somehow it never accepted or executed that request in the session.
I have only my current session in the list of active sessions:
And none of the other session listed under revisions made that many changes.
How do I find the unlisted session to discard or just clear the lock on the objects?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at this thread, it may be very helpful -
https://community.checkpoint.com/thread/7048-clear-disconnected-sessions
Robert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we had the same problem with an object in R80.20 management server.
We did the following to resolve it.
First run:
psql_client cpm postgres -c "SELECT objid, name, dlesession, cpmitable, subquery1.lockingsessionid, subquery1.operation FROM dleobjectderef_data, (SELECT lockedobjid, lockingsessionid, operation FROM locknonos) subquery1 WHERE subquery1.lockedobjid = objid and not deleted and dlesession >=0;"
to check the locked session & objectid
Then, delete the object from locknonos db-table to release it.
psql_client cpm postgres -c "delete from locknonos where lockedobjid='[objid-from previous command]';"
cpstop;cpstart to restart the services.
And that's it, if you run again the first command you see that the query doesn't return data 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on sk114663 I got this list:
cpm=# SELECT objid, name, dlesession, cpmitable, subquery1.lockingsessionid, subquery1.operation FROM dleobjectderef_data, (SELECT lockedobjid, lockingsessionid, operation FROM locknonos) subquery1 WHERE subquery1.lockedobjid = objid and not deleted and dlesession >=0;
objid | name | dlesession | cpmitable | lockingsessionid | operation
--------------------------------------+----------------------------------------------------------------+------------+-----------------+--------------------------------------+------------------------
2da15074-c710-472d-84e3-f8d47eb71b9a | Microsoft_Office365_o365_2603:1020:200::682f:a1d8/128 | 2 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
2da15074-c710-472d-84e3-f8d47eb71b9a | Microsoft_Office365_o365_2603:1020:200::682f:a1d8/128 | 0 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
d2f8e2d6-5f8c-421d-a42d-5e3291350694 | Microsoft_Office365_o365_2801:80:1d0:1c00::/64 | 2 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
d2f8e2d6-5f8c-421d-a42d-5e3291350694 | Microsoft_Office365_o365_2801:80:1d0:1c00::/64 | 0 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
8198604f-58f3-413b-a0d0-f3cebf2666b7 | Microsoft_Office365_o365_2a01:111:2003::/48 | 2 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
8198604f-58f3-413b-a0d0-f3cebf2666b7 | Microsoft_Office365_o365_2a01:111:2003::/48 | 0 | network_objects | 47c02486-942b-41f0-9cc3-cb68101683c7 | CP_LOCK_OPERATION_EDIT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same problem (object vpn community is locked) . I can find out the sessionid by database query. I can't end the session via the SmartConsole because i don't see this session there. A reboot and installation of the last hotfix didn't improve anything.
[Expert@fwmgmt]# psql_client cpm postgres
psql.bin (9.2.4)
Type "help" for help.
cpm=# SELECT objid, name, dlesession, cpmitable, subquery1.lockingsessionid, subquery1.operation FROM dleobjectderef_data, (SELECT lockedobjid, lockingsessionid, operation FROM locknonos) subquery1 WHERE subquery1.lockedobjid = objid and not deleted and dlesession >=0;
objid | name | dlesession | cpmitable | lockingsessionid | operation
--------------------------------------+-------------------+------------+-------------+--------------------------------------+--------------------------
44b17825-97cf-439a-904c-e47ec9007291 | | 4 | | 97359b09-b9bf-4c21-bcef-d50ded6132ef | CP_LOCK_OPERATION_CREATE
53dc21c7-7005-43ec-9f88-3a7587bf0569 | VPN_Transit-Spoke | 4 | communities | 97359b09-b9bf-4c21-bcef-d50ded6132ef | CP_LOCK_OPERATION_EDIT
53dc21c7-7005-43ec-9f88-3a7587bf0569 | VPN_Transit-Spoke | 0 | communities | 97359b09-b9bf-4c21-bcef-d50ded6132ef | CP_LOCK_OPERATION_EDIT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rene,
Open a TAC ticket with the proper information. Include the steps taken with sk detail.
Then open a chat on that ticket and I think someone will be able to tell you how to terminate the session from the commandline in that chat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at this thread, it may be very helpful -
https://community.checkpoint.com/thread/7048-clear-disconnected-sessions
Robert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks for the large number of suggestions. I was able to fix the problem as follows.
mgmt_cli login -r true > id. txt
mgmt_cli discard uid < lockingsessionid> -s id. txt
mgmt_cli publish -s id. txt
mgmt_cli logout -s id. txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed the steps mentioned above but still cannot get rid of the sessions. Any suggestions?
[Expert@cpmng:0]# psql_client cpm postgres -c "select applicationname,objid,creator,state,numberoflocks,numberofoperations,creationtime,lastmodifytime from worksession where state = 'OPEN' and (numberoflocks != '0' or numberofoperations != '0');"
applicationname | objid | creator | state | numberoflocks | numberofoperations | creationtime | lastmodifytime
-----------------+--------------------------------------+----------+-------+---------------+--------------------+-------------------------+-------------------------
WEB_API | 4a12186c-4a08-41a3-bee8-f7b0d4a19681 | api-time | OPEN | 1 | 1 | 2019-02-01 09:33:18.195 | 2019-02-01 12:37:48.658
WEB_API | a7d33529-3395-4909-8efb-a14a0e9faa44 | api-time | OPEN | 1 | 1 | 2019-02-01 09:38:53.69 | 2019-02-01 12:34:38.107
(2 rows)
[Expert@cpmng:0]# mgmt_cli discard uid 4a12186c-4a08-41a3-bee8-f7b0d4a19681
Username: admin
Password:
number-of-discarded-changes: 1
message: "OK"
[Expert@s-cpmng:0]# psql_client cpm postgres -c "select applicationname,objid,creator,state,numberoflocks,numberofoperations,creationtime,lastmodifytime from worksession where state = 'OPEN' and (numberoflocks != '0' or numberofoperations != '0');"
applicationname | objid | creator | state | numberoflocks | numberofoperations | creationtime | lastmodifytime
-----------------+--------------------------------------+----------+-------+---------------+--------------------+-------------------------+-------------------------
WEB_API | a7d33529-3395-4909-8efb-a14a0e9faa44 | api-time | OPEN | 1 | 1 | 2019-02-01 09:38:53.69 | 2019-02-01 12:34:38.107
WEB_API | 4a12186c-4a08-41a3-bee8-f7b0d4a19681 | api-time | OPEN | 1 | 1 | 2019-02-01 09:33:18.195 | 2019-02-01 12:38:43.536
(2 rows)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm not sure but did you publish (mgmt_cli publish) the changes (mgmt_cli discard) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. This is the output from your instructions. This sessions seem more stubborn than yours
[Expert@cpmng:0]# mgmt_cli login -r true > id.txt
[Expert@cpmng:0]# mgmt_cli discard uid a7d33529-3395-4909-8efb-a14a0e9faa44 -s id.txt
number-of-discarded-changes: 1
message: "OK"
[Expert@cpmng:0]# mgmt_cli publish -s id.txt
---------------------------------------------
Time: [12:34:00] 1/2/2019
---------------------------------------------
"Publish operation" succeeded (100%)
tasks:
- task-id: "01234567-89ab-cdef-9b1f-7bface479470"
task-name: "Publish operation"
status: "succeeded"
progress-percentage: 100
suppressed: false
task-details:
- publishResponse:
numberOfPublishedChanges: 0
mode: "async"
revision: "cd937101-8815-4217-8e8c-6d1bcb2cb923"
[Expert@cpmng:0]# mgmt_cli discard uid 4a12186c-4a08-41a3-bee8-f7b0d4a19681 -s id.txt
number-of-discarded-changes: 1
message: "OK"
[Expert@cpmng:0]# mgmt_cli publish -s id.txt
---------------------------------------------
Time: [12:34:39] 1/2/2019
---------------------------------------------
"Publish operation" succeeded (100%)
tasks:
- task-id: "01234567-89ab-cdef-aa5d-d2f98d49e35a"
task-name: "Publish operation"
status: "succeeded"
progress-percentage: 100
suppressed: false
task-details:
- publishResponse:
numberOfPublishedChanges: 0
mode: "async"
revision: "cd9d34fb-be89-4089-8c43-789f0164911c"
[Expert@cpmng:0]# mgmt_cli logout -s id.txt
message: "OK"
[Expert@cpmng:0]# psql_client cpm postgres -c "select applicationname,objid,creator,state,numberoflocks,numberofoperations,creationtime,lastmodifytime from worksession where state = 'OPEN' and (numberoflocks != '0' or numberofoperations != '0');"
applicationname | objid | creator | state | numberoflocks | numberofoperations | creationtime | lastmodifytime
-----------------+--------------------------------------+----------+-------+---------------+--------------------+-------------------------+-------------------------
WEB_API | 4a12186c-4a08-41a3-bee8-f7b0d4a19681 | api-time | OPEN | 1 | 1 | 2019-02-01 09:33:18.195 | 2019-02-01 12:34:38.525
WEB_API | a7d33529-3395-4909-8efb-a14a0e9faa44 | api-time | OPEN | 1 | 1 | 2019-02-01 09:38:53.69 | 2019-02-01 12:34:38.107
(2 rows)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we had the same problem with an object in R80.20 management server.
We did the following to resolve it.
First run:
psql_client cpm postgres -c "SELECT objid, name, dlesession, cpmitable, subquery1.lockingsessionid, subquery1.operation FROM dleobjectderef_data, (SELECT lockedobjid, lockingsessionid, operation FROM locknonos) subquery1 WHERE subquery1.lockedobjid = objid and not deleted and dlesession >=0;"
to check the locked session & objectid
Then, delete the object from locknonos db-table to release it.
psql_client cpm postgres -c "delete from locknonos where lockedobjid='[objid-from previous command]';"
cpstop;cpstart to restart the services.
And that's it, if you run again the first command you see that the query doesn't return data 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Today I have a similar issue and resolved it, following your post. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
This is not supported to run update SQL command against the database
this can case database inconsistency.
The results is a customer that has broken environment and then call support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have the exact same issue.. object locked by a session that does not exist!
So how can we solve this without this "unsupported" SQL procedure described above????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Contact TAC for assistance with resolving the problem.
