# Getting "Pipeline aborted due to error" in tutorial pipeline & 401 Error

**URL:** <https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436>\
**Category:** Logstash\
**Created:** [January 14, 2018, 10:04am UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436 "2018-01-14T10:04:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tzure](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@tzure](https://discuss.elastic.co/u/tzure)\
**Post date:** [January 14, 2018, 10:04am UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436/1 "2018-01-14T10:04:58Z")

</div>

Update at the next msg - found out it's receiving a msg of 401 error.  
Hi,  
I'm using the tutorial pipeline [here](https://www.elastic.co/guide/en/logstash/6.1/advanced-pipeline.html) and everything was okay, until I got to the part where I wanted to connect my pipeline to elastic search.  
This is my pipeline yml -

```
input {
    beats {
        port => "5044"
    }
}
filter {
    grok {
        match => { "message" => "%{COMBINEDAPACHELOG}"}
    }
}
output {
    elasticsearch {
        hosts => ["127.0.0.1:9200"]
        user => logstash_u
        password => 123456
    }
}

```

When I write it to the console - everything works fine. I can see the correct output.  
But when I'm trying to do it with Elasticsearch and Kibana, I keep getting this error:

[2018-01-11T17:23:14,390][ERROR][logstash.pipeline] Pipeline aborted due to error {:pipeline\_id=\>"main", : **exception=\>#\<TypeError: no implicit conversion of Fixnum into String\>** , :backtrace=\>["org/jruby/ext/cgi/escape/CGIEscape.java:387:in `escape'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http_client_builder.rb:148:in`setup\_basic\_auth'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/http\_client\_builder.rb:56:in `build'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch.rb:230:in`build\_client'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.0.2-java/lib/logstash/outputs/elasticsearch/common.rb:24:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:9:in`register'", "/usr/share/logstash/logstash-core/lib/logstash/output\_delegator.rb:43:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:343:in`register\_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:354:in `block in register_plugins'", "org/jruby/RubyArray.java:1734:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:354:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:743:in`maybe\_setup\_out\_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:364:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:288:in`run'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:248:in `block in start'"], :thread=\>"#\<Thread:0x39e9d596@/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:245 run\>"}  
[2018-01-11T17:23:14,403][ERROR][logstash.agent] Failed to execute action {:id=\>:main, :action\_type=\>LogStash::ConvergeResult::FailedAction, :message=\>"Could not execute action: LogStash::PipelineAction::Create/pipeline\_id:main, action\_result: false", :backtrace=\>nil}

I've marked the error.  
I have no idea how to address this. Can anyone provide some assistance?  
Thanks!

---

<div class="post-metadata">

**Author:** ![tzure](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@tzure](https://discuss.elastic.co/u/tzure)\
**Post date:** [January 14, 2018, 2:50pm UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436/2 "2018-01-14T14:50:04Z")

</div>

Update  
I think It happens because I keep getting this error:

server {:message=\>"Got response code '401' contacting Elasticsearch at URL '[http://localhost:9200/\_xpack](http://localhost:9200/_xpack)'", :class=\>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError"}

Where is this coming from? I've installed X-pack and put the right user/pass

---

<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:** [January 15, 2018, 5:38am UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436/3 "2018-01-15T05:38:22Z")

</div>

Check that the username and password using curl. Also check the Elasticsearch logs.

---

<div class="post-metadata">

**Author:** ![tzure](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@tzure](https://discuss.elastic.co/u/tzure)\
**Post date:** [January 15, 2018, 9:00am UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436/4 "2018-01-15T09:00:16Z")

</div>

I've checked and it's ok.

But you made me look at it a bit more, then I found that logstash.yml uses different creds for the monitor and not the one that was defined in the pipeline.  
So I've changed that and added:  
xpack.monitoring.elasticsearch.username/password

And now everything works.  
Thanks!

---

<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:** [February 12, 2018, 9:00am UTC](https://discuss.elastic.co/t/getting-pipeline-aborted-due-to-error-in-tutorial-pipeline-401-error/115436/5 "2018-02-12T09:00:50Z")

</div>

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