[Apiman-user] export/import data config in apiman

Marc Savy marc.savy at redhat.com
Wed Nov 21 08:36:44 EST 2018


Hmm, that error looks like corruption of some sort. How often does it
happen?

On Mon, 24 Sep 2018 at 16:59, Balu S <sbalu27 at gmail.com> wrote:

> Hi Marc,
>
> Thanks for your reply.  If I republish the API, then it works. But if I
> have 100s of API, then it seems a quite a work.
> I wish this can be auto registered when using export/import.
>
> FYI, I noticed an old exception (which did not occur in 1.3.1) version
> when loading the custom plugin. It looks like it is related to snapshot
> versions.
> I shall check further.
>
> 2018-09-24 16:16:57,376 ERROR [org.jboss.msc.service.fail] (ServerService
> Thread Pool -- 82) MSC000001: Failed to start service
> jboss.undertow.deployment.default-server.default-h
> ost./apiman-gateway-api: org.jboss.msc.service.StartException in service
> jboss.undertow.deployment.default-server.default-host./apiman-gateway-api:
> java.lang.RuntimeException: ja
> va.lang.RuntimeException: java.lang.Exception: Invalid plugin file at:
> /data/wildfly-11.0.0.Final/standalone/data/apiman/plugins/org.test/apiman-custom-failure/0.0.1-SNAPSHO
> T/apimancustom-failure.war/plugin.war
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
>         at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> java.lang.Exception: Invalid plugin file at:
> /data/wildfly-11.0.0.Final/standalone/data/apiman/plugins/org.test/apiman-custom-failure/0.0.1-SNAPSHOT/apiman-custom-failure.war/plugin.war
>         at
> io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:241)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
>         ... 6 more
> Caused by: java.lang.RuntimeException: java.lang.Exception: Invalid plugin
> file at:
> /data/wildfly-11.0.0.Final/standalone/data/apiman/plugins/org.test/apiman-custom-failure/
> 0.0.1-SNAPSHOT/apiman-custom-failure.war/plugin.war
>         at
> io.apiman.gateway.platforms.war.WarEngineConfig.loadConfigClass(WarEngineConfig.java:314)
>         at
> io.apiman.gateway.platforms.war.WarEngineConfig.getPolicyFailureWriterClass(WarEngineConfig.java:212)
>         at
> io.apiman.gateway.platforms.war.WarGateway.loadFailureFormatter(WarGateway.java:70)
>         at
> io.apiman.gateway.platforms.war.WarGateway.init(WarGateway.java:56)
>         at
> io.apiman.gateway.platforms.war.listeners.WarGatewayBootstrapper.contextInitialized(WarGatewayBootstrapper.java:42)
>         at
> io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
>         at
> io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:205)
>         at
> io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174)
>         at
> io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
>         at
> io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
>         at
> org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>         at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>         at
> io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
>         ... 8 more
> Caused by: java.lang.Exception: Invalid plugin file at:
> /data/wildfly-11.0.0.Final/standalone/data/apiman/plugins/org.test/apiman-custom-failure/0.0.1-SNAPSHOT/apiman-custom
> -failure.war/plugin.war
>         at
> io.apiman.gateway.engine.impl.DefaultPluginRegistry.readPluginFile(DefaultPluginRegistry.java:309)
>         at
> io.apiman.gateway.engine.impl.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:246)
>         at
> io.apiman.gateway.platforms.war.WarEngineConfig.loadConfigClass(WarEngineConfig.java:311)
>         ... 23 more
>
>
> On Fri, Sep 21, 2018 at 4:40 PM Marc Savy <marc.savy at redhat.com> wrote:
>
>> Have you tried republishing those APIs and/or migrating the api_gateway
>> index?
>>
>> On 21 September 2018 at 15:04, Balu S <sbalu27 at gmail.com> wrote:
>> > Further to this email.
>> >
>> > The export/import tool provided in Apiman manager seems not complete.
>> After
>> > I have imported the apimanager configuration to new environment using
>> the
>> > tool, accessing the public API URL gives below error. It tries to check
>> the
>> > existence of API in the Elasticsearch. But the import/export tool never
>> > imports anything to ES index.
>> >
>> > Does it mean we have to explicitly migrate the existing ES index to new
>> ES
>> > server ?
>> >
>> > io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException: API not
>> > found.
>> >         at
>> >
>> io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.lambda$execute$5(ApiRequestExecutorImpl.java:340)
>> >         at
>> >
>> io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:123)
>> >         at
>> >
>> io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:112)
>> >         at
>> > io.apiman.gateway.engine.es
>> .CachingESRegistry.getApi(CachingESRegistry.java:117)
>> >
>> >
>> > On Tue, Sep 18, 2018 at 12:38 PM Balu S <sbalu27 at gmail.com> wrote:
>> >>
>> >> Hi Eric, Marc,
>> >>
>> >> I have used this export/import option in Apiman to migrate data from
>> 1.3
>> >> to 1.5.1 version.The tools works fine and I can see the apis, policies
>> and
>> >> client apps, users are created in migrated environment.
>> >>
>> >> However if I notice, there are some config information stored in
>> >> Elasticsearch under the index apiman_gateway. There are like 21
>> records for
>> >> this index in Kibana. These data seems to resemble the client and api
>> >> information.
>> >>
>> >> What are these data ? Is the exported "api manager"data different from
>> >> "apiman gateway" data ? If so why are these not migrated using
>> export/import
>> >> utility ?
>> >>
>> >> Thanks for reading my post.
>> >>
>> >> Best regards
>> >> Balu.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20181121/6fd76d8c/attachment-0001.html 


More information about the Apiman-user mailing list