org.elasticsearch.indices.InvalidIndexNameException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Elasticsearch seems to be more finicky that our data model allows right now, and likely spaces in Repository names is something we want to support. {code} 2015-03-17 18:00:04,403-0700 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.manager.RepositoryImpl - Failed to start facet: org.sonatype.nexus.repository.search.SearchFacetImpl$$EnhancerByGuice$$e319c5e4@7ea728 org.elasticsearch.indices.InvalidIndexNameException: [NuGet.org Proxy] Invalid index name [NuGet.org Proxy], must not contain the following characters [\, /, *, ?, ", <, >, |, , ,] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:173) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:559) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:87) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:243) [na:na] at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:329) [na:na] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) [na:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] {code} And after removing the space we find we don't allow uppercase letters: {code} 2015-03-17 18:10:36,359-0700 ERROR [qtp137889432-243] admin org.sonatype.nexus.repository.manager.RepositoryImpl - Failed to start facet: org.sonatype.nexus.repository.search.SearchFacetImpl$$EnhancerByGuice$$e319c5e4@43fd34ca org.elasticsearch.indices.InvalidIndexNameException: [Nuget.orgProxy] Invalid index name [Nuget.orgProxy], must be lowercase at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:182) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:559) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:87) [na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:243) [na:na] at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:329) [na:na] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153) [na:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] {code} To reproduce just add a new Repository in the UI with a space or capital letter in the name. An unhelpful error is shown in the UI: "Failed to start facets" Minimally we should add validation to ensure that we don't allow invalid characters, as right now we end up with configured Repositories that cannot possibly function. Acceptance criteria: - names should be validated in the UI, and provide guidance when illegal names are tried - names should be validated on the server using the same rules as the client(preventing abuse of the ExtDirect api) - names should only allow (English) alphanumeric and -_. (dash, underscore, period) - names should be sanitized for elasticsearch usage in index names; this requires enforcing case-insensitive uniqueness of names as indexes are all lowercase
    via by Kelly Robinson,
  • Allow alias in place of index
    via GitHub by j0hnsmith
    ,
  • Weekly indicies
    via GitHub by jimmyjones2
    ,
  • Cluster state issues on full restart
    via by rob...@quizlet.com,
  • GitHub comment 22#50122312
    via GitHub by OrhanCinar
    ,
  • GitHub comment 136#171933436
    via GitHub by anduo1989
    ,
    • org.elasticsearch.indices.InvalidIndexNameException: [Nuget.orgProxy] Invalid index name [Nuget.orgProxy], must be lowercase at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:182)[na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:559)[na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:87)[na:na] at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:243)[na:na] at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:329)[na:na] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)[na:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_40] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_40] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
    No Bugmate found.