elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.95k stars 24.74k forks source link

Single Node Cluster Not Comingup #39985

Closed srirama-rayaprolu closed 5 years ago

srirama-rayaprolu commented 5 years ago

In my local elastic setup, if I set the setting discovery.zen.ping.multicast.enabled: false Elastic is not coming up.

After checking https://github.com/elastic/elasticsearch/issues/22909, I removed the setting.

Now, how to make the single node cluster? Below are my elasticsearch.yml contents.

cluster.name: my_cluster
node.name: node-1

If try to access any index with out cluster.name appended it is working. However if I append it, then I am getting index not found error.

What are the configuration changes need to be done, in order to access the index with cluster.name appended, any information is helpful.

My use case is to check my application how does it fair with cluster queries.

My Shards count is default of 5.

I am using ELK Version:5.4.0

Below is my cluster health report

curl -XGET http://localhost:9200/_cluster/health?pretty=true
{
  "cluster_name" : "my_cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 5,
  "active_shards" : 5,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 5,
  "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" : 50.0
}

I need to make single node cluster up and running for local testing purpose.

After checking this link https://stackoverflow.com/questions/19967472/elasticsearch-unassigned-shards-how-to-fix, I turned the cluster state from yellow to green by executing the below

curl -XPUT 'localhost:9200/_settings' -d '
{
    "index" : {
        "number_of_replicas" : 0
    }
}'

Below is my latest cluster state,

curl -XGET http://localhost:9200/_cluster/health?pretty=true
{
  "cluster_name" : "my_cluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 5,
  "active_shards" : 5,
  "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
}

Still I am unable to access the index with cluster.name prefixed.

http://127.0.0.1:9200/my_cluster:hello_cluster/ 

Below is my cluster node information settings using elasticsearch-head plugin

{
"name": "node-1",
"transport_address": "127.0.0.1:9300",
"host": "127.0.0.1",
"ip": "127.0.0.1",
"version": "5.4.0",
"build_hash": "780f8c4",
"total_indexing_buffer": 211261849,
"roles": [
"master"
,
"data"
,
"ingest"
],
"settings": {
"cluster": {
"name": "my_cluster"
},
"node": {
"name": "node-1"
},
"path": {
"logs": "E:\ELK\elasticsearch-5.4.0\logs",
"home": "E:\ELK\elasticsearch-5.4.0"
},
"discovery": {
"zen": {
"minimum_master_nodes": "1",
"ping": {
"unicast": {
"hosts": [
"127.0.0.1"
]
}
}
}
},
"client": {
"type": "node"
},
"http": {
"type": {
"default": "netty4"
}
},
"transport": {
"type": {
"default": "netty4"
}
}
},
"os": {
"refresh_interval_in_millis": 1000,
"name": "Windows 10",
"arch": "amd64",
"version": "10.0",
"available_processors": 4,
"allocated_processors": 4
},
"process": {
"refresh_interval_in_millis": 1000,
"id": 125956,
"mlockall": false
},
"jvm": {
"pid": 125956,
"version": "1.8.0_202",
"vm_name": "Java HotSpot(TM) 64-Bit Server VM",
"vm_version": "25.202-b08",
"vm_vendor": "Oracle Corporation",
"start_time_in_millis": 1552457015599,
"mem": {
"heap_init_in_bytes": 2147483648,
"heap_max_in_bytes": 2112618496,
"non_heap_init_in_bytes": 2555904,
"non_heap_max_in_bytes": 0,
"direct_max_in_bytes": 2112618496
},
"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": 8,
"keep_alive": "5m",
"queue_size": -1
},
"listener": {
"type": "fixed",
"min": 2,
"max": 2,
"queue_size": -1
},
"index": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 200
},
"refresh": {
"type": "scaling",
"min": 1,
"max": 2,
"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": 2,
"keep_alive": "5m",
"queue_size": -1
},
"search": {
"type": "fixed",
"min": 7,
"max": 7,
"queue_size": 1000
},
"flush": {
"type": "scaling",
"min": 1,
"max": 2,
"keep_alive": "5m",
"queue_size": -1
},
"fetch_shard_store": {
"type": "scaling",
"min": 1,
"max": 8,
"keep_alive": "5m",
"queue_size": -1
},
"management": {
"type": "scaling",
"min": 1,
"max": 5,
"keep_alive": "5m",
"queue_size": -1
},
"get": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 1000
},
"bulk": {
"type": "fixed",
"min": 4,
"max": 4,
"queue_size": 200
},
"snapshot": {
"type": "scaling",
"min": 1,
"max": 2,
"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": [ ],
"modules": [
{
"name": "aggs-matrix-stats",
"version": "5.4.0",
"description": "Adds aggregations whose input are a list of numeric fields and output includes a matrix.",
"classname": "org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin",
"has_native_controller": false
}
,
{
"name": "ingest-common",
"version": "5.4.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",
"has_native_controller": false
}
,
{
"name": "lang-expression",
"version": "5.4.0",
"description": "Lucene expressions integration for Elasticsearch",
"classname": "org.elasticsearch.script.expression.ExpressionPlugin",
"has_native_controller": false
}
,
{
"name": "lang-groovy",
"version": "5.4.0",
"description": "Groovy scripting integration for Elasticsearch",
"classname": "org.elasticsearch.script.groovy.GroovyPlugin",
"has_native_controller": false
}
,
{
"name": "lang-mustache",
"version": "5.4.0",
"description": "Mustache scripting integration for Elasticsearch",
"classname": "org.elasticsearch.script.mustache.MustachePlugin",
"has_native_controller": false
}
,
{
"name": "lang-painless",
"version": "5.4.0",
"description": "An easy, safe and fast scripting language for Elasticsearch",
"classname": "org.elasticsearch.painless.PainlessPlugin",
"has_native_controller": false
}
,
{
"name": "percolator",
"version": "5.4.0",
"description": "Percolator module adds capability to index queries and query these queries by specifying documents",
"classname": "org.elasticsearch.percolator.PercolatorPlugin",
"has_native_controller": false
}
,
{
"name": "reindex",
"version": "5.4.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",
"has_native_controller": false
}
,
{
"name": "transport-netty3",
"version": "5.4.0",
"description": "Netty 3 based transport implementation",
"classname": "org.elasticsearch.transport.Netty3Plugin",
"has_native_controller": false
}
,
{
"name": "transport-netty4",
"version": "5.4.0",
"description": "Netty 4 based transport implementation",
"classname": "org.elasticsearch.transport.Netty4Plugin",
"has_native_controller": false
}
],
"ingest": {
"processors": [
{
"type": "append"
}
,
{
"type": "convert"
}
,
{
"type": "date"
}
,
{
"type": "date_index_name"
}
,
{
"type": "dot_expander"
}
,
{
"type": "fail"
}
,
{
"type": "foreach"
}
,
{
"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"
}
]
}
}

I am new to ELASTIC, am I doing some thing incorrect here?

DaveCTurner commented 5 years ago

Thanks very much for your interest in Elasticsearch.

This appears to be a user question, and we'd like to direct these kinds of things to the forums. If you can stop by there, we'd appreciate it. This allows us to use GitHub for verified bug reports, feature requests, and pull requests.

There's an active community in the forums that should be able to help get an answer to your question. As such, I hope you don't mind that I close this.

srirama-rayaprolu commented 5 years ago

Ok. I have created discussion and sharing link here for informational purpose, https://discuss.elastic.co/t/single-node-cluster/172095