[Apiman-user] Production guide

Eric Wittmann eric.wittmann at redhat.com
Thu Sep 17 08:03:44 EDT 2015


Marc is currently working on an export/import feature that should solve 
the use-case of backing up and restoring.

There is currently no way to force a re-publish of a service, so if you 
back up your DB but not the data in Elastic, you'll have a problem.

I am planning on adding such a feature (force a re-publish) but it 
doesn't exist yet.

-Eric

On 9/16/2015 3:02 PM, Fadi Abdin wrote:
> Well , I have seen an issue sometimes where the service is not available
> anymore in the gateway check issue label "Failing Service" on this
> mailing list :
>
> basically i get this exception below but if i change the version number
> it works fine .
>
> The other use-case , is where i backup my database and load it again ,
> how do i publish everything again ?
>
>
>
>
>
> io.apiman.gateway.engine.beans.exceptions.InvalidServiceException:
> Service not found.
>
> 	at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$3.handle(ServiceRequestExecutorImpl.java:261)
> 	at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$3.handle(ServiceRequestExecutorImpl.java:255)
> 	at io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:107)
> 	at io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:97)
> 	at io.apiman.gateway.engine.es.ESRegistry$10.completed(ESRegistry.java:415)
> 	at io.apiman.gateway.engine.es.ESRegistry$10.completed(ESRegistry.java:407)
> 	at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:195)
> 	at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:178)
> 	at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
> 	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
> 	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:412)
> 	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:305)
> 	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:267)
> 	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
> 	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
> 	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:116)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:317)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590)
> 	at java.lang.Thread.run(Thread.java:745)
>
>
>
> On Wed, Sep 16, 2015 at 2:53 PM, Eric Wittmann <eric.wittmann at redhat.com
> <mailto:eric.wittmann at redhat.com>> wrote:
>
>     Hi Fadi.
>
>     You are right - the API Gateway stores its configuration in
>     elasticsearch (by default).  This is a persistent data store, so
>     barring some sort of catastrophic crash resulting in data loss in
>     the Gateway, you shouldn't need to force a resync between the API
>     Manager and the API Gateway.
>
>     Perhaps I have misunderstood your question. :)
>
>     -Eric
>
>
>     On 9/16/2015 2:10 PM, Fadi Abdin wrote:
>
>         Hi Eric,
>
>         I have been following your documentation for production setup
>         http://www.apiman.io/latest/production-guide.html# ..
>         and it worked successfully. i want to clarify something.
>
>         Now i have API Manager data stored in the apiman database , which is
>         great , i can copy it and all that .. but from how i see , when you
>         publish an api , it will be published to the gateway and the gateway
>         stores the data in elastic search !! ? I might be missing something.
>
>         How do i force a refresh from the apiman to gateway ? or do i
>         need to
>         clear elastic search data !
>
>         Sorry if i completely missunderstand something.
>
>         Thanks,
>         Fadi
>
>


More information about the Apiman-user mailing list