Developer

last person joined: 8 days ago 

Expand all | Collapse all

ArubaOS Switch - Error 503 - too many REST sessions

This thread has been viewed 16 times
  • 1.  ArubaOS Switch - Error 503 - too many REST sessions

    Posted Oct 29, 2018 08:38 AM

    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



  • 2.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    Posted Oct 29, 2018 08:41 AM

    Idle timeout seems to be defaulted to 120 seconds



  • 3.  RE: ArubaOS Switch - Error 503 - too many REST sessions
    Best Answer

    EMPLOYEE
    Posted Oct 29, 2018 12:08 PM

    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.



  • 4.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    Posted Oct 31, 2018 04:51 AM

    Thanks!

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



  • 5.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    MVP GURU
    Posted Oct 31, 2018 05:03 AM

    it is max 5 sessions (or cookie)

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



  • 6.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    EMPLOYEE
    Posted Oct 31, 2018 05:48 AM

    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.



  • 7.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    Posted Jun 24, 2020 01:38 AM

    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.



  • 8.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    EMPLOYEE
    Posted Jun 24, 2020 02:35 AM

    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. 



  • 9.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    Posted Oct 13, 2023 11:12 AM

    Thanks for this solution which worked fine for me!

    But my error was bit different so I'm going to add it here:

    Switch: 2x Aruba 3810M-24G-1-slot Switch (JL071A) in a stack

    Firmware. KB.16.11.0008

    I've disabled and re-enable the webinterface with these commands:

    no web-management
    web-management

    After this the web management was unaccessible even after rebooting - the error was always:

    503 Service Unavailable The server is currently busy. Please try again later

    But the hint was the message when disableling the web management:

    So I've resetted the REST interface with your commands

    no rest-interface
    rest-interface

    and the web interface was immediatly fine.

    So thanks again!




  • 10.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    MVP GURU
    Posted Oct 24, 2023 04:06 PM

    a good idea it is also to always close the session for avoid this issue :)



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

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

    PowerArubaCL: Powershell Module to use Aruba Central

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

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 11.  RE: ArubaOS Switch - Error 503 - too many REST sessions

    MVP GURU
    Posted Oct 30, 2018 10:49 AM

    @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)