Developer Community

This community is currently in a read-only state due to a maintenance window. For more info click here
Reply
Highlighted
Frequent Contributor I

ArubaOS Switch - Error 503 - too many REST sessions

Hey Friends!

 

Is there a way to reset the REST session count or change the limit for ArubaOS Switch?

 

I just started to play around with python and the REST API and after a few tries I'm getting Error 503

 

Thanks,

Sven


Sven - AMFX #35

Accepted Solutions
Highlighted

Re: ArubaOS Switch - Error 503 - too many REST sessions

Hi,

 

The sessions limit is set to 5 simultaneous sessions, and it can't be changed.

 

In order to reset your sessions on the switch, you can do a :

1. no rest-interface

2. rest-interface

 

Resetting the Rest Interface will also reset your REST sessions.

Or as you said, you call also play with the session timeout.

View solution in original post


All Replies
Highlighted
Frequent Contributor I

Re: ArubaOS Switch - Error 503 - too many REST sessions

Idle timeout seems to be defaulted to 120 seconds


Sven - AMFX #35
Highlighted

Re: ArubaOS Switch - Error 503 - too many REST sessions

Hi,

 

The sessions limit is set to 5 simultaneous sessions, and it can't be changed.

 

In order to reset your sessions on the switch, you can do a :

1. no rest-interface

2. rest-interface

 

Resetting the Rest Interface will also reset your REST sessions.

Or as you said, you call also play with the session timeout.

View solution in original post

Highlighted
MVP Guru Elite

Re: ArubaOS Switch - Error 503 - too many REST sessions


@dregoriuss wrote:

Idle timeout seems to be defaulted to 120 seconds


It is no 300seconds by default ?

You can use rest/v4/session-idle-timeout for change this (the max value is 7200)



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
Frequent Contributor I

Re: ArubaOS Switch - Error 503 - too many REST sessions

Thanks!

Can I have more sesssion if I reuse the session/authentication cookie or is this a total of max 5 sessions?


Sven - AMFX #35
Highlighted
MVP Guru Elite

Re: ArubaOS Switch - Error 503 - too many REST sessions

it is max 5 sessions (or cookie)

but you can reuse session (and it is recommanded...)



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted

Re: ArubaOS Switch - Error 503 - too many REST sessions

When you open a session, you get a cookie from the switch.

So reuse it for all your requests in your script, and don't forget to close your session once you're done.

 

If you're using Python, don't forget to use the try/except/finally blocks in your script - it will avoid to use a new session each time you relaunch your switch because your previous test failed.

Highlighted
Occasional Contributor I

Re: ArubaOS Switch - Error 503 - too many REST sessions

Is there an equivalent for Aruba CX? I am troubleshooting an issue and the session keeps reaching the max which is frustrating. I guess the code isn't closing the session properly and so it's an infinite loop of frustration while debugging.

Highlighted

Re: ArubaOS Switch - Error 503 - too many REST sessions

Hi,

 

Yes, you can use the following command :

switch-cx# https-server session close all

 

It will close all the sessions already opened through HTTPS. 

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: