Developer

last person joined: 3 days ago 

Expand all | Collapse all

ArubaOS Switch - Error 503 - too many REST sessions

Jump to Best Answer
  • 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

    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

    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

    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

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