mobz / elasticsearch-head

A web front end for an elastic search cluster
http://mobz.github.io/elasticsearch-head/
Other
9.41k stars 2.02k forks source link

Error on connecting to the cluster #308

Open jplu opened 7 years ago

jplu commented 7 years ago

Hello,

I do have an up and working Elasticsearch cluster:

curl http://localhost:9201?pretty=true
{
  "name" : "es1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "VTUjjTrZT26VyfDe9I1z6A",
  "version" : {
    "number" : "5.1.2",
    "build_hash" : "c8c4c16",
    "build_date" : "2017-01-11T20:18:39.146Z",
    "build_snapshot" : false,
    "lucene_version" : "6.3.0"
  },
  "tagline" : "You Know, for Search"
}
curl http://localhost:9201/_cluster/health?pretty=true
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

Error the errors I get in the Javascript Console:

vendor.js:7829 GET http://localhost:9201/_cluster/state net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1351
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
vendor.js:7829 GET http://localhost:9201/ net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
init @ app.js:3746
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
init @ app.js:4137
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_stats net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1380
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_nodes/stats net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1384
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_nodes net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1388
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_cluster/health net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1392
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_cluster/state net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1351
refresh @ app.js:3464
init @ app.js:3457
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
createPage @ app.js:4373
navigateTo @ app.js:4366
_openClusterOverview_handler @ app.js:4418
trigger @ vendor.js:2888
(anonymous) @ vendor.js:3467
each @ vendor.js:641
each @ vendor.js:265
trigger @ vendor.js:3466
jQuery.fn.(anonymous function) @ vendor.js:3690
init @ app.js:4351
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
vendor.js:7829 GET http://localhost:9201/_stats net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1380
refresh @ app.js:3464
init @ app.js:3457
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
createPage @ app.js:4373
navigateTo @ app.js:4366
_openClusterOverview_handler @ app.js:4418
trigger @ vendor.js:2888
(anonymous) @ vendor.js:3467
each @ vendor.js:641
each @ vendor.js:265
trigger @ vendor.js:3466
jQuery.fn.(anonymous function) @ vendor.js:3690
init @ app.js:4351
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_nodes/stats net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1384
refresh @ app.js:3464
init @ app.js:3457
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
createPage @ app.js:4373
navigateTo @ app.js:4366
_openClusterOverview_handler @ app.js:4418
trigger @ vendor.js:2888
(anonymous) @ vendor.js:3467
each @ vendor.js:641
each @ vendor.js:265
trigger @ vendor.js:3466
jQuery.fn.(anonymous function) @ vendor.js:3690
init @ app.js:4351
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_nodes net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1388
refresh @ app.js:3464
init @ app.js:3457
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
createPage @ app.js:4373
navigateTo @ app.js:4366
_openClusterOverview_handler @ app.js:4418
trigger @ vendor.js:2888
(anonymous) @ vendor.js:3467
each @ vendor.js:641
each @ vendor.js:265
trigger @ vendor.js:3466
jQuery.fn.(anonymous function) @ vendor.js:3690
init @ app.js:4351
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_cluster/health net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1392
refresh @ app.js:3464
init @ app.js:3457
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
createPage @ app.js:4373
navigateTo @ app.js:4366
_openClusterOverview_handler @ app.js:4418
trigger @ vendor.js:2888
(anonymous) @ vendor.js:3467
each @ vendor.js:641
each @ vendor.js:265
trigger @ vendor.js:3466
jQuery.fn.(anonymous function) @ vendor.js:3690
init @ app.js:4351
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
_reconnect_handler @ app.js:3757
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_all net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
(anonymous) @ app.js:1356
resolveWith @ vendor.js:995
done @ vendor.js:7130
callback @ vendor.js:7907
app.js:1308 Object {XHR Error: "error", message: ""}
vendor.js:7829 GET http://localhost:9201/_all net::ERR_CONNECTION_REFUSED
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
(anonymous) @ app.js:1356
resolveWith @ vendor.js:995
done @ vendor.js:7130
callback @ vendor.js:7907
app.js:1308 Object {XHR Error: "error", message: ""}

