TypeError: can't convert Array into String, HTTP Input Plugin


(Seth S) #1

Logstash: v5.5.1

I've got the HTTP Input plugin which was working great for about a month and then without anything seeming to change, I consistently get this error with any data I attempt to push to Logstash:

[2017-08-14T11:03:02,829][FATAL][logstash.runner          ] An unexpected error occurred! {:error=>#<TypeError: can't convert Array into String>, :backtrace=>["org/jruby/RubyString.java:4462:in `include?'", "(eval):44:in `output_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:413:in `output_batch'", "org/jruby/RubyProc.java:281:in `call'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:238:in `each'", "org/jruby/RubyHash.java:1342:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped_synchronous_queue.rb:237:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:407:in `output_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:365:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:330:in `start_workers'"]}

My logstash config:

input {
  http {
    port => 8080
    type => [ "iei" ]
    add_field => { "raw_message" => "message" }
    add_field => { "iei_type" => "production" }
    id => "iei-prod"
  }
}
input {
  http {
    port => 8081
    type => [ "ic" ]
    add_field => { "raw_message" => "message" }
    add_field => { "iei_type" => "staging" }
    id => "iei-staging"
  }
}
input {
  http {
    port => 8082
    type => [ "test" ]
    add_field => { "raw_message" => "%{message}" }
    add_field => { "iei_type" => "test" }
    id => "iei-test"
    response_headers => {
      "Access-Control-Allow-Origin" => "*"
      "Content-Type" => "application/json"
      "Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type, Accept"
    }
  }
}
input {
  beats {
    port => 5044
    add_field => [ "LogstashServer", "node11" ]
  }
}
output {
  if ["production", "iei-prod"] in [iei_type] {
    elasticsearch {
      hosts => ["127.0.0.1:9200"]
      index => "iei-%{+YYYY.MM.dd}"
      sniffing => "false"
    }
  }
  else if ["staging", "test"] in [iei_type] {
    elasticsearch {
      hosts => ["127.0.0.1:9200"]
      index => "ic-%{+YYYY.MM.dd}"
      sniffing => "false"
    }
  }
  else {
    elasticsearch {
      hosts => ["127.0.0.1:9200"]
      index => "error-%{+YYYY.MM.dd}"
      sniffing => "false"
    }
  }
}

I've attempted to turn on 'trace' logging, and upgraded to the newest version of Logstash. Neither of these have fixed the issue. The data I'm pushing can be found in the next post due to message size constraints.


(Seth S) #2

The data I'm trying to push to Logstash:

{"ArrayOrVal1"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal2"=>24, "ArrayOrVal3"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal4"=>true, "ArrayOrVal5"=>6.0, "ArrayOrVal6"=>"mesos://zk://10.191.0.0:0000,10.191.0.1:0000,10.191.0.2:0000/mesos", "ArrayOrVal7"=>0.5, "ArrayOrVal8"=>false, "ArrayOrVal9"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal10"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal11"=>[0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal12"=>"/path/to/data/", "ArrayOrVal13"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal14"=>[0.8, 0.8, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.7, 0.65, 0.6, 0.6, 0.55, 0.5, 0.5, 0.5, 0.4, 0.35, 0.3, 0.25, 0.25, 0.2, 0.15, 0.15, 0.15, 0.15, 0.1, 0.1, 0.1], "ArrayOrVal15"=>[0.0223463687150838, 0.0226628895184136, 0.019943019943019943, 0.020348837209302327, 0.020527859237536656, 0.020958083832335328, 0.021212121212121213, 0.021604938271604937, 0.021671826625386997, 0.01910828025477707, 0.0196078431372549, 0.016835016835016835, 0.01730103806228374, 0.014545454545454545, 0.011363636363636364, 0.012, 0.012552301255230125, 0.004347826086956522, 0.004524886877828055, 0.004830917874396135, 0.005128205128205128, 0.00546448087431694, 0.005747126436781609, 0.006134969325153374, 0.006896551724137931, 0.007462686567164179, 0.008403361344537815, 0.0, 0.0, 0.0], "ArrayOrVal16"=>0, "ArrayOrVal17"=>141, "ArrayOrVal18"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal19"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal20"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal21"=>"/Sparkie", "ArrayOrVal22"=>6, "ArrayOrVal23"=>"image", "@timestamp"=>2017-08-14T16:52:02.932Z, "ArrayOrVal24"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal25"=>"/path/to/Debug", "ArrayOrVal26"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal27"=>1, "ArrayOrVal28"=>false, "ArrayOrVal29"=>14.0, "ArrayOrVal30"=>452.73352885246277, "ArrayOrVal31"=>[0.0446927374301676, 0.0453257790368272, 0.042735042735042736, 0.0436046511627907, 0.04398826979472141, 0.04491017964071856, 0.045454545454545456, 0.046296296296296294, 0.04643962848297214, 0.044585987261146494, 0.042483660130718956, 0.04040404040404041, 0.04152249134948097, 0.04, 0.03787878787878788, 0.04, 0.04184100418410042, 0.034782608695652174, 0.03167420814479638, 0.028985507246376812, 0.02564102564102564, 0.0273224043715847, 0.022988505747126436, 0.018404907975460124, 0.020689655172413793, 0.022388059701492536, 0.025210084033613446, 0.019801980198019802, 0.024390243902439025, 0.03508771929824561], "ArrayOrVal32"=>[0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.55, 0.45, 0.45, 0.35, 0.25, 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07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07142857142857142, 0.07692307692307693, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal43"=>"10.191.0.1", "ArrayOrVal44"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal45"=>"10.191.0.2", "ArrayOrVal46"=>"", "ArrayOrVal47"=>"file:/path/to/data", "ArrayOrVal48"=>"test", "ArrayOrVal49"=>"some/data", "ArrayOrVal50"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal51"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal56"=>"whoExt", "ArrayOrVal52"=>574, "ArrayOrVal53"=>3.0, "ArrayOrVal54"=>0.0, "ArrayOrVal55"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal57"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal58"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal59"=>100.0, "ArrayOrVal60"=>1.0, "ArrayOrVal61"=>3.0, "ArrayOrVal62"=>"", "ArrayOrVal63"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal64"=>[0.039473684210526314, 0.039473684210526314, 0.039473684210526314, 0.0395778364116095, 0.0395778364116095, 0.0395778364116095, 0.0395778364116095, 0.04, 0.04155124653739612, 0.04792332268370607, 0.043478260869565216, 0.0481283422459893, 0.06818181818181818, 0.07865168539325842, 0.0847457627118644, 0.08823529411764706, 0.0625, 0.3333333333333333, 0.0, 0.0], "ArrayOrVal65"=>0.8226950354609929, "@version"=>"1"

(Seth S) #3

data continued:

, "ArrayOrVal66"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal67"=>1.0, "ArrayOrVal68"=>2.0, "debug"=>true, "ArrayOrVal69"=>[0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4765625, 0.4609375, 0.453125, 0.421875, 0.3359375, 0.2421875, 0.125, 0.0625, 0.0390625, 0.015625, 0.0], "ArrayOrVal70"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal71"=>[0.07692307692307693, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.09090909090909091, 0.09090909090909091, 0.09090909090909091, 0.1, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal72"=>false, "ArrayOrVal73"=>3.0, "ArrayOrVal74"=>"client", "ArrayOrVal75"=>1.0, "ArrayOrVal76"=>"", "ArrayOrVal77"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "ArrayOrVal78"=>true, "ArrayOrVal79"=>1.0, "ArrayOrVal80"=>true, "ArrayOrVal81"=>[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}
}

(system) #4

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