Not able to access Kibana when Elasticsearch and Kibana are setup on different servers with search guard - elasticsearch

I am trying to setup an ES cluster and Kibana on different VMs. The ES cluster is setup and secured with search-guard, I can even access it from the browser and curl.
I've setup kibana on an other VM and changed the elasticsearch.url to one of the servers of the ES cluster, and I've also updated the elasticsearch.username and elasticsearch.password.
Since I am using a self-signed SSL i've set the following as well.
elasticsearch.ssl.verificationMode: none
The firewall is allowed for port 5601 and the logs are as below but i still am not able to access kibana. Should i install kibana on an ES Node for it to work or how?
Nov 07 02:55:42 Kibana systemd[1]: Started Kibana.
Nov 07 02:56:09 Kibana kibana[25483]: {"type":"log","#timestamp":"2018-11-07T02:56:09Z","tags":["info","optimize"],"pid":25483,"message":"Optimizing and caching bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, dashboardViewer, apm and kibana. This may take a few minutes"}

Set server.host: 0.0.0.0 in kibana.yml to listen on all interfaces

Related

How to expose my Elastic Search server to the internet?

I've done installed my ElasticSearch (ES) Server on a VPS Centos. I did test the ES inside the Server and it response correctly.
My next step, is to allow my website which is host on a different web host to access and index its data content into my ES server.
My question is, what is the recommended way of exposed the ES to the internet, so my website can access to it to perform index and search? Is there's authentication method that I need to install ?
You need to include network.host:0.0.0.0 in your elasticsearch.yml file so that it listens on the non-loopback address and after that, if your app-server and ES are both in the same VPC, app-server will be able to connect to ES(provided if you exposed 9200 port in security group(in case of AWS).
And hopefully, your app-server port is exposed to the internet which internally connects to ES, you should not expose 9200 port of ES or Elasticsearch to the internet.
If you want an extra layer of security, you can enable x-pack basic which is included in the free tier and can be enabled using xpack.security.enabled: true in elasticsearch.config.
Refer x-pack features and configuration for more info.

APM Server has still not connected to Elasticsearch

I have installed Elastic search, kibana and logstash (all version 7.5.2)
After this I have installed Kibana(7.5.2) and configured apm-server.yml with output as elasticsearch with xpack monitoring as well. The service apm-server is running fine. I am able to see the APM application in the Kibana Stack monitoring page as well.
But when I go to https://kibana_server:5601/app/kibana#/home/tutorial/apm and click on Check APM Server statusI get as below:
APM Server has still not connected to Elasticsearch
apm-server.yml
apm-server:
host: "lxapm1001:8200"
output.elasticsearch:
hosts: ["http://lxecs2001:9200"]
username: apm_system
password: "${ES_PWD}"
monitoring.enabled: true
monitoring.elasticsearch:
Has anyone faced similar issue. Please advise. Let me know if any additional details are required.

How to Access ElasticSearch From Server?

I am using elastic search in my ubuntu16.04 server. When i am trying to access elasticsearch from browser by using url ip:port/_cat/indices?v. I am getting site can't be reached. After that i am change the network.host value to network.host: 0.0.0.0. After change the network.host ip the search engine not started. How can i access the elasticsearch in my browser.I changed the port also.
Thank you..
There can be many reasons for ES not being reachable. I would start with the obvious and make sure that:
ES is listening on the port: on the ES instance when you run 'curl
ip:port' you should get an answer. if not the service didn't start
well.
make sure there are no firewall rules/security groups that prevent
access from remote network.
make sure network.publish_host is configure correctly:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#advanced-network-settings
more info here: ElasticSearch instance not reachable from outside the server - Azure Windows 2012

Kibana asking for credentials

I set up a Kibana server that is accesing an External ElasticServer Datasource. Nignx is on top, and I access Kibana through it.
On the initial config, I set up the credentials of Kibana using:
sudo htpasswd -c /etc/nginx/htpasswd.users kibanaadmin
Then I was able to access the Kibana Web Console, and see it running. However, the external elasticServer was not configured, so I edited the kibana.yml file to point that external ElasticServer.
elasticsearch.url: "https://bluemix-sandbox-dal-9-portal0.dblayer.com:18671/"
elasticsearch.username: "admin"
elasticsearch.password: "mypass"
When I restarted Kibana, it was able to connect to the elasticsearch server, and in fact it seems that it wrote an entry on the index there.
However, now I am asked for some credentials to get connected to the Kibana Web interface. They are not the kibanaadmin I set up previously, or the ones on elasticsearch database. Which credentials should i use?
Are you sure you're not running Kibana from the wrong ES instance and both Kibana and Nginx are running on the same server. Haven't tried it out personally but then the below links could be handy.
Enabling Kibana Authentication with Nginx
Securing Elasticsearch, Kibana with nginx
Git- Kibana with Nginx Reverse Proxy

Elasticsearch on Azure virtual machine

I have installed elasticsearch on Azure virtual machine.
I have installed the elasticsearch service which which automatically starts on system start up.
Everything works fine on VM. I can access the 9200 port of elasticsearch instance.
The problem is I can not access it with the help of dns name of the virtual machine i.e. xyz.cloudapp.net:9200
I have created endpoints for 9200 and 9300 port.
I want the Elasticsearch on just one VM for now.
Am I missing any steps?
The answer to my question is here.
I needed to add the following to my Elasticsearch config file
network.host: [_local_, _site_]
This works like a charm.
This has been added in ElasticSearch since 2.x.x version.
Thanks

Resources