Mulitple nodes on one server for testing


#1

Im trying to setup 2 nodes on one machine with the following configuration:
es-all-01 (expecting this to be MASTER, CLIENT, DATA):
http.port: 9201
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost"]
discovery.zen.minimum_master_nodes: 1

es-data-01 (expecting this to be DATA):
node.data: true
node.master: false
http.port: 9202
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost"]
discovery.zen.minimum_master_nodes: 1

They are both standalone instances with separate data/log/plugin paths.
I have the head plugin installed on both ES instances but i go to the 9201 url (es-all-01).

When i start up the es instances, i start es-data-01 first, then es-all-01. es-all-01 is successfully elected as master.
In the head Overview page, the cluster health is green and both nodes are recognized.

I also have Kibana set up pointing to the es-all-01 node.
When i start up kibana, the .kibana index gets created on es-all-01:
[.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [config]
[.kibana] create_mapping [index-pattern]
[.kibana] update_mapping [config]

In the head Overview, theres an appropriate green shard [0] on es-all-01.
However, on es-data-01, the shard [0] is yellow as well as the overall cluster health.

The below exceptions are raised:

[2016-01-22 13:59:30,180][DEBUG][action.admin.indices.stats] [es-data-01] [indices:monitor/stats] failed to execute operation for shard [[.kibana][0], node[k4LxRZf-R4i1o7CLwUZjLA], [R], v[2], s[INITIALIZING], a[id=RcYbqYZcQ2S45sTg3k_kiw], unassigned_info[[reason=INDEX_CREATED], at[2016-01-22T18:57:13.582Z]]]
[.kibana][[.kibana][0]] BroadcastShardOperationFailedException[operation indices:monitor/stats failed]; nested: IndexNotFoundException[no such index];
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.onShardOperation(TransportBroadcastByNodeAction.java:405)
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:382)
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.messageReceived(TransportBroadcastByNodeAction.java:371)
at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:299)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: [.kibana] IndexNotFoundException[no such index]
at org.elasticsearch.indices.IndicesService.indexServiceSafe(IndicesService.java:310)
at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:97)
at org.elasticsearch.action.admin.indices.stats.TransportIndicesStatsAction.shardOperation(TransportIndicesStatsAction.java:47)
at org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction$BroadcastByNodeTransportRequestHandler.onShardOperation(TransportBroadcastByNodeAction.java:401)
... 7 more

And when i click on the yellow shard of es-data-01:
{
"state": "INITIALIZING",
"primary": false,
"node": "k4LxRZf-R4i1o7CLwUZjLA",
"relocating_node": null,
"shard": 0,
"index": ".kibana",
"version": 2,
"allocation_id": {
"id": "RcYbqYZcQ2S45sTg3k_kiw"
},
"unassigned_info": {
"reason": "INDEX_CREATED",
"at": "2016-01-22T18:57:13.582Z"
}
}

From my understanding, the .kibana index on primary shard on es-all-01 should get replicated automatically to es-data-01 but seems like its stuck in a INITIALIZING state due to the exception.

Is my setup correct to operate two nodes on the same server?
Any help would be really appreciated. Let me know if any more info is needed.


(Mark Walkom) #2

What does _cat/nodes show?


#3

IP_ADDRESS IP_ADDRESS 1 86 3.57 d - es-data-01
IP_ADDRESS IP_ADDRESS 0 86 3.57 d * es-all-01

where IP_ADDRESS are all the same.


#4

I actually also tried just deploying the node on a separate server and it still has the same issue. So maybe the problem is more with my configuration?


(system) #5