Failed To start elasticsearch with GCE cloud plugin

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.

Which exact version are you using?

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

Can you try 2.0.2?

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

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

Can you share the full logs please?

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

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"
},

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

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

 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_"

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?

i don't see any logs at all

Even when it works?

yes even then

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)

So you found logs?

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

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

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