cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post

clear disconnected sessions?

Jump to solution

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

Re: clear disconnected sessions?

Jump to solution

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

6 Replies
Admin
Admin

Re: clear disconnected sessions?

Jump to solution

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

Go to Manage & Settings > Sessions > View Sessions

0 Kudos

Re: clear disconnected sessions?

Jump to solution

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.

0 Kudos

Re: clear disconnected sessions?

Jump to solution

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

Employee++
Employee++

Re: clear disconnected sessions?

Jump to solution

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.

Employee+
Employee+

Re: clear disconnected sessions?

Jump to solution

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

0 Kudos
Danny
Pearl

Re: clear disconnected sessions?

Jump to solution

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

0 Kudos