# There is Expected one of \[ \\\\t\\\\r\\\\n\] error in docker

**URL:** https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287
**Category:** Logstash
**Tags:** docker
**Created:** [February 7, 2020, 7:54am UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287 "2020-02-07T07:54:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fuzes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fuzes/32/46820_2.png) [@fuzes](https://discuss.elastic.co/u/fuzes)
#### Post date: [February 7, 2020, 7:54am UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/1 "2020-02-07T07:54:40Z")

</div>

when i running logstash in mac os, it works well.  
but when i running docker container with same logstash.conf file, logstash container die with  
"exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n]"

I really don't see what the problem is.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [February 7, 2020, 2:09pm UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/2 "2020-02-07T14:09:48Z")

</div>

What is the complete error message and what is the configuration?

---

<div class="post-metadata">

### Author: ![fuzes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fuzes/32/46820_2.png) [@fuzes](https://discuss.elastic.co/u/fuzes)
#### Post date: [February 8, 2020, 5:37am UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/4 "2020-02-08T05:37:59Z")

</div>

Following is full error message

```
   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 51, column 1 (byte 1469) after ", :backtrace=>
    ["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:41:in `compile_imperative'", 
    "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:49:in `compile_graph'", 
    "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in `block in compile_sources'",
     "org/jruby/RubyArray.java:2584:in `map'", "/usr/share/logstash/logstash-
    core/lib/logstash/compiler.rb:10:in `compile_sources'", 
    "org/logstash/execution/AbstractPipelineExt.java:156:in `initialize'", 
    "org/logstash/execution/JavaBasePipelineExt.java:47:in `initialize'", 
    "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:27:in `initialize'", 
    "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in `execute'", 
    "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:326:in `block in converge_state'"]}

```

and following is my configuration

```
input {
  jdbc {
jdbc_driver_library => "/usr/share/logstash/mysql-connector-java-5.1.47-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://${HOST}:${PORT}/${DATABASE}"
jdbc_user => "${USER}"
jdbc_password => "${PASSWORD}"
jdbc_paging_enabled => true
jdbc_default_timezone => "Asia/Seoul"
use_column_value => false
clean_run => true
schedule => "*/1 * * * *"
statement_filepath => "/usr/share/logstash/pipeline/test.sql"
  }
}
filter {
  aggregate {
task_id => "%{code}"
  code => "
    map['code'] = event.get('code')
    map['location'] ||= {}
    map['location']['lat'] = event.get('latitude')
    map['location']['lon'] = event.get('longitude')

    map['title'] ||= {}
    if (event.get('translations_language') != nil)
      if !( map['title'][event.get('translations_language')] )
        map['title'][event.get('translations_language')] = event.get('translations_name')
      end
    end
    event.cancel()
  "
  push_previous_map_as_event => true
  timeout => 5
  }
  mutate {
copy => { "code" => "[@metadata][_id]" }
remove_field => ["id", "@version", "unix_ts_in_secs"]
  }
}
output {
  elasticsearch {
hosts => ["${ELASTICHOST}"]
user => "${ELASTICUSER}"
password => "${ELASTICPASSWORD}"
index => "${ELASTICINDEX}"
document_id => "%{[@metadata][_id]}"
  }
}
```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [February 8, 2020, 4:00pm UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/5 "2020-02-08T16:00:39Z")

</div>

It is complaining about line 51 and you are showing a 49 line configuration. Perhaps you are pointing path.config at a directory and it is picking up a second file. Try running with --config.debug --log.level debug --config.test\_and\_exit on the command line.

---

<div class="post-metadata">

### Author: ![fuzes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fuzes/32/46820_2.png) [@fuzes](https://discuss.elastic.co/u/fuzes)
#### Post date: [February 10, 2020, 2:23am UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/6 "2020-02-10T02:23:53Z")

</div>

I'm really grateful for your help. I put the test.sql file into pipeline directory, logstash though of the test.sql file as a conf file. When I moved the test.sql file, it worked.

Thank you

---

<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: [March 9, 2020, 2:23am UTC](https://discuss.elastic.co/t/there-is-expected-one-of-t-r-n-error-in-docker/218287/7 "2020-03-09T02:23:56Z")

</div>

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