I get these errors on Chrome and Firefox. I added the following lines in my elasticsearch.yml:

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type, Content-Length

Any idea of what is going wrong?

imfantuan commented 7 years ago

vi config/elasticsearch.yml

Write the following lines: http.cors.enabled: true http.cors.allow-origin: "*"

jplu commented 7 years ago

Thanks @NicolJiang for your reply.

As you can see in my previous post my config/elasticsearch.yml file already contains these lines. Any other idea?

imfantuan commented 7 years ago

Try to delete http.cors.allow-methods & http.cors.allow-headers?

jplu commented 7 years ago

The same behavior, nothing has changed.

philipskokoh commented 7 years ago

Just want to confirm, are your elasticsearch-head running in the same machine as your elasticsearch cluster?

jplu commented 7 years ago

My elasticsearch Cluster is in a Docker container on the same machine, yes.

mmahalwy commented 7 years ago

any update on this?

t3chn0m4g3 commented 7 years ago

Running ELK stack 5.2.1 in docker container while setting

http.cors.enabled: true
http.cors.allow-origin: "*"

in elasticsearch.yml and getting cluster health: not connected error. image

Are there any means to fully debug this issue? Even if I set grunt to debug and verbose mode I do not see any requests.

Elastic stack 5.2.1 works fine though.

t3chn0m4g3 commented 7 years ago

Tried all possible settings and configurations possible with regard to topics revolving around this and comparable issues, but sadly no luck 😒

Connection requests are not forwarded to the remote host (as expected and how the plugin worked) but are forwarded to the local host which of course denies the request since nothing runs on :9200. A connect to http://remotehost:port works fine. So either the concept is totally different from the plugin or it is a bug.

@mobz Can you have a look at this please? Did I (we) get the concept of the stand-alone server wrong? Thanks in advance :bowtie:

Console shows the following errors.

GET http://localhost:9200/ net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
init @ app.js:3746
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
init @ app.js:4137
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
app.js:1308 Object {XHR Error: "error", message: ""}
VM597:2 GET http://localhost:9200/_cluster/state net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1351
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
VM597:2 GET http://localhost:9200/_stats net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1380
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
app.js:1308 Object {XHR Error: "error", message: ""}
VM597:2 GET http://localhost:9200/_nodes/stats net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1384
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
app.js:1308 Object {XHR Error: "error", message: ""}
VM597:2 GET http://localhost:9200/_nodes net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1388
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
app.js:1308 Object {XHR Error: "error", message: ""}
VM597:2 GET http://localhost:9200/_cluster/health net::ERR_CONNECTION_REFUSED
(anonymous) @ VM597:2
send @ vendor.js:7829
ajax @ vendor.js:7307
request @ app.js:1303
get @ app.js:1313
refresh @ app.js:1392
init @ app.js:4183
Class @ app.js:265
init @ app.js:4346
prototype.(anonymous function) @ app.js:281
Class @ app.js:265
window.onload @ (index):21
app.js:1308 Object {XHR Error: "error", message: ""}
mobz commented 7 years ago

It really looks like you have a misconfigured CORS settings. couple of things to try;

1) from the same user space as your browser run;

curl -v -XOPTIONS -H 'Access-Control-Request-Method: GET' -H 'Origin: http://localhost:9100' http://localhost:9201/

This should show whether your elasticsearch is sending correct CORS headers

2) Try is running the new experimental proxy that I'm building into 'head That should allow you to bypass CORS problems altogether. Any feedback on the proxy is welcome. See the README for instructions as to running it. It's pretty raw and requires manually editing config files, but see how you go

mobz commented 7 years ago

@t3chn0m4g3 Also be aware that running with 'standalone server' the browser is making a connection DIRECTLY to elasticsearch, the grunt server just serves the static files.

t3chn0m4g3 commented 7 years ago

@mobz Thanks for your swift response and clarification! For my case I think the experimental proxy will be suited best then. However using NGINX as a reverse proxy for the DIRECT request might also solve the issue, hence it will not be as straight forward to use.

