Closed Nmaw closed 4 years ago
Hi @Nmaw
You may probably have to provide absolute path, or, at least, use the ${gravitee.home} in front of each value.
@brasseld thanks for advice.
Absolute path also do not solve.
I solved this issue. Parameter ${analytics.elasticsearch.ssl.keystore.keys} has string type and cannot be list type. Correct part gravitee.yml:
ssl: enabled: true keystore: type: pem certs: "config/ssl/es.pem" keys: "config/ssl/es.key"
Please fix your docs: installation-guide-repositories-elasticsearch
thanks for your feedback.
You can also push a Pull Request to fix the docs.
Cheers,
Thanks a lot
APIM and Gateway cannot find or read keys and certificate for connect to Elasticsearch cluster.
Logs
[APIM]
19:37:01.776 [graviteeio-node] INFO i.g.m.r.p.RepositoryPluginHandler - Repository [ANALYTICS] loaded by elasticsearch -- | 19:37:02.386 [graviteeio-node] WARN o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'analyticsRepository': Unsatisfied dependency expressed through field 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client': Invocation of init method failed; nested exception is io.vertx.core.VertxException: io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: /opt/graviteeio-management-api/${analytics.elasticsearch.ssl.keystore.keys} | 19:37:02.471 [graviteeio-node] ERROR i.g.p.c.i.PluginContextFactoryImpl - Unable to refresh plugin context | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'analyticsRepository': Unsatisfied dependency expressed through field 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client': Invocation of init method failed; nested exception is io.vertx.core.VertxException: io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: /opt/graviteeio-management-api/${analytics.elasticsearch.ssl.keystore.keys}
[Gateway]
22:30:11.798 [graviteeio-node] [] INFO i.g.n.p.s.h.ServicePluginHandler - Install plugin: sync [io.gravitee.gateway.services.sync.ScheduledSyncService] 22:30:11.824 [graviteeio-node] [] INFO i.g.n.p.s.h.ServicePluginHandler - Install plugin: hearbeat [io.gravitee.gateway.services.hearbeat.HeartbeatService] 22:30:11.842 [graviteeio-node] [] INFO i.g.p.c.internal.PluginEventListener - Installing REPORTER plugins... 22:30:11.842 [graviteeio-node] [] INFO i.g.n.r.plugin.ReporterPluginHandler - Install plugin: file [io.gravitee.reporter.file.FileReporter] 22:30:11.916 [graviteeio-node] [] INFO i.g.n.r.plugin.ReporterPluginHandler - Install plugin: elastic [io.gravitee.reporter.elasticsearch.ElasticsearchReporter] 22:30:12.056 [graviteeio-node] [] WARN o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.gravitee.reporter.elasticsearch.ElasticsearchReporter ': Unsatisfied dependency expressed through field 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpClient': Invocation of init method failed; nested exception is io.vertx.core.VertxException: io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: E:\gravitee\graviteeio-gateway-1.30.8\bin\${reporters.elasticsearch.ssl.keystore.keys} 22:30:12.060 [vert.x-eventloop-thread-0] [] INFO i.g.g.s.vertx.ReactorVerticle - Stopping HTTP Server... 22:30:12.062 [vert.x-eventloop-thread-0] [] INFO i.g.g.s.vertx.ReactorVerticle - HTTP Server has been correctly stopped 22:30:12.062 [vert.x-eventloop-thread-4] [] INFO i.g.g.s.vertx.ReactorVerticle - Stopping HTTP Server... 22:30:12.062 [vert.x-eventloop-thread-4] [] INFO i.g.g.s.vertx.ReactorVerticle - HTTP Server has been correctly stopped 22:30:12.065 [graviteeio-node] [] ERROR i.g.p.c.i.PluginContextFactoryImpl - Unable to refresh plugin context org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.gravitee.reporter.elasticsearch.ElasticsearchReporter': Unsatisfied dependency expressed through field 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpClient': Invocation of init method failed; nested exception is io.vertx.core.VertxException: io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: E:\gravitee\graviteeio-gateway-1.30.8\bin\${reporters.elasticsearch.ssl.keystore.keys} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j ava:596)
gravitee.yml
[APIM]
[Gravitee]
Certificate for gateway:
E:\gravitee\graviteeio-gateway-1.30.8\bin\ssl>dir Volume in drive E is Data Volume Serial Number is AA2B-6240
Directory of E:\gravitee\graviteeio-gateway-1.30.8\bin\ssl
04/16/2020 10:21 PM
E:\gravitee\graviteeio-gateway-1.30.8\bin\ssl>
Possible Solution
I can solve this issue only turn off ssl in gravitee components, but I cannot turn off ssl in Elasticsearch cluster.
Context
Docker container with APIM was crash. Gateway not crashed, but not worked correctly.
Your Environment