[Apiman-user] Any expiry settings for Clients ?
Ashish Patel
ashish.patel at futuregroup.in
Sat Aug 12 09:01:20 EDT 2017
Thanks Marc.
Sorry for late reply on below thread as I was travelling.
When you explicitly inspected the apiman_gateway index in ES, were the records you expected missing? [Ashish] Didn't check at that time, will check next time it occurs.
There's certainly no functionality in Apiman that expires/auto-deletes Client Apps [Ashish] Thanks, then it could be a bug where I have to find the reproducible steps.
- Could you be running some scripts that auto-retire records or data in your ES cluster?
- Is some other part of your system retiring those resources (i.e. not Apiman but some script you've written)
[Ashish]: Both of above question's answer is No. We don't have any scripts running in system.
Thanks & Regards,
Ashish Patel
-----Original Message-----
From: Marc Savy [mailto:marc.savy at redhat.com]
Sent: Thursday, August 10, 2017 17:51
To: Ashish Patel
Cc: apiman-user at lists.jboss.org; Jakub Cechacek; Miroslav Jaros
Subject: Re: [Apiman-user] Any expiry settings for Clients ?
When you explicitly inspected the apiman_gateway index in ES, were the records you expected missing?
There's certainly no functionality in Apiman that expires/auto-deletes Client Apps, and I'm not aware of any other community users (most of whom are using ES, I think) experiencing this problem.
A few thoughts:
- Could you be running some scripts that auto-retire records or data in your ES cluster?
- Is some other part of your system retiring those resources (i.e. not Apiman but some script you've written)
I've added in Miro & Jakub to see whether they have any thoughts with their QE experience.
On 10 August 2017 at 11:19, Ashish Patel <ashish.patel at futuregroup.in> wrote:
> Thanks Marc.
>
> Yes I can see apiman_gateway index there. It's QA setup so using embedded ES/KeyCloak. Another update is Issue doesn't go after restarting services.
>
> Thanks & Regards,
> Ashish Patel
> (M) +91 93270 15128
>
>
> -----Original Message-----
> From: Marc Savy [mailto:marc.savy at redhat.com]
> Sent: Thursday, August 10, 2017 15:15
> To: Ashish Patel
> Cc: apiman-user at lists.jboss.org
> Subject: Re: [Apiman-user] Any expiry settings for Clients ?
>
> Correction:
>
>> and seeing whether the `apiman-gateway` index is there
>
> Should read:
>
>> and seeing whether the `apiman_gateway` index is there
>
> On 10 August 2017 at 10:43, Marc Savy <marc.savy at redhat.com> wrote:
>> It sounds like someone might have accidentally deleted your gateway's
>> indexes in Elasticsearch.
>>
>> Apiman Gateway and Apiman Manager have separate storage (even if you
>> use the same Elasticsearch instance, they have separate indices).
>>
>> I suggest looking into your ES instance (using a management tool like
>> elasticsearch-head might be helpful [1]) and seeing whether the
>> `apiman-gateway` index is there, and that it contains the entries you
>> expect.
>>
>> If you are feeling more adventurous, then you might try find the
>> following query useful[2]:
>>
>> curl -XGET '<YOUR_ELASTICSEARCH>:9200/apiman_gateway/_search?pretty'
>> -H 'Content-Type: application/json' -d'
>> {
>> "query": { "match_all": {} }
>> }
>> '
>>
>> Regards,
>> Marc
>>
>> [1] https://github.com/dzharii/awesome-elasticsearch
>> [2]
>> https://www.elastic.co/guide/en/elasticsearch/reference/current/_intr
>> o
>> ducing_the_query_language.html
>>
>> On 10 August 2017 at 10:18, Ashish Patel <ashish.patel at futuregroup.in> wrote:
>>> Hi,
>>>
>>>
>>>
>>> We recently faced a strange issue on our APIman setup (QA/UAT
>>> environment so far). Suddenly one by one (not all APIs yet) API
>>> Clients are complaining that they are getting below exception. Here,
>>> none of the Client details (register / unregister) changed under
>>> APIManUI and even though below exception. The fix we applied
>>> selectively is, break any one API from client and add the same again
>>> through “New Contract” -> it will enable the “Re-Register” button ->
>>> click it and issue is resolved. This leads me to think, is there any
>>> Client API expiry settings – after which we have to re-register the client ? OR am I missing something here ?
>>>
>>>
>>>
>>> Any help is greatly appreciated.
>>>
>>>
>>>
>>> App Server: Wildfly 10.0.0-Final
>>>
>>> APIMan: 1.2.7.Final
>>>
>>> OS: Ubuntu
>>>
>>>
>>>
>>> Exception:
>>>
>>>
>>>
>>> [apiResponse] => Array
>>>
>>> (
>>>
>>> [responseCode] => 500
>>>
>>> [message] => No client found for API Key
>>> 9c561c16-e866-44fe-b5d6-c11c5629f0d6
>>>
>>> [trace] =>
>>> io.apiman.gateway.engine.beans.exceptions.InvalidContractException:
>>> No client found for API Key 9c561c16-e866-44fe-b5d6-c11c5629f0d6
>>>
>>> at
>>> io.apiman.gateway.engine.es.CachingESRegistry.getContract(CachingESR
>>> e
>>> gistry.java:78)
>>>
>>> at
>>> io.apiman.gateway.engine.impl.SecureRegistryWrapper.getContract(Secu
>>> r
>>> eRegistryWrapper.java:154)
>>>
>>> at
>>> io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.execute(ApiRequ
>>> e
>>> stExecutorImpl.java:357)
>>>
>>> at
>>> io.apiman.gateway.platforms.servlet.GatewayServlet.doAction(GatewayS
>>> e
>>> rvlet.java:179)
>>>
>>> at
>>> io.apiman.gateway.platforms.servlet.GatewayServlet.service(GatewaySe
>>> r
>>> vlet.java:79)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>>
>>> at
>>> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHan
>>> d
>>> ler.java:85)
>>>
>>> at
>>> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.han
>>> d
>>> leRequest(ServletSecurityRoleHandler.java:62)
>>>
>>> at
>>> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest
>>> (
>>> ServletDispatchingHandler.java:36)
>>>
>>>
>>>
>>>
>>>
>>> Thanks & Regards,
>>>
>>> Ashish Patel
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Apiman-user mailing list
>>> Apiman-user at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>>
>
> _______________________________________________
> Apiman-user mailing list
> Apiman-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/apiman-user
More information about the Apiman-user
mailing list