Service Unavailable while invoke rest url
Hi. I am learning create Rest service with Cache. From this repo. https://github.com/intersystems-ru/REST
I created new web application from Web Applications section in Management Portal. Such as screenshot. In browser call http://127.0.0.1:57772/rest/test . But got "Service Unavailable" 503 response. Could you please help?
Post your isc.REST code.
Your web app config looks ok, but you need to check that:
My, isc.REST code at below. UnkownUser is enabled. I just download Evaluation edition. Not, production edition. So, just trial. Is it obstacle for it?
/// Class for REST-like web api.<br>
/// Logic related to request processing goes here.
Class isc.REST Extends isc.AbstractREST
{
XData UrlMap
{
<Routes>
<!-- Test method-->
<Route Url="/test" Method="GET" Call="Test"/>
<Route Url="/logout" Method="GET" Call="Logout"/>
</Routes>
}
/// End session
ClassMethod Logout() As %Status
{
#dim %session As %CSP.Session
set st = %session.Logout(1)
set %session.EndSession = 1
return st
}
/// Test method, outputs <b>%request</b>, <b>%response</b> and <b>%session</b> objects.
ClassMethod Test() As %Status
{
write "{""Status"": ""OK""}"
return $$$OK
}
}
I solved problem. But it also weird. When studio is open it returns "Service Unavailable" in browser, but when close studio it works OK.
So, it means that you don't have licence, and you have only one license unit available. You have activate licence to get it worked together.
Yes, sometimes the license restrictions that apply to evaluation of a downloaded copy of Cache (i.e. without having contacted InterSystems for a loan key) lead to opaque and unfortunate failures that may give the impression that the product isn't worth the effort.
if we can not allocate a license for a REST call/request we report a "503 Service unavailable" error by default.
Please note: Studio, Terminal and SMP allocates a license-slot. Every unauthenticated REST request will retain a license-slot for at least 10 sec. after request is finished.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue