Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Melissa_Kjendle
Explorer
Jump to solution

clear disconnected sessions?

migrated R80.10 firewall management to a new VM.  Cannot push policy or view VPN communities.  Several disconnected (stale) sessions that cannot be discarded.  I found script to clear web_api sessions SK113955, but need to clear old user connections:

error when installing Jumbo:
The package failed to install

Reason of failure: Internal error when running hook:

pre_r80.10_upgrade_verifications.sh.  More information: Operation failed.  Publish or Discard all sessions an run operation again.  Administrators with open sessions: MyUserNameOtherAdminUserName

1 Solution

Accepted Solutions
Melissa_Kjendle
Explorer

View:

#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');"

Clear:

# mgmt_cli discard --port 4434 uid 4b2ac7a8-9b0b-4e39-a3f0-4c065d631cdf
Username: admin
Password:
number-of-discarded-changes: 2
message: "OK"

View solution in original post

(1)
6 Replies
PhoneBoy
Admin
Admin

You should be able to clear these sessions in SmartConsole as well.

Go to Manage & Settings > Sessions > View Sessions

Hugo_vd_Kooij
Advisor

You may still have open sessions in the database which you can't find in the GUI.

I have had a TAC case for this and got some query commands to find them. Unfortunatly I can't find them in my own notes or in Secure Knowledge.

If you still have the issue and no session listed in the GUI then it is time to open a TAC case.

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
0 Kudos
Melissa_Kjendle
Explorer

View:

#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');"

Clear:

# mgmt_cli discard --port 4434 uid 4b2ac7a8-9b0b-4e39-a3f0-4c065d631cdf
Username: admin
Password:
number-of-discarded-changes: 2
message: "OK"

(1)
Robert_Decker
Advisor

Well done!

In addition, there is a python script based on management API SDK - 

https://github.com/CheckPointSW/cp_mgmt_api_python_sdk

Look at "discard_sessions" sample.

Robert.

Ron_Izraeli
Employee
Employee

Check out SmartConsole Extensions platform to integrate this script as a web page inside SmartConsole

0 Kudos
Danny
Champion Champion
Champion

I found scriptable solutions to discard sessions in sk133872 and sk113955.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events