Adding new node to the local machine

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--

Yes you can. In the configuration you would need to change to important
settings: the ports (9200/9300) and the directory of the data directory.
Elasticsearch by default stores the index in memory outside of the JVM, so
keep that in mind when deploying two nodes on the same computer.

Search the mailing list for other message on the topic (most change the
ports to 9201/9301, so those would be good search terms).

--
Ivan

On Sun, Jan 6, 2013 at 8:31 PM, JD jdalecki@tycoint.com wrote:

Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?

--

Hi,

Thanks for the reply. I have tried to search on goggle and forum for the
instructions on how to add new local node to elasticsearch cluster, but did
not find anything concrete.

Can you point me to some old post with the instructions or something like
that.

What I have done is this:

  1. Run my main elasticsearch from the elsaticsearch/bin folder as usual
    (no change in elasticsearch.yml file – ports 9200/9300)

  2. Copied the main elasticsearch folder (with its
    bin/config/data/lib/logs/plugin folders) to a separate folder called
    “elasticsearch-0.20.1 – Copy”

  3. I have changed in the “elasticsearch-0.20.1 – Copy” the
    elasticsearch.yml to use ports 9201 and 9301 instead of default ones -
    9200/9300.

  4. I have deleted everything under “elasticsearch-0.20.1 – Copy /data”
    folder and started the second elasticsearch instance.

… but the nodes are not synchronized

When I execute the command:
http://localhost:9200/product_index/Product/_search it returns back
expected result (some number of my product records), but when I execute
http://localhost:9201/product_index/Product/_search it returns
“IndexMissingException[[product_index] missing]” error – so both instances
do not talk to each other.

Regards,

Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--

Just run a new instance same as you run the initial one - dont copy the dir..
Just run it again.

-- Shaun

On Monday, 7 January 2013 at 15:01, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the main clustersearch (any instructions).?
Regards,
Janusz

--

--

Hi,

OK. I have done it and it looks better as I can see in
“C:\tools\elasticsearch-0.20.1\data\elasticsearch\nodes” two nodes ‘0’ and
‘1’. But still when I execute the command:
http://localhost:9200/product_index/Product/_search it returns back
expected result (some number of my product records), but when I execute
http://localhost:9201/product_index/Product/_search it returns
“IndexMissingException[[product_index] missing]” error – so both instances
do not talk to each other.

I have to admit that I set “discovery.zen.ping.multicast.enabled: false”
because I had some problems with elasticsearch when this flag was on. Does
it matter?

Regards,

Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--

Yes. If you disable multicast, you have to define all nodes with unicast.
Look at comments in elasticsearch.yml file.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 janv. 2013 à 03:04, JD jdalecki@tycoint.com a écrit :

Hi,
OK. I have done it and it looks better as I can see in “C:\tools\elasticsearch-0.20.1\data\elasticsearch\nodes” two nodes ‘0’ and ‘1’. But still when I execute the command: http://localhost:9200/product_index/Product/_search it returns back expected result (some number of my product records), but when I execute http://localhost:9201/product_index/Product/_search it returns “IndexMissingException[[product_index] missing]” error – so both instances do not talk to each other.
I have to admit that I set “discovery.zen.ping.multicast.enabled: false” because I had some problems with elasticsearch when this flag was on. Does it matter?
Regards,
Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the main clustersearch (any instructions).?
Regards,
Janusz
--

--

OK. Thanks. After your comment I got it to work.

I have used 'head' GUI to see my cluster – but can’t see replica set (see
file attached) – where is it. Is there any query param that would show
replica set as well?

Regards,

Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--

Replicas are shards without the thick black box around.

So they appear on your screenshot.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 janv. 2013 à 07:07, JD jdalecki@tycoint.com a écrit :

OK. Thanks. After your comment I got it to work.

I have used 'head' GUI to see my cluster – but can’t see replica set (see file attached) – where is it. Is there any query param that would show replica set as well?

Regards,

Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the main clustersearch (any instructions).?
Regards,
Janusz
--

<shards.docx>

--

Thanks. It looks like I am getting blind slowly.
Regards,
Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--

Is there any doc(screen explanation) on that?
I tried wiki, but found no docs.
Regards,
Janusz

On Monday, 7 January 2013 15:31:04 UTC+11, JD wrote:

Hi,
Can I add new clustersearch node on the same laptop that is running the
main clustersearch (any instructions).?
Regards,
Janusz

--