# Run custom tracks get type error

**URL:** <https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [April 28, 2021, 1:24pm UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520 "2021-04-28T13:24:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GITnewfish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitnewfish/32/87303_2.png) [@GITnewfish](https://discuss.elastic.co/u/GITnewfish)\
**Post date:** [April 28, 2021, 1:24pm UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520/1 "2021-04-28T13:24:03Z")

</div>

When I run custom tracks ,I got type error. I can't figure out, need help! Thanks!  
esrally version: esrally 1.4.1  
es version: 6.4.0

my custom track:

```auto
{% import "rally.helpers" as rally with context %}
{
  "version": 2,
  "description": "Tracker-generated track for nsh",
  "indices": [
    {
      "name": "xxxxxx",
      "body": "xxxxx.json",
      "types": ["doc"]
    },
    {
      "name": "xxxxx",
      "body": "xxxxxxx.json",
      "types": ["doc"]
    }
  ],
  "corpora": [
    {
      "name": "nsh",
      "documents": [
        {
          "target-index": "xxxxx",
          "source-file": "xxxxxxx.json.bz2",
          "document-count": 14960567,
          "compressed-bytes": 814346714,
          "uncompressed-bytes": 12138377222
        },
                {
          "target-index": "xxxxxxx",
          "source-file": "xxxxxxxxx.json.bz2",
          "document-count": 24000503,
          "compressed-bytes": 1296215463,
          "uncompressed-bytes": 19551041674
        }
      ]
    }
  ],
  "schedule": [
        {
          "operation": "delete-index"
        },
        {
          "operation": {
                "operation-type": "create-index",
                "settings": {{index_settings | default({}) | tojson}}
          }
        },
        {
          "operation": {
                "operation-type": "cluster-health",
                "index": "xxxxxxxxxx,xxxxxxxx",
                "request-params": {
                  "wait_for_status": "{{cluster_health | default('green')}}",
                  "wait_for_no_relocating_shards": "true"
                },
                "retry-until-success": true
          }
        },
        {
                "parallel":{
                  "tasks":[
                        {
                          "operation": {
                                "operation-type": "bulk",
                                "bulk-size": {{bulk_size | default(5000)}},
                                "ingest-percentage": {{ingest_percentage | default(100)}}
                          },
                          "clients": {{bulk_indexing_clients | default(8)}}
                        }
                  ]
                }
        }
  ]
}

```

my index:

```auto
{
    "mappings": {
        "doc": {
            "_all": {
                "enabled": false
            },
            "dynamic_templates": [
                {
                    "string_template": {
                        "mapping": {
                            "type": "keyword"
                        },
                        "match": "*",
                        "match_mapping_type": "string"
                    }
                }
            ],
            "properties": {
                "@timestamp": {
                    "type": "date"
                },
                "back": {
                    "type": "keyword"
                },
                "client_timestamp": {
                    "type": "long"
                },
                "collapse": {
                    "type": "keyword"
                },
                "collapse_times": {
                    "type": "long"
                },
                "mem_texture_scene": {
                    "type": "double"
                },
                "start": {
                    "type": "keyword"
                },
                "start_times": {
                    "type": "long"
                },
                "total_entity_count": {
                    "type": "integer"
                },
                "ts": {
                    "format": "yyyy-MM-dd HH:mm:ss",
                    "type": "date"
                },
                "used_total": {
                    "type": "integer"
                },
                "user_name": {
                    "type": "keyword"
                },
                "uuid": {
                    "type": "keyword"
                },
                "vendor": {
                    "type": "keyword"
                },
                "visible_entity_count": {
                    "type": "integer"
                }
            }
        }
    },
    "settings": {
        "index": {
            "codec": "best_compression",
            "number_of_replicas": "{{number_of_replicas | default(1)}}",
            "number_of_shards": "{{number_of_shards | default(3)}}",
            "refresh_interval": "60s",
            "unassigned": {
                "node_left": {
                    "delayed_timeout": "900m"
                }
            }
        }
    }
}

```

my documents:

```auto
{
  "_index": "xxxxxxxx",
  "_type": "doc",
  "_id": "1HddlncBhU7lsWQpjCIR",
  "_version": 1,
  "_score": null,
  "_source": {
    "is_normal": 1,
    "@timestamp": "2021-02-12T13:10:42.817+0000",
    "spname": "xxxxxxxx",
    "roley": "xxxxxxx",
    "osme": "xxxxxxx",
    "quit": "",
    "foreg": "",
    "collapse": "",
    "ts": "2021-02-12 21:10:29"
  },
  "fields": {
    "@timestamp": [
      "2021-02-12T13:10:42.817Z"
    ],
    "ts": [
      "2021-02-12T21:10:29.000Z"
    ]
  },
  "sort": [
    1613135442817
  ]
}

```

error log:  
[ERROR] Cannot race. Error in load generator [0]  
Cannot run task [bulk]: Request returned an error. Error type: transport, Description: action\_request\_validation\_exception ({'error': {'root\_cause': [{'type': 'action\_request\_validation\_exception', 'reason': 'Validation Failed: 1: type is missing;2: type is missing;3: type is missing;4: type is missing;5: type is missing;'}], 'type': 'action\_request\_validation\_exception', 'reason': 'Validation Failed: 1: type is missing;2: type is missing;3: type is missing;4: type is missing;5: type is missing;'}, 'status': 400})

es client node received requests:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/4/24793de215df335bd2d1d35b48a8ae277cf6d31c.png)

---

<div class="post-metadata">

**Author:** ![GITnewfish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitnewfish/32/87303_2.png) [@GITnewfish](https://discuss.elastic.co/u/GITnewfish)\
**Post date:** [April 29, 2021, 9:04am UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520/2 "2021-04-29T09:04:22Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/9/3/939a4fd3a6a6c3e4881ce732847713f5dd80137f.png)

I add this， then it works.

But the doc said this needn't, I think maybe the doc need to modify.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/9/6960037a4a2e6a26af147333ccf970f55b353972.png)

---

<div class="post-metadata">

**Author:** ![RickBoyd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rickboyd/32/80022_2.png) [@RickBoyd](https://discuss.elastic.co/u/RickBoyd)\
**Post date:** [April 29, 2021, 12:38pm UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520/3 "2021-04-29T12:38:24Z")

</div>

Hi @GITnewfish,

Looks like you have two indices in your track.json "indices" section. Note the documentation you've highlighted says "if you have defined exactly one index"

Hope that helps, and please let us know if there is anything further.

Thanks,  
Rick B

---

<div class="post-metadata">

**Author:** ![GITnewfish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gitnewfish/32/87303_2.png) [@GITnewfish](https://discuss.elastic.co/u/GITnewfish)\
**Post date:** [April 30, 2021, 9:21am UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520/4 "2021-04-30T09:21:05Z")

</div>

Thanks，my fault. All I see was "this index has exactly one type", ignored the words before "and".

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2021, 9:21am UTC](https://discuss.elastic.co/t/run-custom-tracks-get-type-error/271520/5 "2021-05-28T09:21:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
