Developer Community

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
Frequent Contributor I

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

Idle timeout seems to be defaulted to 120 seconds


Sven - AMFX #35

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.

MVP Expert

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




ACMP 6.4 / ACMX #107 / ACCP 6.5
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
MVP Expert

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




ACMP 6.4 / ACMX #107 / ACCP 6.5

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.

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