Thank you for Head! Served me very well so far πŸ˜ƒ

jplu commented 7 years ago

@mobz After doing:

curl -v -XOPTIONS -H 'Access-Control-Request-Method: GET' -H 'Origin: http://localhost:9100' http://localhost:9201/

Here what I get:

*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9201 (#0)
> OPTIONS / HTTP/1.1
> Host: localhost:9201
> User-Agent: curl/7.52.1
> Accept: */*
> Access-Control-Request-Method: GET
> Origin: http://localhost:9100
> 
< HTTP/1.1 200 OK
< access-control-allow-origin: *
< access-control-allow-methods: HEAD,DELETE,POST,GET,OPTIONS,PUT
< access-control-allow-headers: X-Requested-With,X-Auth-Token, Content-Length,Content-Type
< access-control-max-age: 1728000
< date: "Mon, 27 Feb 2017 14:04:03 GMT"
< content-length: 0
< 
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact

Everything seems to be ok from the Elasticsearch CORS headers. Waiting this new proxy feature then :)

t3chn0m4g3 commented 7 years ago

The proxy did not work for me, so I use the standalone server with NGINX as a reverse proxy (exposing ES on 127.0.0.1:9200, basic auth enabled) now.

image

For NGINX:

    ### ES
    location /es/ {
        proxy_pass http://localhost:64298/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        rewrite /es/(.*)$ /$1 break;
    }

Docker:

/usr/bin/docker run --cap-add=IPC_LOCK --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" --name=elk -v /data:/data -p 127.0.0.1:64296:5601 -p 127.0.0.1:64302:9100 -p 127.0.0.1:64298:9200 --rm=true dtagdevsec/elk:latest1610

@mobz Thanks for your help and pushing me in the right direction πŸ˜ƒ

tolinwei commented 7 years ago

The same issue for me today, I'm on macOS with brew-installed elasticsearch of version 5.2.2.

I'm finally be able to resolve this issue by adding the two lines setting mentioned above into the config file of brew version elasticsearch. /usr/local/etc/elasticsearch/elasticsearch.yml

maticm commented 7 years ago

I have the same issue as it's mentioned in above comment. The ES URL isn't replaced properly within the cluster.

Proxy is running

> elasticsearch-head@0.0.0 proxy /opt/elasticsearch-head
> node proxy/index.js

creating proxy localhost:9200
    remote: http://10.95.0.19:9200
    local:  http://localhost:9101

Elasticsearch-head running on standard 9100.

cyklodev commented 7 years ago

I had the same CORS issue with a vanilla instance of elk5 and head running in the same server. After i read @NicolJiang answer and the tune section of https://hub.docker.com/r/dafire/docker-elk-elasticsearch/, I was able to correct the issue with the following steps:

@mobz Thanks for your amazing job !

ghost commented 7 years ago

Hi guys,

I have the same issue with Elasticsearch 5.3 installed on Centos 7 x64 server.

I started Head plugin with built-in web server, following next steps:

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start

After trying to connect to http://localhost:9200/, Head is giving message

cluster health: not connected

At my /etc/elasticsearch/elasticsearch.yml file there are added following two lines:

http.cors.enabled: true
http.cors.allow-origin: "*"

I do not use dockerized environment.

Can somebody help me to get Head plugin working with actual Elasticsearch version?

Thank you

philipskokoh commented 7 years ago

@jovanmal: it should be http://localhost:9100 I just tested on Elasticsearch 5.3 and Centos 7. It works fine on my machine. What is your node version? I tested on node v6.10.1.

ghost commented 7 years ago

I can open web interface on http://localhost:9100, but cannot connect to Elasticsearch from it. Screenshot attached.

Node version? When I execute command

get _nodes

in Kibana, getting following output:

{
  "_nodes": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "cluster_name": "elasticsearch",
  "nodes": {
    "Xbw_S7vsSD-5SXeV2PYicg": {
      "name": "Xbw_S7v",
      "transport_address": "127.0.0.1:9300",
      "host": "localhost",
      "ip": "127.0.0.1",
      "version": "5.3.0",
      "build_hash": "3adb13b",
      "total_indexing_buffer": 213005107,
      "roles": [
        "master",
        "data",
        "ingest"
      ],
      "settings": {
        "pidfile": "/var/run/elasticsearch/elasticsearch.pid",
        "cluster": {
          "name": "elasticsearch"
        },
        "node": {
          "name": "Xbw_S7v"
        },
        "path": {
          "conf": "/etc/elasticsearch",
          "data": [
            "/var/lib/elasticsearch"
          ],
          "logs": "/var/log/elasticsearch",
          "home": "/usr/share/elasticsearch"
        },
        "client": {
          "type": "node"
        },
        "http": {
          "type": {
            "default": "netty4"
          },
          "port": "9200"
        },
        "bootstrap": {
          "memory_lock": "true"
        },
        "transport": {
          "type": {
            "default": "netty4"
          }
        },
        "network": {
          "host": "localhost"
        }
      },
      "os": {
        "refresh_interval_in_millis": 1000,
        "name": "Linux",
        "arch": "amd64",
        "version": "3.10.0-514.10.2.el7.x86_64",
        "available_processors": 2,
        "allocated_processors": 2
      },
      "process": {
        "refresh_interval_in_millis": 1000,
        "id": 945,
        "mlockall": true
      },
      "jvm": {
        "pid": 945,
        "version": "1.8.0_121",
        "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
        "vm_version": "25.121-b13",
        "vm_vendor": "Oracle Corporation",
        "start_time_in_millis": 1493092545169,
        "mem": {
          "heap_init_in_bytes": 2147483648,
          "heap_max_in_bytes": 2130051072,
          "non_heap_init_in_bytes": 2555904,
          "non_heap_max_in_bytes": 0,
          "direct_max_in_bytes": 2130051072
        },
        "gc_collectors": [
          "ParNew",
          "ConcurrentMarkSweep"
        ],
        "memory_pools": [
          "Code Cache",
          "Metaspace",
          "Compressed Class Space",
          "Par Eden Space",
          "Par Survivor Space",
          "CMS Old Gen"
        ],
        "using_compressed_ordinary_object_pointers": "true"
      },
      "thread_pool": {
        "force_merge": {
          "type": "fixed",
          "min": 1,
          "max": 1,
          "queue_size": -1
        },
        "fetch_shard_started": {
          "type": "scaling",
          "min": 1,
          "max": 4,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "listener": {
          "type": "fixed",
          "min": 1,
          "max": 1,
          "queue_size": -1
        },
        "index": {
          "type": "fixed",
          "min": 2,
          "max": 2,
          "queue_size": 200
        },
        "refresh": {
          "type": "scaling",
          "min": 1,
          "max": 1,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "generic": {
          "type": "scaling",
          "min": 4,
          "max": 128,
          "keep_alive": "30s",
          "queue_size": -1
        },
        "warmer": {
          "type": "scaling",
          "min": 1,
          "max": 1,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "search": {
          "type": "fixed",
          "min": 4,
          "max": 4,
          "queue_size": 1000
        },
        "flush": {
          "type": "scaling",
          "min": 1,
          "max": 1,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "fetch_shard_store": {
          "type": "scaling",
          "min": 1,
          "max": 4,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "management": {
          "type": "scaling",
          "min": 1,
          "max": 5,
          "keep_alive": "5m",
          "queue_size": -1
        },
        "get": {
          "type": "fixed",
          "min": 2,
          "max": 2,
          "queue_size": 1000
        },
        "bulk": {
          "type": "fixed",
          "min": 2,
          "max": 2,
          "queue_size": 200
        },
        "snapshot": {
          "type": "scaling",
          "min": 1,
          "max": 1,
          "keep_alive": "5m",
          "queue_size": -1
        }
      },
      "transport": {
        "bound_address": [
          "127.0.0.1:9300",
          "[::1]:9300"
        ],
        "publish_address": "127.0.0.1:9300",
        "profiles": {}
      },
      "http": {
        "bound_address": [
          "127.0.0.1:9200",
          "[::1]:9200"
        ],
        "publish_address": "127.0.0.1:9200",
        "max_content_length_in_bytes": 104857600
      },
      "plugins": [
        {
          "name": "ingest-geoip",
          "version": "5.3.0",
          "description": "Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database",
          "classname": "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin"
        },
        {
          "name": "ingest-user-agent",
          "version": "5.3.0",
          "description": "Ingest processor that extracts information from a user agent",
          "classname": "org.elasticsearch.ingest.useragent.IngestUserAgentPlugin"
        }
      ],
      "modules": [
        {
          "name": "aggs-matrix-stats",
          "version": "5.3.0",
          "description": "Adds aggregations whose input are a list of numeric fields and output includes a matrix.",
          "classname": "org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin"
        },
        {
          "name": "ingest-common",
          "version": "5.3.0",
          "description": "Module for ingest processors that do not require additional security permissions or have large dependencies and resources",
          "classname": "org.elasticsearch.ingest.common.IngestCommonPlugin"
        },
        {
          "name": "lang-expression",
          "version": "5.3.0",
          "description": "Lucene expressions integration for Elasticsearch",
          "classname": "org.elasticsearch.script.expression.ExpressionPlugin"
        },
        {
          "name": "lang-groovy",
          "version": "5.3.0",
          "description": "Groovy scripting integration for Elasticsearch",
          "classname": "org.elasticsearch.script.groovy.GroovyPlugin"
        },
        {
          "name": "lang-mustache",
          "version": "5.3.0",
          "description": "Mustache scripting integration for Elasticsearch",
          "classname": "org.elasticsearch.script.mustache.MustachePlugin"
        },
        {
          "name": "lang-painless",
          "version": "5.3.0",
          "description": "An easy, safe and fast scripting language for Elasticsearch",
          "classname": "org.elasticsearch.painless.PainlessPlugin"
        },
        {
          "name": "percolator",
          "version": "5.3.0",
          "description": "Percolator module adds capability to index queries and query these queries by specifying documents",
          "classname": "org.elasticsearch.percolator.PercolatorPlugin"
        },
        {
          "name": "reindex",
          "version": "5.3.0",
          "description": "The Reindex module adds APIs to reindex from one index to another or update documents in place.",
          "classname": "org.elasticsearch.index.reindex.ReindexPlugin"
        },
        {
          "name": "transport-netty3",
          "version": "5.3.0",
          "description": "Netty 3 based transport implementation",
          "classname": "org.elasticsearch.transport.Netty3Plugin"
        },
        {
          "name": "transport-netty4",
          "version": "5.3.0",
          "description": "Netty 4 based transport implementation",
          "classname": "org.elasticsearch.transport.Netty4Plugin"
        }
      ],
      "ingest": {
        "processors": [
          {
            "type": "append"
          },
          {
            "type": "convert"
          },
          {
            "type": "date"
          },
          {
            "type": "date_index_name"
          },
          {
            "type": "dot_expander"
          },
          {
            "type": "fail"
          },
          {
            "type": "foreach"
          },
          {
            "type": "geoip"
          },
          {
            "type": "grok"
          },
          {
            "type": "gsub"
          },
          {
            "type": "join"
          },
          {
            "type": "json"
          },
          {
            "type": "kv"
          },
          {
            "type": "lowercase"
          },
          {
            "type": "remove"
          },
          {
            "type": "rename"
          },
          {
            "type": "script"
          },
          {
            "type": "set"
          },
          {
            "type": "sort"
          },
          {
            "type": "split"
          },
          {
            "type": "trim"
          },
          {
            "type": "uppercase"
          },
          {
            "type": "user_agent"
          }
        ]
      }
    }
  }
}

In my case, version is 5.3.0, as you can see from output.

screenshot from 2017-04-25 11-12-39

philipskokoh commented 7 years ago

@jovanmal: can you check what's the error message in the Chrome console tab? To open the console use Ctrl+Shift+I (linux) or Command+Option+I (mac), go to console tab, and refresh the page.

ghost commented 7 years ago

Yes, of course. There are multiple "net::ERR_CONNECTION_REFUSED" messages.

Screenshot enclosed.

screenshot from 2017-04-25 12-44-00

Thank you

philipskokoh commented 7 years ago

@jovanmal: looks like you connect to 192.168.6.186. Can you connect to http://192.168.6.186:9200 instead of http://localhost:9200.

ghost commented 7 years ago

@philipskokoh, thank you very much for your time.

yes, I tried to connect from web browser and got error

This site can’t be reached 192.168.6.186 refused to connect.

Elasticsearch is working. Logstash successfully sending parsed data to http://192.168.6.186:9200, but getting error when try to connect from the any web browser to it.

philipskokoh commented 7 years ago

@jovanmal: not the url in web browser, but the edit box beside connect button. Alternatively, you can use url parameter: 192.168.6.186:9100/index.html?base_uri=http://192.168.6.186:9200 Reference: https://github.com/mobz/elasticsearch-head#url-parameters

cgyim commented 7 years ago

@philipskokoh I have the same issue as @jovanmal that is:

  1. visit 172.16.30.247:9100 cluster health : not connected ,the head-plugin is a standalone server,my elasticsearch version is 5.2.0 .
    1. My elasticsearch.yml config:http.cors.enabled: true, http.cors.allow-origin: "*"
    2. chrome console ,and get the same problem as @jovanmal net::ERR_CONNECTION_REFUSED, the screenshot is totally the same ,I try visit 172.16.30.247:9200 ,it shows { "name" : "node01-247", "cluster_name" : "dev-elastic", "cluster_uuid" : "3lf0enLJR6S3VoXGFze8OQ", "version" : { "number" : "5.2.0", "build_hash" : "24e05b9", "build_date" : "2017-01-24T19:52:35.800Z", "build_snapshot" : false, "lucene_version" : "6.4.0" }, "tagline" : "You Know, for Search" } So could you give me a hand?Ty:)
philipskokoh commented 7 years ago

@cgyim1992: have you tried using base_uri? It should work. https://github.com/mobz/elasticsearch-head/issues/308#issuecomment-297626065

cgyim commented 7 years ago

@philipskokoh Yep,i try what you suggested,and it works! πŸ‘ but :( I have met another problem: image my elasticsearch cluster is deployed in public cloud, so i have a nginx to proxy my elasticsearch_addr:9200 to http://search.wapercor.com ,however in order to ensure least safety,nginx requires a basic password auth,but as image shows ,the http request seems not able to send user and password ,and add user and password in url is not secure,so dude,could you give me some help?tyty:):)

dewadkar commented 6 years ago

I have installed EKL stack on mac using brew and installed elasticsearch-head plugin. At the start it was not connected. By adding updating elasticsearch.yml. It is able to connect to elasticsearch on localhost.

GarfieldZhan commented 5 years ago

@jplu Hello,did you put the elasticsearch-head in the offical directory /elasticsearch/plugins?I think you can try to put the elasticsearch-head in any directory created by yourself,then start the elasticsearch-head.

its-ogawa commented 3 years ago

I encountered the following error the moment I tried to start elasticsearch-head.

# npm run start

> elasticsearch-head@0.0.0 start /usr/local/elastic/es-head/elasticsearch-head
> grunt server

Running "connect:server" (connect) task
Waiting forever...
Fatal error: Port 9100 is already in use by another process.

At first glance, it looks like it's just a port conflict. Fatal error: Port 9100 is already in use by another process.

# ss -anp | grep "9100"
tcp LISTEN 0 128 :9100 *: users:(("node",pid=20056,fd=12))
# ps aux | grep "20056"
root 11003 0.0 0.0 112824 976 pts/4 S+ 12:01 0:00 grep --color=auto 20056
root 20056 0.0 0.0 996864 1736 ?        Sl Feb 24 0:01 grunt

However, even if I kill the grunt process, elasticsearch-head doesn't start. And the grunt process comes back again.

What should I do?