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.
- I tried opening a different port and listening on it on the server side with
netcat -lp <some-port>
- 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>'
- The request went on with no problems
- I stopped elasticsearch and started
netcat -lp 9200
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?
netstat -tulpen
whether your service is listening on the correct interface? It might listen on an unrouted interface (lo?)