fabric8io / openshift-elasticsearch-plugin

Apache License 2.0
27 stars 21 forks source link

Lazyload EsClient #62

Closed jcantrill closed 7 years ago

jcantrill commented 7 years ago

Lazy load the esClient to mute stacks like:

ConnectTransportException[[][127.0.0.1:9300] connect_timeout[30s]]; nested: ConnectException[Connection refused: localhost/127.0.0.1:9300];
    at org.elasticsearch.transport.netty.NettyTransport.connectToChannelsLight(NettyTransport.java:967)
    at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:933)
    at org.elasticsearch.transport.netty.NettyTransport.connectToNodeLight(NettyTransport.java:906)
    at org.elasticsearch.transport.TransportService.connectToNodeLight(TransportService.java:267)
    at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:390)
    at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:336)
    at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:187)
    at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:243)
    at io.fabric8.elasticsearch.plugin.acl.DynamicACLFilter.<init>(DynamicACLFilter.java:166)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jcantrill commented 7 years ago

cc @ewolinetz @richm

jcantrill commented 7 years ago

@ewolinetz @richm Re-evaluating my desire to lazy load this stack. I see in our initialization we add in the SearchGuard plugins. Is there any belief that we open up the cluster to NOT use SG for a small window during startup?