Steve Pisani · Apr 19, 2016

Disabled/Re-enabled REST interface stops working

Starting off with a working REST interface, I can access the CSP Application definition screen for the application  (System > Security Management > Web Applications > Edit Web Application), and "turn off" the application by clearing the Enabled: [ x ] Application checkbox. From then on my REST calls return an HTTP 404 error. (That's expected).

However - one expects that re-enabling the Application in the CSP Application screen, would return my REST services to a working state, however, this is not happening.  All REST requests continue to return an HTTP 404 error.

SOLVED: I have solved this clearing the CSP Gateway cache, that is, by accessing the CSP Gateway Management pages, selected System Status, then, located the REST URLs from the Cached Forms column, and clearing this row.  Once cleared, my REST services work fine again.

(I noticed that the URL appears as a cached item, only once the CSP application has been disabled and not whilst the REST services are functioning).

Although I have my solution, I'm wondering if this is expected behaviour.

Thanks - 


0 386
Discussion (5)1
Log in or sign up to continue

I just restart webserver/Cache when I encounter problems after web application configuration changes. It often helps.

Sure, that is a valid solution for a developer or test system. But we definitely need something better for production usage.

There is rarely a need to modify web application config in production.

Hm, interesting. So what this basically means is that the 404 page gets cached when a URL is requested and it is not available. Re-enabling the REST application does not clear that cache and that is the reason why the REST application does not work for the URLs that have the 404 cached when it's enabled again.

Automatically clearing the cache for a REST application is not trivial, as it does not translate to a single URL. I will check back with the developers and see what we can do about this.

We are working on a solution for this. We plan to automatically clear the cache of the base URL path and associated subpaths in the CSP Gateway for REST enabled CSP applications after the application got enabled.