Not able to add new indices

(Abhisek Mohanty) #1


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 ''

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}

(Mark Walkom) #2

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

(Abhisek Mohanty) #3


are you talking about this ?

(Abhisek Mohanty) #4

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

curl --user rdeniro:taxidriver -XPUT ''

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

(Mark Walkom) #5

Yes, you do need it.

(Abhisek Mohanty) #6

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 /opt/dir1

(Mark Walkom) #7

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

(Abhisek Mohanty) #8

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 => [""]
     user => "elastic"
     password => "changeme"
     index => "newpayment"
stdout {}

(Abhisek Mohanty) #9

@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 '' -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.

(system) #10

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