Connecting a ec2 java application to an ec2 cluster

I have an ec2 cluster of elastic search nodes out and running on amazon that are setup with the cloud-aws plugin. The nodes are finding each other with no problem. My issue is that when I deploy my grails application to the ec2 network, it gets a MasterNotDiscoveredException. When I configure the application to use discovery type ec2, it throws an invalid settings exception. This is probably because the cloud plugin is not installed in the grails application. How can I get the grails application to discover the master node? My configuration for the elastic search nodes:

cluster:
name: es_qa

network:
host: local

cloud:
aws:
access_key: myaccesskey
secret_key: mysecretkey

discovery:
type: ec2

My configuration for the node client in the grails application:

mode is node
node client is true

settings:

"cluster.name": "es_qa"

Do you have the cloud-aws plugin jar file in the classpath? Including the aws dependency?

On Friday, July 15, 2011 at 10:00 PM, hoffmandirt wrote:

I have an ec2 cluster of Elasticsearch nodes out and running on amazon that
are setup with the cloud-aws plugin. The nodes are finding each other with
no problem. My issue is that when I deploy my grails application to the ec2
network, it gets a MasterNotDiscoveredException. When I configure the
application to use discovery type ec2, it throws an invalid settings
exception. This is probably because the cloud plugin is not installed in the
grails application. How can I get the grails application to discover the
master node? My configuration for the Elasticsearch nodes:

cluster:
name: es_qa

network:
host: local

cloud:
aws:
access_key: myaccesskey
secret_key: mysecretkey

discovery:
type: ec2

My configuration for the node client in the grails application:

mode is node
node client is true

settings:

"cluster.name (http://cluster.name)": "es_qa"

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Connecting-a-ec2-java-application-to-an-ec2-cluster-tp3172978p3172978.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com (http://Nabble.com).

Do you have the cloud-aws plugin jar file in the classpath? Including the aws dependency?

Thanks! That was the issue. I didn't realize that there was an elasticsearch dependency for the cloud-aws plugin. Just in case anyone else stumbles upon this, add this line to your grails BuildConfig.groovy file in the dependencies section:

runtime 'org.elasticsearch:elasticsearch-cloud-aws:0.16.4'