org.elasticsearch.indices.InvalidIndexNameException: [NuGet.org Proxy] Invalid index name [NuGet.org Proxy], must not contain the following characters [\, /, *, ?, ", <, >, |, , ,]

Sonatype JIRA | Kelly Robinson | 2 years ago
  1. 0

    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

    Sonatype JIRA | 2 years ago | Kelly Robinson
    org.elasticsearch.indices.InvalidIndexNameException: [NuGet.org Proxy] Invalid index name [NuGet.org Proxy], must not contain the following characters [\, /, *, ?, ", <, >, |, , ,]
  2. 0

    Allow alias in place of index

    GitHub | 3 years ago | j0hnsmith
    org.elasticsearch.indices.InvalidIndexNameException: [files] Invalid index name [files], an alias with the same name already exists
  3. 0

    When using the timestamped indexes, the mappings don't get applied

    GitHub | 2 years ago | schmorgs
    org.elasticsearch.indices.InvalidIndexNameException: ['myjdbcriver-'YYYY-MM-dd] Invalid index name ['myjdbcriver-'YYYY-MM-dd], must be lowercase
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Weekly indicies

    GitHub | 2 years ago | jimmyjones2
    org.elasticsearch.indices.InvalidIndexNameException: [logstash-2014-W41] Invalid index name [logstash-2014-W41], must be lowercase
  6. 0

    Date format do est work with add_field

    GitHub | 2 years ago | zhenghu
    org.elasticsearch.indices.InvalidIndexNameException: [logstash-%{+YYYY.MM.dd}] Invalid index name [logstash-%{+YYYY.MM.dd}], must be lowercase

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. ElasticSearch
      PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run
      1. org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:173)[na:na]
      2. org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:559)[na:na]
      3. org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$200(MetaDataCreateIndexService.java:87)[na:na]
      4. org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:243)[na:na]
      5. org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:329)[na:na]
      6. org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)[na:na]
      6 frames
    3. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_40]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_40]
      3. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
      3 frames