# Not able to add new indices

**URL:** <https://discuss.elastic.co/t/not-able-to-add-new-indices/101114>\
**Category:** Kibana\
**Created:** [September 20, 2017, 7:01am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114 "2017-09-20T07:01:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 20, 2017, 7:01am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/1 "2017-09-20T07:01:29Z")

</div>

Hi,

I have installed X-pack and now when i am trying to add new indices, it is not happening.

when i'm checking for all the indices using the command

`curl '10.1.1.150:9200/_cat/indices?v'`

then i'm getting following error

`{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/_cat/indices?v]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication token for REST request [/_cat/indices?v]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 20, 2017, 7:22am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/2 "2017-09-20T07:22:15Z")

</div>

Did you pass in the user and password with the curl request?

---

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 20, 2017, 7:26am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/3 "2017-09-20T07:26:05Z")

</div>

> [@warkolm](#):
>
> Did you pass in the user and password with the curl request?

No.

are you talking about this ?

> **[Getting Started with Security | X-Pack for the Elastic Stack \[6.2\] | Elastic](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html)**

---

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 20, 2017, 7:42am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/4 "2017-09-20T07:42:42Z")

</div>

using the following command i'm able to see all the indices

curl --user rdeniro:taxidriver -XPUT '10.1.1.150:9200/\_cat/indices?v'

But i have a doubt that do i need to pass the user and password while loading the data .

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 20, 2017, 8:17am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/5 "2017-09-20T08:17:43Z")

</div>

Yes, you do need it.

---

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 20, 2017, 9:26am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/6 "2017-09-20T09:26:58Z")

</div>

As i'm using configuration file to load the data and i'm not able to find any example related to that, where should i add user and password.

my configuration looks like this :

`/usr/share/logstash/bin/logstash -f /opt/final_log.conf --path.data /opt/dir1`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 20, 2017, 9:41am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/7 "2017-09-20T09:41:31Z")

</div>

It would be in the Logstash file where you have configured the details to talk to Elasticsearch.

---

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 20, 2017, 10:22am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/8 "2017-09-20T10:22:59Z")

</div>

Thanks for the reply

I have added user and password in my logstash file and then tried to run it, the data gets loaded but after that also i'm not able to see my index.

my config file looks like this

```
input {
  file {
    path => "/opt/payment_data/queue_data*"
    start_position => "beginning"
   sincedb_path => "/dev/null"
  }
}
filter {
  csv {
      separator => ","
     columns => ["seq_num","card","type0","country","status","txnId","amount","Acquire_Id","AcqAccNo","Acquire_name","Mkey"]
  }
mutate {convert => ["txnId", "integer"]}
mutate {convert => ["amount", "integer"]}
mutate {convert => ["status", "integer"]}
}
output {
   elasticsearch {
     hosts => ["http://10.1.1.150:9200"]
     user => "elastic"
     password => "changeme"
     index => "newpayment"
  }
stdout {}
}
```

---

<div class="post-metadata">

**Author:** ![abhisek](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@abhisek](https://discuss.elastic.co/u/abhisek)\
**Post date:** [September 21, 2017, 4:43am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/9 "2017-09-21T04:43:20Z")

</div>

@warkolm is my config correct .

If yes, then why i'm not able to see my index ?

i have used an example to check whether index are being loaded or not

```
curl --user elastic:changeme -XPUT '10.1.1.150:9200/test?pretty' -H 'Content-Type: application/json' -d'
{
    "settings" : {
        "number_of_shards" : 1
    },
    "mappings" : {
        "type1" : {
            "properties" : {
                "field1" : { "type" : "text" }
            }
        }
    }
}
'

```

an index of name `text` can be seen in my index list.

but not with the above config file.

---

<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:** [October 19, 2017, 4:43am UTC](https://discuss.elastic.co/t/not-able-to-add-new-indices/101114/10 "2017-10-19T04:43:33Z")

</div>

Closed on October 19, 2017, 4:43am UTC

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