我在Linux机器上运行了一个弹性搜索集群,没有出现严重问题。我现在想将它扩展到MS Windows,但遇到了索引名称的问题,这是不被接受的。日志非常明确:
[2015-02-18 10:18:39,071][WARN ][common.jna ] unable to link C library. native methods (mlockall) will be disabled.
[2015-02-18 10:18:39,139][INFO ][node ] [lenov272dsy] version[1.4.3], pid[1276], build[36a29a7/2015-02-11T14:23:15Z]
[2015-02-18 10:18:39,139][INFO ][node ] [lenov272dsy] initializing ...
[2015-02-18 10:18:39,142][INFO ][plugins ] [lenov272dsy] loaded [], sites []
[2015-02-18 10:18:41,920][INFO ][node ] [lenov272dsy] initialized
[2015-02-18 10:18:41,920][INFO ][node ] [lenov272dsy] starting ...
[2015-02-18 10:18:42,104][INFO ][transport ] [lenov272dsy] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.233.85.45:9300]}
[2015-02-18 10:18:42,111][INFO ][discovery ] [lenov272dsy] security/6CeEuO01SeaL0kZuezwoSg
[2015-02-18 10:18:45,207][INFO ][cluster.service ] [lenov272dsy] detected_master [eu3][ZsJ2f1gcQpSOlWriWy19-g][eu3][inet[/10.81.163.112:9300]], added {[eu5][nEUNDAc0S4ytvtntjvgIXA][eu5.security.example.com][inet[/10.81.147.186:9300]],[eu4][--PlaWk9Tl2pF8XSHJulDA][eu4.security.example.com][inet[/10.81.163.129:9300]],[eu3][ZsJ2f1gcQpSOlWriWy19-g][eu3][inet[/10.81.163.112:9300]],}, reason: zen-disco-receive(from master [[eu3][ZsJ2f1gcQpSOlWriWy19-g][eu3][inet[/10.81.163.112:9300]]])
[2015-02-18 10:18:45,322][INFO ][http ] [lenov272dsy] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.233.85.45:9200]}
[2015-02-18 10:18:45,323][INFO ][node ] [lenov272dsy] started
[2015-02-18 10:18:53,009][WARN ][indices.cluster ] [lenov272dsy] [nessus_scan_recurrent-internet.2015-01-15t00:00:59+00:00.65731fa3-2635-a330-2a7b-00e3ea775493c5ddb3b88c869b73.getnessuscans.nessus][4] failed to create shard
org.elasticsearch.index.shard.IndexShardCreationException: [nessus_scan_recurrent-internet.2015-01-15t00:00:59+00:00.65731fa3-2635-a330-2a7b-00e3ea775493c5ddb3b88c869b73.getnessuscans.nessus][4] failed to create shard
at org.elasticsearch.index.service.InternalIndexService.createShard(InternalIndexService.java:360)
at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyInitializingShard(IndicesClusterStateService.java:678)
at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewOrUpdatedShards(IndicesClusterStateService.java:579)
at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:185)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:431)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:184)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428)
at java.io.File.getCanonicalPath(File.java:618)
at org.apache.lucene.store.FSDirectory.getCanonicalPath(FSDirectory.java:129)
at org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:143)
at org.apache.lucene.store.MMapDirectory.<init>(MMapDirectory.java:132)
at org.apache.lucene.store.MMapDirectory.<init>(MMapDirectory.java:99)
at org.elasticsearch.index.store.fs.MmapFsDirectoryService.newFSDirectory(MmapFsDirectoryService.java:45)
at org.elasticsearch.index.store.fs.FsDirectoryService.build(FsDirectoryService.java:129)
at org.elasticsearch.index.store.distributor.AbstractDistributor.<init>(AbstractDistributor.java:35)
at org.elasticsearch.index.store.distributor.LeastUsedDistributor.<init>(LeastUsedDistributor.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
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.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:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
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:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
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:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
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:830)
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:131)
at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69)
at org.elasticsearch.index.service.InternalIndexService.createShard(InternalIndexService.java:358)
... 9 more
对于其他类似的索引,这是重复的,关键部分是
Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
我看一下索引如何存储在Linux机器上,确实有以它们命名的目录。
如果没有重命名索引,有没有办法让它们与Windows安装的elasticsearch兼容? (我查看了配置但没有发现任何内容 - 我个人的,不知情的,当然天真的意见是不应该有这样的操作系统依赖,而应该使用类似索引名称的哈希值)
答案 0 :(得分:0)
可能听起来很傻,但请仔细检查ElasticSearch是否有足够的权限在其安装文件夹中创建内容。
答案 1 :(得分:0)
在与其他弹性搜索用户和进一步测试的讨论之后,问题确实是索引名称必须使用在给定操作系统的文件名中正确的字符(索引存储在以索引名称命名的文件和文件夹中)
因此,最好使用一组安全的字符,这些字符在文件名(字母,数字,下划线)中的操作系统中普遍接受。