Failed to start the client

Let me explain the configuration.

I have setup cluster, name is elasticSearch, of 2 nodes in our data center
where i forward the logs into these 2 nodes.

I have written a small java client program to access this cluster and is as
follows:

    TransportClient transportClient = new 

TransportClient(ImmutableSettings
.settingsBuilder().put("cluster.name",
"elasticsearch").build());
Client client = transportClient.addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByAddress(new
byte[] { ), 9300))
.addTransportAddress(
new
InetSocketTransportAddress(InetAddress.getByAddress(new byte[]
{}), 9300));
ClusterState clusterState =
client.admin().cluster().prepareState().execute().actionGet().getState();

node-1-ip,node-2-ip are the nodes address.

To access these machines i have to be VPN. Once I VPN and ran my program
from my laptop it works. However, when i change the code to

    NodeBuilder nb = new NodeBuilder().clusterName("elasticsearch");
    nb.settings().put("node.data", false);
    Node node = nb.client(true).node();
    node.start();

    Client client = node.client();
    ClusterState clusterState = 

client.admin().cluster().prepareState().execute().actionGet().getState();

I get the following exception:

Exception in thread "main"
org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at
org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

What am I doing wrong? Why TransportClient is working fine however, when i
create in memory node client it does not ?

thanks

--
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.

Probably your cluster does not accept multicast. Firewall???
You can also use unicast with nodes.

HTH

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

Le 3 mai 2013 à 20:26, vinod eligeti veligeti999@gmail.com a écrit :

Let me explain the configuration.

I have setup cluster, name is elasticSearch, of 2 nodes in our data center where i forward the logs into these 2 nodes.

I have written a small java client program to access this cluster and is as follows:

    TransportClient transportClient = new TransportClient(ImmutableSettings
            .settingsBuilder().put("cluster.name", "elasticsearch").build());
    Client client = transportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] { <node-1-ip>), 9300))
            .addTransportAddress(
                    new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] {<node-2-ip>}), 9300));
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

node-1-ip,node-2-ip are the nodes address.

To access these machines i have to be VPN. Once I VPN and ran my program from my laptop it works. However, when i change the code to

    NodeBuilder nb = new NodeBuilder().clusterName("elasticsearch");
    nb.settings().put("node.data", false);
    Node node = nb.client(true).node();
    node.start();

    Client client = node.client();
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

I get the following exception:

Exception in thread "main" org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

What am I doing wrong? Why TransportClient is working fine however, when i create in memory node client it does not ?

thanks

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.

--
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.

If it is a firewall issue how come TransportClient able to talk to cluster?

Also David, You mentioned about unicast with nodes, how do I do that?

On Fri, May 3, 2013 at 12:18 PM, David Pilato david@pilato.fr wrote:

Probably your cluster does not accept multicast. Firewall???
You can also use unicast with nodes.

HTH

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

Le 3 mai 2013 à 20:26, vinod eligeti veligeti999@gmail.com a écrit :

Let me explain the configuration.

I have setup cluster, name is elasticSearch, of 2 nodes in our data center
where i forward the logs into these 2 nodes.

I have written a small java client program to access this cluster and is
as follows:

    TransportClient transportClient = new

