Error loading accounts data set

Hi,

I'm trying to follow the tutorial for current version (7.4) of kibana and I get a 404 error loading the data for the accounts.json data set. I don't get the error for shakespeare or logstash data. Not sure if it's an error on my end or some sort of code/data issue so would appreciate advice.

Details:
Stage in tutorial I got to - https://www.elastic.co/guide/en/kibana/current/tutorial-dashboard.html

command used to load data -
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST 'http://127.0.0.1:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

Sample of output from terminal -

{
  "index" : {
    "_index" : "bank",
    "_type" : "account",
    "_id" : "995",
    "status" : 404,
    "error" : {
      "type" : "index_not_found_exception",
      "reason" : "no such index [bank] and [action.auto_create_index] ([.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*]) doesn't match",
      "index_uuid" : "_na_",
      "index" : "bank"
    }
  }
}

As I said, I didn't get this error for the other data sets but suspect this is due to them already having mappings preloaded.

Thanks,
Bill

Hi Bill,

Where did you get the "accounts.json" dataset? I assume it is from an example somewhere?

Yep. It's towards the top of the tutorial page I linked earlier.

I downloaded it with this curl

curl -O https://download.elastic.co/demos/kibana/gettingstarted/8.x/accounts.zip

and then unzipped with this

unzip accounts.zip

It's entirely possible I've done something stupid but I tried a few times and got the same error each time. I even tried play around with the 8.x piece of the download url and tried older versions of the documentation in case the data changed.

Thanks

Hi Bill,

Sorry, I missed that somehow. :sweat_smile:

Looks like there's a bug in the Load the data sets section.

Starting with v7.0 we do not allow multiple types so the accounts type should not be specified in the URL. The correct command is below. I've created a PR to fix this. Thanks for the heads up!

curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/bank/_bulk?pretty' --data-binary @accounts.json

Hi Nick,

Thanks for taking a look. Unfortunately I'm still getting an error with the new command :confused:

command I ran:

curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST 'http://127.0.0.1:9200/bank/_bulk?pretty' --data-binary @accounts.json

Snip of error received:

{
  "index" : {
    "_index" : "bank",
    "_type" : "_doc",
    "_id" : "995",
    "status" : 404,
    "error" : {
      "type" : "index_not_found_exception",
      "reason" : "no such index [bank] and [action.auto_create_index] ([.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*]) doesn't match",
      "index_uuid" : "_na_",
      "index" : "bank"
    }
  }
} 

FYI - I'm able to do the rest of the tutorial and just skip over the sections related to this data set. I just wanted to flag it in case it's not just me getting this error.

Thanks again,
Bill

Hmm, strange. I am unable to replicate the error on 7.4.

Maybe create the index first, like this.
curl -u elastic -XPUT "127.0.0.1:9200/bank?pretty"

Then try ingesting the dataset.
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST 'http://127.0.0.1:9200/bank/_bulk?pretty' --data-binary @accounts.json

Thanks Nick! That worked. Really appreciate you taking the time to look.

All the best,
Bill

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