Vagrant and eleastic search

I'm trying to test elastic search with vagrant. I have a simple setup with
two identical nodes.

One annoying thing with vagrant is that it sets up a useless eth0 and a
eth1 with the actual connection to the outside world and the other vagrant
nodes:

Node1:

eth0 Link encap:Ethernet HWaddr 08:00:27:fe:aa:af
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fefe:aaaf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3138 errors:0 dropped:0 overruns:0 frame:0
TX packets:2180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280661 (280.6 KB) TX bytes:362130 (362.1 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:68:9e:15
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe68:9e15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214 errors:0 dropped:0 overruns:0 frame:0
TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30512 (30.5 KB) TX bytes:27278 (27.2 KB)

Node2:

vagrant@testbox2:/opt/elasticsearch$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:fe:aa:af
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fefe:aaaf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1681 errors:0 dropped:0 overruns:0 frame:0
TX packets:1325 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:162410 (162.4 KB) TX bytes:176003 (176.0 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:77:9e:fc
inet addr:192.168.33.11 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe77:9efc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:169 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24804 (24.8 KB) TX bytes:19102 (19.1 KB)

Note the eth0 ip address is the same on both nodes, making eth0 useless for
actual networking.

Now my problem is convincing elasticsearch to ignore eth0. I'm using system
properties to configure elastic search (starting it programmatically):

java.lang.System.setProperty("es.foreground","true")
java.lang.System.setProperty("wrapper.service","false")
java.lang.System.setProperty("es.path.data","/opt/elasticsearch")
java.lang.System.setProperty("es.path.logs","/var/log/elasticsearch")
java.lang.System.setProperty("es.cluster.name","localstream")

vagrant specific network settings

java.lang.System.setProperty("es.network.bind_host","eth1:ipv4")
java.lang.System.setProperty("es.network.publish_host:","eth1:ipv4")
java.lang.System.setProperty("es.network.host:","eth1:ipv4")
java.lang.System.setProperty("es.http.host:","eth1:ipv4")
java.lang.System.setProperty("es.transport.host:","eth1:ipv4")

As you can see, I'm doing my best here to point every documented property I
could find towards eth1.

On startup the elastic search still ends up binding to eth0.
node1
INFO [main] (Log4jESLogger.java:104) - [Delphine Courtney] bound_address
{inet[/192.168.33.10:9300]}, publish_address {inet[/10.0.2.15:9300]}
INFO [elasticsearch[Delphine Courtney][clusterService#updateTask][T#1]]
(Log4jESLogger.java:104) - [Delphine Courtney] new_master [Delphine
Courtney][bHZNl0_cTXyG27kXr_qWrg][inet[/10.0.2.15:9300]], reason:
zen-disco-join (elected_as_master)
WARN [elasticsearch[Delphine Courtney][clusterService#updateTask][T#1]]
(Log4jESLogger.java:119) - [Delphine Courtney] failed to connect to node
[[Delphine Courtney][bHZNl0_cTXyG27kXr_qWrg][inet[/10.0.2.15:9300]]]

node2
INFO [main] (Log4jESLogger.java:104) - [Bloodaxe] bound_address
{inet[/192.168.33.11:9300]}, publish_address {inet[/10.0.2.15:9300]}
INFO [elasticsearch[Bloodaxe][clusterService#updateTask][T#1]]
(Log4jESLogger.java:104) - [Bloodaxe] new_master
[Bloodaxe][Z2uqguN7R0KvkTGCinIrDQ][inet[/10.0.2.15:9300]], reason:
zen-disco-join (elected_as_master)
WARN [elasticsearch[Bloodaxe][clusterService#updateTask][T#1]]
(Log4jESLogger.java:119) - [Bloodaxe] failed to connect to node
[[Bloodaxe][Z2uqguN7R0KvkTGCinIrDQ][inet[/10.0.2.15:9300]]]

What am I doing wrong here? Did I miss a few properties?

Jilles

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I made a copy paste mistake and ended up with a trailing : in a few of the
property names. Stupid. Once I fixed that, it started working.

Jilles

On Tuesday, February 19, 2013 2:09:34 PM UTC+1, Jilles van Gurp wrote:

I'm trying to test elastic search with vagrant. I have a simple setup with
two identical nodes.

One annoying thing with vagrant is that it sets up a useless eth0 and a
eth1 with the actual connection to the outside world and the other vagrant
nodes:

Node1:

eth0 Link encap:Ethernet HWaddr 08:00:27:fe:aa:af
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fefe:aaaf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3138 errors:0 dropped:0 overruns:0 frame:0
TX packets:2180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280661 (280.6 KB) TX bytes:362130 (362.1 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:68:9e:15
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe68:9e15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214 errors:0 dropped:0 overruns:0 frame:0
TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30512 (30.5 KB) TX bytes:27278 (27.2 KB)

Node2:

vagrant@testbox2:/opt/elasticsearch$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:fe:aa:af
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fefe:aaaf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1681 errors:0 dropped:0 overruns:0 frame:0
TX packets:1325 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:162410 (162.4 KB) TX bytes:176003 (176.0 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:77:9e:fc
inet addr:192.168.33.11 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe77:9efc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:169 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24804 (24.8 KB) TX bytes:19102 (19.1 KB)

Note the eth0 ip address is the same on both nodes, making eth0 useless
for actual networking.

Now my problem is convincing elasticsearch to ignore eth0. I'm using
system properties to configure elastic search (starting it
programmatically):

java.lang.System.setProperty("es.foreground","true")
java.lang.System.setProperty("wrapper.service","false")
java.lang.System.setProperty("es.path.data","/opt/elasticsearch")
java.lang.System.setProperty("es.path.logs","/var/log/elasticsearch")
java.lang.System.setProperty("es.cluster.name","localstream")

vagrant specific network settings

java.lang.System.setProperty("es.network.bind_host","eth1:ipv4")
java.lang.System.setProperty("es.network.publish_host:","eth1:ipv4")
java.lang.System.setProperty("es.network.host:","eth1:ipv4")
java.lang.System.setProperty("es.http.host:","eth1:ipv4")
java.lang.System.setProperty("es.transport.host:","eth1:ipv4")

As you can see, I'm doing my best here to point every documented property
I could find towards eth1.

On startup the elastic search still ends up binding to eth0.
node1
INFO [main] (Log4jESLogger.java:104) - [Delphine Courtney] bound_address
{inet[/192.168.33.10:9300]}, publish_address {inet[/10.0.2.15:9300]}
INFO [elasticsearch[Delphine Courtney][clusterService#updateTask][T#1]]
(Log4jESLogger.java:104) - [Delphine Courtney] new_master [Delphine
Courtney][bHZNl0_cTXyG27kXr_qWrg][inet[/10.0.2.15:9300]], reason:
zen-disco-join (elected_as_master)
WARN [elasticsearch[Delphine Courtney][clusterService#updateTask][T#1]]
(Log4jESLogger.java:119) - [Delphine Courtney] failed to connect to node
[[Delphine Courtney][bHZNl0_cTXyG27kXr_qWrg][inet[/10.0.2.15:9300]]]

node2
INFO [main] (Log4jESLogger.java:104) - [Bloodaxe] bound_address
{inet[/192.168.33.11:9300]}, publish_address {inet[/10.0.2.15:9300]}
INFO [elasticsearch[Bloodaxe][clusterService#updateTask][T#1]]
(Log4jESLogger.java:104) - [Bloodaxe] new_master
[Bloodaxe][Z2uqguN7R0KvkTGCinIrDQ][inet[/10.0.2.15:9300]], reason:
zen-disco-join (elected_as_master)
WARN [elasticsearch[Bloodaxe][clusterService#updateTask][T#1]]
(Log4jESLogger.java:119) - [Bloodaxe] failed to connect to node
[[Bloodaxe][Z2uqguN7R0KvkTGCinIrDQ][inet[/10.0.2.15:9300]]]

What am I doing wrong here? Did I miss a few properties?

Jilles

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.