Hi All,
I am trying to install gce discovery plugin in elasticsearch but unable to set the following parameters
# get the IP address from network interface 1
network.host: _gce:privateIp:1_
# Using GCE internal hostname
network.host: _gce:hostname_
# shortcut for _gce:privateIp:0_ (recommended)
network.host: _gce_
I am getting following error when i am giving any of the above config in elastic search.yml
ig", "node.name": "elasticsearch-config-es-master-0", "message": "uncaught exception in thread [main]",
"stacktrace": ["org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to resolve host [_gce_]]; nested: IOException[IOException caught when fetching I
netAddress from [network-interfaces/0/ip]]; nested: IOException[failed to fetch metadata from [http://metadata.google.internal/computeMetadata/v1/instance/network-interface
s/0/ip]]; nested: HttpResponseException[404 Not Found",
"Not Found",
"];",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.4.0.jar:7.4.0]",
"Caused by: org.elasticsearch.transport.BindTransportException: Failed to resolve host [_gce_]",
"at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:341) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:139) ~[?:?]",
"at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport.doStart(SecurityNetty4Transport.java:81) ~[?:?]",
"at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4ServerTransport.doStart(SecurityNetty4ServerTransport.java:43) ~[?:?]",
"at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:59) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.transport.TransportService.doStart(TransportService.java:230) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:59) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.node.Node.start(Node.java:695) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:273) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:358) ~[elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.0.jar:7.4.0]",
"... 6 more",
My elasticsearch.yaml seems to be picking up discoverygce setting for my projects and zone, but unable to pickup any of the network.host properties
cloud:
gce:
project_id: <PROJECT-ID>
zone:
- us-east4-a
- us-east4-b
- us-east4-c
cluster:
name: elasticsearch-config
discovery:
seed_providers: gce
http:
compression: true
compression_level: 9
network:
host: 0.0.0.0
publish_host: ${POD_IP}
Am i missing something, this cluster is on GKE.