Trying to set up an ELK stack on a google compute engine server I found out that the "click to deploy" solution google is providing is outdated.

None the less I tried installing Logstash and Kibana on top of the ES only to find out that I could not connect to Kibana (although I had no problem connecting to the elasticsearch itself both from inside google compute and the outside world).

Having the ELK stack already working on an AWS Ububnu 14.04 machine, I thought I'll try to start for a fresh machine and install everything myself on google compute.

After installing ES I again found that I could not connect to ES from outside (on the default port 9200, that of course worked with the click-to-deploy).

It's worth noting here that the click-to-deploy servers where probably intended for internal use, because they had ephemeral IPs, while I defined all my machines with static IPs (testing around this subject was a dead end as well).

In all cases the result for my servers was the same - the error I got was ERR_CONNECTION_REFUSED.

This (surprisingly) led me to think I was missing some firewall definition.

  1. I tried opening a different port and listening on it on the server side with netcat -lp <some-port>
  2. I then tried to run from my remote machine the same request I would run on elastic, but on the new port: curl -X GET 'http://<static-ip>:<some-port>'
  3. The request went on with no problems
  4. I stopped elasticsearch and started netcat -lp 9200
  5. curl -X GET 'http://<static-ip>:9200' from the remove machine came through like a charm.

    Even after opening the relevant ports for all machines and repeating the entire process (with all the different combinations) I realized I am probably missing something else.

Compering to the best of my ability with the google instance was yet another dead end.

What am I missing here? is there another connectivity definition in ES or GCE?

  • can you add a screenshot of your firewall rules and your routes setup in compute engine? Mh but since you tested with curl and netcat already. Have you checked with netstat -tulpen whether your service is listening on the correct interface? It might listen on an unrouted interface (lo?)
    – konqi
    Nov 18, 2015 at 11:40

1 Answer 1


Well, konqi was sort of right. The problem was ES connecting to the loopback device, but setting network.bind_host to _non_loopback_ is only half of the solution, I can now acsess ES only form the outside (of course).

Apparently, there is a GCE plugin to fix this, but only up to ES version 1.7, guess I'll have to wait for it to catch up. The rest can be hacked around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.