NPE when trying to create new index

Hi,

I am running a data node (0.19.8) on my machine using the java API from
scala repl and then running my app that is starting a no-data client node
that successfully connects to the previous. However, when trying to create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to create
index
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at
org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at
org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell], cause
[api]]: no change in cluster_state

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API from
scala repl and then running my app that is starting a no-data client node
that successfully connects to the previous. However, when trying to create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to create
index
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at
org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at
org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at
org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell], cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

I start the data node with this: val node =
nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()
and the client node with:
val settings =
ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",
"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API from
scala repl and then running my app that is starting a no-data client
node
that successfully connects to the previous. However, when trying to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)

at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)

at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)

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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)

at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at
org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at
org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)

at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)

at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)

at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)

at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)

at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)

... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell], cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =
nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()
and the client node with:
val settings =
ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",
"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API from
scala repl and then running my app that is starting a no-data client
node
that successfully connects to the previous. However, when trying to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at
org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell], cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

Sorry,

val node =
nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()
val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API. If I
run ES on different machine normally (original shell script), it works just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen wrote:

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()

and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",

"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API
from
scala repl and then running my app that is starting a no-data client
node
that successfully connects to the previous. However, when trying to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)

at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)

at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)

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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)

at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)

at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)

at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)

at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)

at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)

at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)

... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

Hi Israel,

I tried to reproduce the error you reported. I didn't get the NPE you
reported. However the client node was unable to connect to the data
node.
After removing the "discovery.zen.ping.timeout" option the client was
able to connect to the data node. I was also able to create the index
without
a problem (via the Java client and curl). Here is the code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("discovery.zen.ping.multicast.enabled", "false")
.put("discovery.zen.ping.unicast.hosts", "localhost:9300")
.build();

Node node1 = NodeBuilder.nodeBuilder()
        .clusterName("mmm").data(true).client(false).local(false).build().start();

Node node2 = NodeBuilder.nodeBuilder()
        .settings(settings)
        .clusterName("mmm").client(true).local(false).build().start();
Client client = node2.client();

CreateIndexRequestBuilder builder =

client.admin().indices().prepareCreate("cmwell");
CreateIndexResponse response =
client.admin().indices().create(builder.request()).actionGet();

Martijn

On 26 July 2012 19:03, Israel Klein israel.klein@gmail.com wrote:

Sorry,

val node =
nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()
val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API. If I
run ES on different machine normally (original shell script), it works just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen wrote:

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()
and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",
"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API
from
scala repl and then running my app that is starting a no-data client
node
that successfully connects to the previous. However, when trying to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

Could it be possible that scala somehow messes up elasticsearch
classloader? Could you try running elasticsearch as a stand alone server?
It looks like thishttps://github.com/elasticsearch/elasticsearch/blob/0.19/src/main/java/org/elasticsearch/index/mapper/MapperService.java#L116resource is not getting loaded for some reason. I don't really see any
other way for this exception to occur.

On Friday, July 27, 2012 6:00:22 AM UTC-4, Martijn v Groningen wrote:

Hi Israel,

I tried to reproduce the error you reported. I didn't get the NPE you
reported. However the client node was unable to connect to the data
node.
After removing the "discovery.zen.ping.timeout" option the client was
able to connect to the data node. I was also able to create the index
without
a problem (via the Java client and curl). Here is the code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("discovery.zen.ping.multicast.enabled", "false")
.put("discovery.zen.ping.unicast.hosts", "localhost:9300")
.build();

Node node1 = NodeBuilder.nodeBuilder() 

.clusterName("mmm").data(true).client(false).local(false).build().start();

Node node2 = NodeBuilder.nodeBuilder() 
        .settings(settings) 
        .clusterName("mmm").client(true).local(false).build().start(); 
Client client = node2.client(); 

CreateIndexRequestBuilder builder = 

client.admin().indices().prepareCreate("cmwell");
CreateIndexResponse response =
client.admin().indices().create(builder.request()).actionGet();

Martijn

On 26 July 2012 19:03, Israel Klein israel.klein@gmail.com wrote:

Sorry,

val node =

nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()

val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API. If
I
run ES on different machine normally (original shell script), it works
just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen wrote:

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()

and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",

"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen
wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets
to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API
from
scala repl and then running my app that is starting a no-data
client
node
that successfully connects to the previous. However, when trying
to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed
to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)

at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)

at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)

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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)

at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)

at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)

