cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7458
Views
28
Helpful
11
Replies

ISE 1.2 removing stale/ all sessions

ml
Level 1
Level 1

Hi all,

does somebody have an idea how to remove stale all sessions from ISE (all nodes)?

I have tried to follow the document , but when logging to primary admin node (HA setup,its has all 3 functions: ADM (pri), MNT (pri), PSN) commends recommended do not work:

curl -X DELETE https://<mntnode>/ise/mnt/Session/Delete/MACAddress/<macaddress>

curl -X DELETE https://<mntnode>/ise/mnt/Session/Delete/SessionID/<sid#>

curl -X DELETE https://<mntnode>/ise/mnt/Session/Delete/All

isetest/admin# curl -X DELETE https://<IP>/ise/mnt/Session/Delete/All

                ^

% invalid command detected at '^' marker.

isetest/admin# curl ?

% invalid command

isetest/admin# curl

                ^

% invalid command detected at '^' marker.

isetest/admin#

Thanks for advise.

11 Replies 11

Tarik Admani
VIP Alumni
VIP Alumni

Hi,

The curl commands is to be used from a different server and not run locally.

Thanks,

Tarik Admani
*Please rate helpful posts*

The document states that you should "Log in to the target Monitoring node from the command line" but doesn't explain how I do that.

Can someone explain that to me?

Ravi Singh
Level 7
Level 7

Curl commands always works  form a different server. Try the same with different server.

Andre Liverod
Level 1
Level 1

I also have this problem now, when you guys say a different server, do you mean a linux box that has the curl command? Because running this from another ISE server does not work at all. 

Yes, set up a linux-server or something equal with curl installed, then you can use the curl commands. Also, you can type in the url in a web browser (eg. https://yourmntnode/ise/mnt/Session/Delete/MACAddress/<macaddress>) and issue the commands that way without the need of an extra server.

hi Jimmy,

as you mentioned i tried in Web Browser, ActiveList and ActiveCount working fine but when i try to Delete session or all sessions its not working. its giving me error "HTTP Status 404 - Resource not found"

Note: ISE version 1.4

could you please help me.

 

 

I've also tried to run the command in a web browser and get the following error:

 

HTTP Status 401 - Logged-in Administrator is Unauthorized to access REST API

Hello,

It seems like the account you used while making the API-call is lacking the correct priviliges. Please check the account's priviliges and make sure you are using an account that is allowed to make API-calls.

Hi Shaik,

Have your problem been solved? It seems like the correct URI for making the Delete-call in version 1.4 is: 

https://<mntnode>/admin/API/mnt/Session/Delete/MACAddress/<madaddress>

It has changed a bit from version 1.2 and hopefully that's your problem because it seems like you're making a call for a function that doesn't exist.

Thank you for replying. I've gotten further but now get this message using the above link:

 

XML Parsing Error: no element found
Location: https://<mntIPAddress>/admin/API/mnt/Session/Delete/MACAddress/00:60:B3:FB:8C:5D
Line Number 1, Column 1:

 

Thoughts?

I finally got this working if anyone is interested. From my MacBook terminal I ran the following command:

 curl -u admin1 -k -X DELETE https://<mntnode>/admin/API/mnt/Session/Delete/MACAddress/<macaddress>

 

It prompted me for the password of the user "admin1" and deleted the MAC.  You can also clear a specific session or delete all MAC addresses. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: