apiman: Elastic configuration problems
Hi! I have some problems with Elastic configuration. Apiman version is 2.0.0.Final.
After start I had No IRegistry class configured error.
apiman.properties:
apiman.plugins.repositories=https://repo1.maven.org/maven2/,http://repository.jboss.org/nexus/content/groups/public/
apiman-manager.plugins.registries=https://rawgit.com/apiman/apiman-plugin-registry/master/registry.json
apiman-manager.config.logger=standard
apiman-gateway.jdbc.jndi-location=java:jboss/datasources/apiman-gateway
apiman.es.protocol=http
apiman.es.host=127.0.0.1
apiman.es.port=30000
apiman.es.username=apiman
apiman.es.password=apiman
apiman.es.timeout=10000
apiman.es.initialize=true
apiman.hibernate.connection.datasource=java:jboss/datasources/apiman-manager
apiman.hibernate.dialect=io.apiman.manager.api.jpa.ApimanMySQL5Dialect
apiman.hibernate.hbm2ddl.auto=validate
apiman-manager-ui.api.authentication.type=bearerToken
apiman-manager-ui.api.authentication.token.generator=io.apiman.manager.ui.server.kc.KeyCloakBearerTokenGenerator
apiman-manager.security-context.type=keycloak
apiman-manager.config.features.org-create-admin-only=false
apiman-manager-ui.org-create-admin-only=false
apiman-manager.config.features.rest-response-should-contain-stacktraces=false
apiman-manager.storage.type=jpa
apiman-manager.storage.jpa.initialize=true
# API Manager metrics settings.
apiman-manager.metrics.type=es
apiman-manager.metrics.es.client.type=jest
apiman-manager.metrics.es.client.protocol=${apiman.es.protocol}
apiman-manager.metrics.es.client.host=${apiman.es.host}
apiman-manager.metrics.es.client.port=${apiman.es.port}
apiman-manager.metrics.es.client.username=${apiman.es.username}
apiman-manager.metrics.es.client.password=${apiman.es.password}
apiman-manager.metrics.es.client.timeout=${apiman.es.timeout}
apiman-manager.api-catalog.type=io.apiman.manager.api.core.catalog.JsonApiCatalog
apiman-manager.api-catalog.catalog-url=https://rawgit.com/apiman/apiman-api-catalog/master/catalog.json
apiman-gateway.plugin-registry=io.apiman.gateway.engine.impl.DefaultPluginRegistry
apiman-gateway.plugin-registry.pluginsDir=${jboss.server.data.dir}/apiman/plugins
apiman-gateway.plugin-registry.pluginRepositories=${apiman.plugins.repositories}
apiman-gateway.connector-factory=io.apiman.gateway.platforms.servlet.connectors.HttpConnectorFactory
apiman-gateway.policy-factory=io.apiman.gateway.engine.policy.PolicyFactoryImpl
apiman-gateway.policy-factory.reloadSnapshots=false
apiman-gateway.logger-factory=io.apiman.common.logging.impl.NoOpLoggerFactory
apiman-gateway.components.IPolicyFailureFactoryComponent=io.apiman.gateway.platforms.servlet.PolicyFailureFactoryComponent
apiman-gateway.components.IBufferFactoryComponent=io.apiman.gateway.engine.impl.ByteBufferFactoryComponent
apiman-gateway.writers.error=io.apiman.gateway.engine.impl.TracePolicyErrorWriter
apiman-gateway.connector-factory.http.timeouts.read=30
apiman-gateway.connector-factory.http.timeouts.write=30
apiman-gateway.connector-factory.http.timeouts.connect=10
apiman-gateway.connector-factory.http.followRedirects=true
apiman-gateway.metrics=io.apiman.gateway.engine.es.ESMetrics
apiman-gateway.metrics.client.type=jest
apiman-gateway.metrics.client.protocol=${apiman.es.protocol}
apiman-gateway.metrics.client.host=${apiman.es.host}
apiman-gateway.metrics.client.port=${apiman.es.port}
apiman-gateway.metrics.client.username=${apiman.es.username}
apiman-gateway.metrics.client.password=${apiman.es.password}
apiman-gateway.metrics.client.timeout=${apiman.es.timeout}
apiman-gateway.metrics.client.initialize=${apiman.es.initialize}
apiman-gateway.connector-factory.tls.devMode=true
apiman-gateway.registry=io.apiman.gateway.engine.es.PollCachingESRegistry
apiman-gateway.registry.client.type=jest
apiman-gateway.registry.client.protocol=${apiman.es.protocol}
apiman-gateway.registry.client.host=${apiman.es.host}
apiman-gateway.registry.client.port=${apiman.es.port}
apiman-gateway.registry.client.username=${apiman.es.username}
apiman-gateway.registry.client.password=${apiman.es.password}
apiman-gateway.registry.client.timeout=${apiman.es.timeout}
apiman-gateway.registry.client.initialize=${apiman.es.initialize}
apiman-gateway.components.ISharedStateComponent=io.apiman.gateway.engine.impl.ESSharedStateComponent
apiman-gateway.components.ISharedStateComponent.client.type=jest
apiman-gateway.components.ISharedStateComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.ISharedStateComponent.client.host=${apiman.es.host}
apiman-gateway.components.ISharedStateComponent.client.port=${apiman.es.port}
apiman-gateway.components.ISharedStateComponent.client.username=${apiman.es.username}
apiman-gateway.components.ISharedStateComponent.client.password=${apiman.es.password}
apiman-gateway.components.ISharedStateComponent.client.timeout=${apiman.es.timeout}
apiman-gateway.components.ISharedStateComponent.client.initialize=${apiman.es.initialize}
apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.impl.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=jest
apiman-gateway.components.IRateLimiterComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.IRateLimiterComponent.client.host=${apiman.es.host}
apiman-gateway.components.IRateLimiterComponent.client.port=${apiman.es.port}
apiman-gateway.components.IRateLimiterComponent.client.username=${apiman.es.username}
apiman-gateway.components.IRateLimiterComponent.client.password=${apiman.es.password}
apiman-gateway.components.IRateLimiterComponent.client.timeout=${apiman.es.timeout}
apiman-gateway.components.IRateLimiterComponent.client.initialize=${apiman.es.initialize}
apiman-gateway.components.ICacheStoreComponent=io.apiman.gateway.engine.es.ESCacheStoreComponent
apiman-gateway.components.ICacheStoreComponent.client.type=jest
apiman-gateway.components.ICacheStoreComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.ICacheStoreComponent.client.host=${apiman.es.host}
apiman-gateway.components.ICacheStoreComponent.client.port=${apiman.es.port}
apiman-gateway.components.ICacheStoreComponent.client.username=${apiman.es.username}
apiman-gateway.components.ICacheStoreComponent.client.password=${apiman.es.password}
apiman-gateway.components.ICacheStoreComponent.client.timeout=${apiman.es.timeout}
apiman-gateway.components.ICacheStoreComponent.client.initialize=${apiman.es.initialize}
io.apiman.gateway.engine.components.IExecuteBlockingComponent=io.apiman.gateway.engine.impl.DefaultExecuteBlockingComponent
apiman-gateway.components.IJdbcComponent=io.apiman.gateway.engine.impl.DefaultJdbcComponent
apiman-gateway.components.ILdapComponent=io.apiman.gateway.engine.impl.DefaultLdapComponent
apiman-gateway.components.IHttpClientComponent=io.apiman.gateway.platforms.servlet.components.HttpClientComponentImpl
Error:
14:07:31,624 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 92) MSC000001: Failed to start service jboss.deployment.unit."apiman-gateway.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."apiman-gateway.war".undertow-deployment: java.lang.RuntimeException: java.lang.RuntimeException: No IRegistry class configured.
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Unknown Source)
at org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: No IRegistry class configured.
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:254)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
... 8 more
Caused by: java.lang.RuntimeException: No IRegistry class configured.
at deployment.apiman-gateway.war//io.apiman.gateway.platforms.war.WarEngineConfig.loadConfigClass(WarEngineConfig.java:282)
at deployment.apiman-gateway.war//io.apiman.gateway.platforms.war.WarEngineConfig.getRegistryClass(WarEngineConfig.java:95)
at deployment.apiman-gateway.war//io.apiman.gateway.engine.impl.ConfigDrivenEngineFactory.createRegistry(ConfigDrivenEngineFactory.java:97)
at deployment.apiman-gateway.war//io.apiman.gateway.engine.impl.AbstractEngineFactory.createEngine(AbstractEngineFactory.java:56)
at deployment.apiman-gateway.war//io.apiman.gateway.platforms.war.WarGateway.init(WarGateway.java:55)
at deployment.apiman-gateway.war//io.apiman.gateway.platforms.war.listeners.WarGatewayBootstrapper.contextInitialized(WarGatewayBootstrapper.java:42)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:217)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at org.wildfly.extension.undertow@20.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at io.undertow.servlet@2.1.3.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
... 10 more
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (16 by maintainers)
Ok, found it. I forgot to comment out the line:
apiman-manager.metrics.es.client.host=${apiman.es.host}I can confirm it works with your configuration for metrics, thanks! I am trying to reproduce my configuration mistake.
These issues should be fixed in the latest release that we hope to have out within the next week or so.
@kfeofantov Also you have to comment in the jpa lines that are not needed if you using elasticsearch.
You can find an example config here: https://github.com/apiman/apiman-community-quickstarts/blob/master/tomcat8/src/main/resources/overlay/conf/apiman.properties
Yes, we unified the wording across the implementation at some point.