Failed To start elasticsearch with GCE cloud plugin


#1

i installed cloud gce plugin for elasticsearch 2.0 (sudo bin/plugin install cloud-gce). but it is not started even if just set gce for network.host. No logs were found for this case. i use debian and elastic is started as service.


(David Pilato) #2

Which exact version are you using?


#3

"version" : {
"number" : "2.0.0",
"build_hash" : "de54438d6af8f9340d50c5c786151783ce7d6be5",
"build_timestamp" : "2015-10-22T08:09:48Z",
"build_snapshot" : false,
"lucene_version" : "5.2.1"
},


(David Pilato) #4

Can you try 2.0.2?


(David Pilato) #5

And when you said that "it is not started", do you mean that elasticsearch stops?


#6

I can try 2.0.2 or even 2.1.
when i said "it is not started" i meant that i can't connect to it after restart and also i don't see started event in log


(David Pilato) #7

Can you share the full logs please?


#8

there is nothing in log at all and also no java processes


(David Pilato) #9

Nothing at all? Even a single line?

But how did you get:

"version" : {
"number" : "2.0.0",
"build_hash" : "de54438d6af8f9340d50c5c786151783ce7d6be5",
"build_timestamp" : "2015-10-22T08:09:48Z",
"build_snapshot" : false,
"lucene_version" : "5.2.1"
},

#10

when i set default value for host (0.0.0.0) it works


(David Pilato) #11

Ok. Can you share your elasticsearch.yml file then?


#12
 cluster.name: my-staging
 node.name: ${HOSTNAME}
 path.data: /var/data/elasticsearch/
 path.logs: /var/log/elasticsearch
 bootstrap.mlockall: true
 ES_HEAP_SIZE: 1.5G
 network.host: "_gce_"

(David Pilato) #13

ES_HEAP_SIZE: 1.5G is useless here. But that should not cause that issue

Are you sure that cloud-gce plugin is started? Can you share the full logs?


#14

i don't see any logs at all


(David Pilato) #15

Even when it works?


#16

yes even then


#17

on elastic 2.1:

loaded [cloud-gce], sites [head]

java.lang.IllegalArgumentException: No interface named 'gce' found, got [name:lo (lo), name:eth0 (eth0)]
at org.elasticsearch.common.network.NetworkUtils.getAddressesForInterface(NetworkUtils.java:188)
at org.elasticsearch.common.network.NetworkService.resolveInetAddress(NetworkService.java:196)
at org.elasticsearch.common.network.NetworkService.resolveBindHostAddress(NetworkService.java:111)
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:430)
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:319)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:170)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.node.Node.start(Node.java:254)
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:221)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:287)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)


(David Pilato) #18

So you found logs?

I'll check that later today. Might be a bug.


(David Pilato) #19

I checked it and actually _gce_ is only available if you are using gce discovery.

Which means that you need to have:

cloud.gce.project_id: YOUR_GCE_PROJECT
cloud.gce.zone: YOUR_ZONE
discovery.type: gce

(David Pilato) #20

I opened https://github.com/elastic/elasticsearch/issues/15724 to check if we can do a better job here.