EC2 discovery in Java


(Slava G ) #1

Hi,
I've set all those parameters :
settingBuilder.put("discovery.type", "ec2");
settingBuilder.put("cloud.account","....");
settingBuilder.put("cloud.key", ".....");
settingBuilder.put("compute.type", "amazon");
settingBuilder.put("logger.discovery", "TRACE");

and called
NodeBuilder nodeBuilder().settings(setting).clusterName("caindexcluster").client(true).node();

After few second i got next message : [Warhawk] waited for 30s and no
initial state was set by the discovery
and then exception org.elasticsearch.discovery.MasterNotDiscoveredException:
I tried to put discovery log to TRACE by setting
this settingBuilder.put("logger.discovery", "TRACE");, but it's doesn't
seems to work.

First question how can I enable ES log for the discovery in the java to
TRACE
And second , what did I miss in the configuration params.

The cluster itself is running and from the same server where this java code
is executed calling
curl -XGET 'http://10.190.224.44:9200/_cluster/state?pretty=1' returns:

{
"cluster_name" : "indexcluster",
"master_node" : "SHE8gNd2TY-r9GLHDtO-YQ",
"blocks" : {
},
"nodes" : {
"SHE8gNd2TY-r9GLHDtO-YQ" : {
"name" : "Tyrannosaur",
"transport_address" : "inet[/10.190.224.44:9300]",
"attributes" : {
}
},
"9nCpGOiOSUuksGwTeWwTDQ" : {
"name" : "Krystalin",
"transport_address" : "inet[/10.190.239.76:9300]",
"attributes" : {
}
}
},
"metadata" : {
"templates" : {
},
"indices" : {
}
},
"routing_table" : {
"indices" : {
}
},
"routing_nodes" : {
"unassigned" : [ ],
"nodes" : {
}
},
"allocations" : [ ]
}

Thank You.


(Shay Banon) #2

When you are running elasticsearch embedded in your Java app, it will
automatically use whatever logging you are using. So, configure the logging
in your app logging config, and note, when running embedded, the logging
categories are prefixed with org.elasticsearch.

On Tue, Jan 17, 2012 at 12:49 AM, slavag slavago@gmail.com wrote:

Hi,
I've set all those parameters :
settingBuilder.put("discovery.type", "ec2");
settingBuilder.put("cloud.account","....");
settingBuilder.put("cloud.key", ".....");
settingBuilder.put("compute.type", "amazon");
settingBuilder.put("logger.discovery", "TRACE");

and called
NodeBuilder nodeBuilder().settings(setting).clusterName("caindexcluster").client(true).node();

After few second i got next message : [Warhawk] waited for 30s and no
initial state was set by the discovery
and then
exception org.elasticsearch.discovery.MasterNotDiscoveredException:
I tried to put discovery log to TRACE by setting
this settingBuilder.put("logger.discovery", "TRACE");, but it's doesn't
seems to work.

First question how can I enable ES log for the discovery in the java to
TRACE
And second , what did I miss in the configuration params.

The cluster itself is running and from the same server where this java
code is executed calling
curl -XGET 'http://10.190.224.44:9200/_cluster/state?pretty=1' returns:

{
"cluster_name" : "indexcluster",
"master_node" : "SHE8gNd2TY-r9GLHDtO-YQ",
"blocks" : {
},
"nodes" : {
"SHE8gNd2TY-r9GLHDtO-YQ" : {
"name" : "Tyrannosaur",
"transport_address" : "inet[/10.190.224.44:9300]",
"attributes" : {
}
},
"9nCpGOiOSUuksGwTeWwTDQ" : {
"name" : "Krystalin",
"transport_address" : "inet[/10.190.239.76:9300]",
"attributes" : {
}
}
},
"metadata" : {
"templates" : {
},
"indices" : {
}
},
"routing_table" : {
"indices" : {
}
},
"routing_nodes" : {
"unassigned" : [ ],
"nodes" : {
}
},
"allocations" : [ ]
}

Thank You.


(Slava G ) #3

Thank You.
And problem was again EC2 security group :slight_smile:


(system) #4