at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)

at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)

at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)

at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)

... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

Yes, that could be the underlying issue causing this problem.
Israel: I was using they api from Java and not Scala. Can you port
some of the code to Java and see if can create an index successfully?

Martijn

On 27 July 2012 19:00, Igor Motov imotov@gmail.com wrote:

Could it be possible that scala somehow messes up elasticsearch classloader?
Could you try running elasticsearch as a stand alone server? It looks like
this resource is not getting loaded for some reason. I don't really see any
other way for this exception to occur.

On Friday, July 27, 2012 6:00:22 AM UTC-4, Martijn v Groningen wrote:

Hi Israel,

I tried to reproduce the error you reported. I didn't get the NPE you
reported. However the client node was unable to connect to the data
node.
After removing the "discovery.zen.ping.timeout" option the client was
able to connect to the data node. I was also able to create the index
without
a problem (via the Java client and curl). Here is the code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("discovery.zen.ping.multicast.enabled", "false")
.put("discovery.zen.ping.unicast.hosts", "localhost:9300")
.build();

Node node1 = NodeBuilder.nodeBuilder()

.clusterName("mmm").data(true).client(false).local(false).build().start();

Node node2 = NodeBuilder.nodeBuilder()
        .settings(settings)
        .clusterName("mmm").client(true).local(false).build().start();
Client client = node2.client();

CreateIndexRequestBuilder builder =

client.admin().indices().prepareCreate("cmwell");
CreateIndexResponse response =
client.admin().indices().create(builder.request()).actionGet();

Martijn

On 26 July 2012 19:03, Israel Klein israel.klein@gmail.com wrote:

Sorry,

val node =

nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()
val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API. If
I
run ES on different machine normally (original shell script), it works
just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen wrote:

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()
and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",
"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen
wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets
to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API
from
scala repl and then running my app that is starting a no-data
client
node
that successfully connects to the previous. However, when trying
to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed
to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

I am using ES as client from scala and it work OK. In this case, I tried to
run the server from Scala REPL which seemed to work fine until the point of
trying to create an index. Weird...

On Friday, July 27, 2012 10:54:06 PM UTC+3, Martijn v Groningen wrote:

Yes, that could be the underlying issue causing this problem.
Israel: I was using they api from Java and not Scala. Can you port
some of the code to Java and see if can create an index successfully?

Martijn

On 27 July 2012 19:00, Igor Motov imotov@gmail.com wrote:

Could it be possible that scala somehow messes up elasticsearch
classloader?
Could you try running elasticsearch as a stand alone server? It looks
like
this resource is not getting loaded for some reason. I don't really see
any
other way for this exception to occur.

On Friday, July 27, 2012 6:00:22 AM UTC-4, Martijn v Groningen wrote:

Hi Israel,

I tried to reproduce the error you reported. I didn't get the NPE you
reported. However the client node was unable to connect to the data
node.
After removing the "discovery.zen.ping.timeout" option the client was
able to connect to the data node. I was also able to create the index
without
a problem (via the Java client and curl). Here is the code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("discovery.zen.ping.multicast.enabled", "false")
.put("discovery.zen.ping.unicast.hosts", "localhost:9300")
.build();

Node node1 = NodeBuilder.nodeBuilder() 

.clusterName("mmm").data(true).client(false).local(false).build().start();

Node node2 = NodeBuilder.nodeBuilder() 
        .settings(settings) 

.clusterName("mmm").client(true).local(false).build().start();

Client client = node2.client(); 

CreateIndexRequestBuilder builder = 

client.admin().indices().prepareCreate("cmwell");
CreateIndexResponse response =
client.admin().indices().create(builder.request()).actionGet();

Martijn

On 26 July 2012 19:03, Israel Klein israel.klein@gmail.com wrote:

Sorry,

val node =

nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()

val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API.
If
I
run ES on different machine normally (original shell script), it
works
just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen
wrote:

I think I'm missing something here for the client node. I only see
the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()

and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",

"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout",
"100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen
wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code
snippets
to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com
wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java
API
from
scala repl and then running my app that is starting a no-data
client
node
that successfully connects to the previous. However, when
trying
to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell]
failed
to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)

at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)

at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)

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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)

at
sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at
org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at
org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at
org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at
org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)

at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)

at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)

at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)

at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)

at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)

at
org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)

at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)

at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)

at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)

at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)

at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)

at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)

at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)

... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index
[cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

It seems to be class loader shenanigans, this change should fix it (will be in upcoming 0.19.9): https://github.com/elasticsearch/elasticsearch/commit/7283cfd595850090b58cf2e762236474b9b8707b.

On Jul 30, 2012, at 1:39 PM, Israel Klein israel.klein@gmail.com wrote:

I am using ES as client from scala and it work OK. In this case, I tried to run the server from Scala REPL which seemed to work fine until the point of trying to create an index. Weird...

On Friday, July 27, 2012 10:54:06 PM UTC+3, Martijn v Groningen wrote:
Yes, that could be the underlying issue causing this problem.
Israel: I was using they api from Java and not Scala. Can you port
some of the code to Java and see if can create an index successfully?

Martijn

On 27 July 2012 19:00, Igor Motov imotov@gmail.com wrote:

Could it be possible that scala somehow messes up elasticsearch classloader?
Could you try running elasticsearch as a stand alone server? It looks like
this resource is not getting loaded for some reason. I don't really see any
other way for this exception to occur.

On Friday, July 27, 2012 6:00:22 AM UTC-4, Martijn v Groningen wrote:

Hi Israel,

I tried to reproduce the error you reported. I didn't get the NPE you
reported. However the client node was unable to connect to the data
node.
After removing the "discovery.zen.ping.timeout" option the client was
able to connect to the data node. I was also able to create the index
without
a problem (via the Java client and curl). Here is the code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("discovery.zen.ping.multicast.enabled", "false")
.put("discovery.zen.ping.unicast.hosts", "localhost:9300")
.build();

Node node1 = NodeBuilder.nodeBuilder() 

.clusterName("mmm").data(true).client(false).local(false).build().start();

Node node2 = NodeBuilder.nodeBuilder() 
        .settings(settings) 
        .clusterName("mmm").client(true).local(false).build().start(); 
Client client = node2.client(); 

CreateIndexRequestBuilder builder = 

client.admin().indices().prepareCreate("cmwell");
CreateIndexResponse response =
client.admin().indices().create(builder.request()).actionGet();

Martijn

On 26 July 2012 19:03, Israel Klein israel.klein@gmail.com wrote:

Sorry,

val node =

nodeBuilder().settings(settings).local(false).clusterName(clusterName).client(true).node()
val client = node.client()

and I try to create the index with:
curl -XPUT 'http://localhost:9200/cmwell'

BTW, It happens only when I run the data node locally from java API. If
I
run ES on different machine normally (original shell script), it works
just
fine.

Thanks,

On Thursday, July 26, 2012 6:34:13 PM UTC+3, Martijn v Groningen wrote:

I think I'm missing something here for the client node. I only see the
code that creates the settings.
Can your share the code snippet that creates the client node and the
code snippet the executes a create index command?

Martijn

On 26 July 2012 16:59, Israel Klein israel.klein@gmail.com wrote:

I start the data node with this: val node =

nodeBuilder().clusterName("mmm").data(true).client(false).local(false).build().start()
and the client node with:
val settings =

ImmutableSettings.settingsBuilder().put("discovery.zen.ping.multicast.enabled",
"false").put("discovery.zen.ping.unicast.hosts",
"localhost:9300").put("discovery.zen.ping.timeout", "100s").build()

On Thursday, July 26, 2012 4:40:41 PM UTC+3, Martijn v Groningen
wrote:

Hi Isreal,

Can you share the code that starts the ES node and the code that
creates the index in your app? Or maybe translate the code snippets
to
curl requests?
That would help finding what is going on here.

Martijn

On 26 July 2012 14:32, Israel Klein israel.klein@gmail.com wrote:

Hi,

I am running a data node (0.19.8) on my machine using the java API
from
scala repl and then running my app that is starting a no-data
client
node
that successfully connects to the previous. However, when trying
to
create
an index I get the following error. Any idea?

Thanks,

WARN 15:25:33,154 [Hercules] [cmwell] failed to create
org.elasticsearch.indices.IndexCreationException: [cmwell] failed
to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:211)
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:662)
Caused by: java.lang.NullPointerException
at

org.elasticsearch.index.mapper.MapperService.(MapperService.java:132)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
Source)
at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at

org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at

org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at

org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at

org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at

org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at

org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:56)
at

org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at

org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at

org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at

org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
DEBUG 15:25:33,157 [Hercules] processing [create-index [cmwell],
cause
[api]]: no change in cluster_state

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen