2016-07-12 10 views
0

Ich versuche, APIMAN mit Docker-Compose eine externe Elastic Search-Datenbank zu verbinden. Ich habe einige Probleme (siehe Protokollausgabe unten). Hier sind die Konfigurationen:Verbinden von APIMAN mit einer externen ElasticSearch-Datenbank für Metriken

-apiman.properties

apiman.es.protocol=http 
apiman.es.host=MY_MACHINE_HOST 
apiman.es.port=9200 
apiman.es.username=elasticsearch 
apiman.es.password= 
apiman.es.timeout=10000 

apiman-manager.metrics.type=es 
apiman-manager.metrics.es.client-factory= 
apiman-manager.metrics.es.protocol=${apiman.es.protocol} 
apiman-manager.metrics.es.host=${apiman.es.host} 
apiman-manager.metrics.es.port=${apiman.es.port} 
apiman-manager.metrics.es.username=${apiman.es.username} 
apiman-manager.metrics.es.password=${apiman.es.password} 
apiman-manager.metrics.es.timeout=${apiman.es.timeout} 

ETC... 

-und die Protokolle

ERROR [io.undertow.request] (default task-28) UT005023: Exception handling request to /apiman/organizations/test/apis/test/versions/1.0/metrics/planUsage: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: java.lang.IllegalArgumentException: name is empty 
    at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) 
    at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) 
    at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:168) 
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:411) 
ETC... 

Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: name is empty 
    at io.apiman.manager.api.war.WarCdiFactory.provideMetricsESClientFactory(WarCdiFactory.java:255) 
    at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) 
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78) 
    at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:99) 
    at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161) 
ETC... 

Caused by: java.lang.IllegalArgumentException: name is empty 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:344) 
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) 

Und hier ist die Docker-compose Konfiguration:

apiman: 
    build: ./docker/apiman/ 
    links: 
    - elastic:elastic 
    ports: 
    - "8060:8080" 
    - "8443:8443" 
elastic: 
    image: elasticsearch 
    ports: 
    - "9200:9200" 

Bin ich tun etwas stimmt nicht ? Jede Hilfe würde sehr geschätzt werden.

Antwort

1

Versuchen Sie apiman-manager.metrics.es.client-factory= auskommentiert zu lassen, sonst versuchen Sie den Standard mit einer leeren Zeichenfolge (oder einer anderen nicht vorhandenen Sache) zu überschreiben.

+1

Danke für den Tipp. Es klappt! –