TransportClient(ImmutableSettings
.settingsBuilder().put("cluster.name",
"elasticsearch").build());
Client client = transportClient.addTransportAddress(
new
InetSocketTransportAddress(InetAddress.getByAddress(new byte[] {
), 9300))
.addTransportAddress(
new
InetSocketTransportAddress(InetAddress.getByAddress(new byte[]
{}), 9300));
ClusterState clusterState =
client.admin().cluster().prepareState().execute().actionGet().getState();

node-1-ip,node-2-ip are the nodes address.

To access these machines i have to be VPN. Once I VPN and ran my program
from my laptop it works. However, when i change the code to

    NodeBuilder nb = new NodeBuilder().clusterName("elasticsearch");
    nb.settings().put("node.data", false);
    Node node = nb.client(true).node();
    node.start();

    Client client = node.client();
    ClusterState clusterState =

client.admin().cluster().prepareState().execute().actionGet().getState();

I get the following exception:

Exception in thread "main"
org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at
org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

What am I doing wrong? Why TransportClient is working fine however, when i
create in memory node client it does not ?

thanks

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/xiz_QrSc8no/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 meant firewall issue for multicast: http://en.wikipedia.org/wiki/Multicast
It's using UDP with:
group The group address to use. Defaults to 224.2.2.4.
port The port to use. Defaults to 54328.
See http://www.elasticsearch.org/guide/reference/modules/discovery/zen/

So even if Unicast is working, discovery could not work.

My 2 cents.

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

Le 3 mai 2013 à 22:34, vinod eligeti veligeti999@gmail.com a écrit :

If it is a firewall issue how come TransportClient able to talk to cluster?

Also David, You mentioned about unicast with nodes, how do I do that?

On Fri, May 3, 2013 at 12:18 PM, David Pilato david@pilato.fr wrote:

Probably your cluster does not accept multicast. Firewall???
You can also use unicast with nodes.

HTH

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

Le 3 mai 2013 à 20:26, vinod eligeti veligeti999@gmail.com a écrit :

Let me explain the configuration.

I have setup cluster, name is elasticSearch, of 2 nodes in our data center where i forward the logs into these 2 nodes.

I have written a small java client program to access this cluster and is as follows:

    TransportClient transportClient = new TransportClient(ImmutableSettings
            .settingsBuilder().put("cluster.name", "elasticsearch").build());
    Client client = transportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] { <node-1-ip>), 9300))
            .addTransportAddress(
                    new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] {<node-2-ip>}), 9300));
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

node-1-ip,node-2-ip are the nodes address.

To access these machines i have to be VPN. Once I VPN and ran my program from my laptop it works. However, when i change the code to

    NodeBuilder nb = new NodeBuilder().clusterName("elasticsearch");
    nb.settings().put("node.data", false);
    Node node = nb.client(true).node();
    node.start();

    Client client = node.client();
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

I get the following exception:

Exception in thread "main" org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

What am I doing wrong? Why TransportClient is working fine however, when i create in memory node client it does not ?

thanks

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.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/xiz_QrSc8no/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.

--
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.

Forget to answer to last question.
See elasticsearch.yml file:
https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml#L319
https://github.com/elasticsearch/elasticsearch/blob/master/config/elasticsearch.yml#L324

So set:
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node-1-ip:9300", "node-2-ip:9300"]

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

Le 4 mai 2013 à 01:50, David Pilato david@pilato.fr a écrit :

I meant firewall issue for multicast: http://en.wikipedia.org/wiki/Multicast
It's using UDP with:
group The group address to use. Defaults to 224.2.2.4.
port The port to use. Defaults to 54328.
See http://www.elasticsearch.org/guide/reference/modules/discovery/zen/

So even if Unicast is working, discovery could not work.

My 2 cents.

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

Le 3 mai 2013 à 22:34, vinod eligeti veligeti999@gmail.com a écrit :

If it is a firewall issue how come TransportClient able to talk to cluster?

Also David, You mentioned about unicast with nodes, how do I do that?

On Fri, May 3, 2013 at 12:18 PM, David Pilato david@pilato.fr wrote:

Probably your cluster does not accept multicast. Firewall???
You can also use unicast with nodes.

HTH

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

Le 3 mai 2013 à 20:26, vinod eligeti veligeti999@gmail.com a écrit :

Let me explain the configuration.

I have setup cluster, name is elasticSearch, of 2 nodes in our data center where i forward the logs into these 2 nodes.

I have written a small java client program to access this cluster and is as follows:

    TransportClient transportClient = new TransportClient(ImmutableSettings
            .settingsBuilder().put("cluster.name", "elasticsearch").build());
    Client client = transportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] { <node-1-ip>), 9300))
            .addTransportAddress(
                    new InetSocketTransportAddress(InetAddress.getByAddress(new byte[] {<node-2-ip>}), 9300));
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

node-1-ip,node-2-ip are the nodes address.

To access these machines i have to be VPN. Once I VPN and ran my program from my laptop it works. However, when i change the code to

    NodeBuilder nb = new NodeBuilder().clusterName("elasticsearch");
    nb.settings().put("node.data", false);
    Node node = nb.client(true).node();
    node.start();

    Client client = node.client();
    ClusterState clusterState = client.admin().cluster().prepareState().execute().actionGet().getState();

I get the following exception:

Exception in thread "main" org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]
at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

What am I doing wrong? Why TransportClient is working fine however, when i create in memory node client it does not ?

thanks

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.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/xiz_QrSc8no/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.

--
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.

--
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.