# Pipeline Fail, failed to load pipeline. Error: Expected one of \[ \\\\t\\\\r\\\\n\], \\"#\\", \\"input\\", \\"filter\\", \\"output\\" at line 21

**URL:** <https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615>\
**Category:** Logstash\
**Created:** [July 30, 2023, 12:24pm UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615 "2023-07-30T12:24:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youdeep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youdeep/32/124054_2.png) [@Youdeep](https://discuss.elastic.co/u/Youdeep)\
**Post date:** [July 30, 2023, 12:24pm UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615/1 "2023-07-30T12:24:40Z")

</div>

Running a pipeline with two config file:  
Error after running: logstash -f .\config\pipelines.yml

Error:  
[ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", "input", "filter", "output" at line 21, column 1 (byte 666) after "

Config file:

```auto
# address_pipeline.conf

input {
  jdbc {
    clean_run => true
    jdbc_driver_library => "D:\ELK_tools\logstash-conf_jdbc\ojdbc11.jar"
    jdbc_driver_class => "oracle.jdbc.driver.OracleDriver"
    jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:orcl"
    jdbc_user => "system"
    jdbc_password => "XXX"
    schedule => "*/5 * * * * *"
    statement => "SELECT * FROM .table1 WHERE date> :sql_last_value AND date< CURRENT_TIMESTAMP ORDER BY date ASC"
    use_column_value => true
    tracking_column => "date"
    tracking_column_type => "timestamp"
    record_last_run => true
  }
}

filter {
date { match => ["XXX" , "ISO8601"] }
}

output {
  elasticsearch {
    hosts => ["http://localhost:9200/"]
    index => "XXX"
    user => "elastic"
    password => "XXXX"
    ssl => false
    ssl_certificate_verification => XXX
    codec => plain { charset => "UTF-8" }
  }
}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 30, 2023, 4:53pm UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615/2 "2023-07-30T16:53:21Z")

</div>

> [@Youdeep](#):
>
> Running a pipeline with two config file:  
> Error after running: logstash -f .\config\pipelines.yml

This is not correct, if you want to use `pipelines.yml` with your pipelines you do not use the `-f` argument pointing to it, you just run Logstash without any `-f` parameter and it will pick up the pipelines configured in `pipelines.yml`.

---

<div class="post-metadata">

**Author:** ![Youdeep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youdeep/32/124054_2.png) [@Youdeep](https://discuss.elastic.co/u/Youdeep)\
**Post date:** [July 30, 2023, 10:35pm UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615/3 "2023-07-30T22:35:26Z")

</div>

Tried to execute without any file parameter  
"D:\ELK\_tools\logstash-8.8.2-windows-x86\_64\logstash-8.8.2\bin\>logstash"

Post execution of above command i"m getting this error:  
[ERROR][logstash.config.sourceloader] No configuration found in the configured sources.

My YML is in config folder  
"D:\ELK\_tools\logstash-8.8.2-windows-x86\_64\logstash-8.8.2\config"

---

<div class="post-metadata">

**Author:** ![Youdeep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youdeep/32/124054_2.png) [@Youdeep](https://discuss.elastic.co/u/Youdeep)\
**Post date:** [July 31, 2023, 12:05am UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615/4 "2023-07-31T00:05:17Z")

</div>

I'm a newbie to this! Thanks for the suggestion.

Able to run the pipeline by using:

"bin\> logstash --path.settings /D:\ELK\_tools\logstash-8.8.2-windows-x86\_64\logstash-8.8.2\config --path.config=/D:\ELK\_tools\logstash-8.8.2-windows-x86\_64\logstash-8.8.2\pipeline"

Problem as I check the indexes mapped from kibana by the result set is combined of both query run (Example - 1st config file pulls 100 rows and 2nd config file pulls 222 rows both index mapped shows 333) there are common field names in both query run

# 1st config file:

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200/](http://localhost:9200/)"]  
index =\> "delivery\_trial"  
user =\> "elastic"  
password =\> "XXX"  
ssl =\> false  
ssl\_certificate\_verification =\> false  
codec =\> plain { charset =\> "UTF-8" }  
}  
}

# 2nd Config file:

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200/](http://localhost:9200/)"]  
index =\> "address\_trial"  
user =\> "elastic"  
password =\> "XXXX"  
ssl =\> false  
ssl\_certificate\_verification =\> false  
codec =\> plain { charset =\> "UTF-8" }  
}  
}

---

<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:** [August 28, 2023, 12:05am UTC](https://discuss.elastic.co/t/pipeline-fail-failed-to-load-pipeline-error-expected-one-of-t-r-n-input-filter-output-at-line-21/339615/5 "2023-08-28T00:05:33Z")

</div>

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