09-19-2017 02:26 PM
We have Cisco Prime 3.0. When my Java client code is making the following REST API calls it sometimes returns 401 from the http request.
Requesting Device data:
/webacs/api/v1/data/Devices?productFamily=notStartsWith%28%22Third+Party%22%29&.full=true&softwareType=%22ASA%22&.maxResults=1000&.firstResult=0
Requesting the unsanitized device config:
/webacs/api/v1/op/configArchiveService/extractUnsanitizedFile?fileId=223224
I have added the "Connection:close" to the http request header as mentioned in the FAQ, but still getting the 401 error code.
Is there another setting I can change? I also have the following in my nbi.properties file on the Cisco Prime server:
nbi.rateLimit.totalRequestThreshold=20
nbi.rateLimit.perUserThreshold=-1
nbi.rateLimit.maxConcurrentQueries=20
nbi.rateLimit.maxAllUserConcurrentQueries=45
nbi.rateLimit.limitPageSize=1000
Thanks,
Eddy
09-19-2017 04:06 PM
So, there are three general reasons for 401 errors.
09-22-2017 08:27 AM
Hi Spencer,
Regarding concurrent session limit reach. Is it possible to increase from the 5 active session limit at once for a given user in Cisco 3.0 and 3.1?
I am doing a netstat -an | grep <java client ip address> on the Cisco Prime server to see all the TCP connections states for my Java client making HTTP REST API calls to the Cisco Prime server. Is this a good way to determine how many concurrent sessions for a user are being used between my Java Client and Cisco Prime? In my tests with my Java client I am using the same user.
When making a HTTP REST API call in my Java client, is a new session created each time since I have to pass the username and password in the header of the HTTP GET request each time? Or is the new session only created when adding the connection:close to the HTTP header? If the connection:close is not issued then I would have to wait for the server to time out the connection which could result in a large number of sessions opened? I am also using the HttpClient class to make my HTTP GET requests in my Java client. Is my understanding correct?
I am not clear of the definition of a session. Are sessions and the TCP connection viewed in the netstat -an command considered the same?
Thanks for all your help!!