# Error while running file configuration in Logstash - \*\*ERROR at line 4, column 19 (byte 62) after input {\\r\\nhttp\_poller {\\r\\n urls =\> {\\r\\n users ", :backtrace=\>\["C:/ELK/logstash-7.9.2/logstash-core/lib/logstash/compiler.rb:32:in \`compile\_imperative'"

**URL:** <https://discuss.elastic.co/t/error-while-running-file-configuration-in-logstash-error-at-line-4-column-19-byte-62-after-input-r-nhttp-poller-r-n-urls-r-n-users-backtrace-c-elk-logstash-7-9-2-logstash-core-lib-logstash-compiler-rbin-compile-imperative/254099>\
**Category:** Logstash\
**Created:** [November 3, 2020, 4:23am UTC](https://discuss.elastic.co/t/error-while-running-file-configuration-in-logstash-error-at-line-4-column-19-byte-62-after-input-r-nhttp-poller-r-n-urls-r-n-users-backtrace-c-elk-logstash-7-9-2-logstash-core-lib-logstash-compiler-rbin-compile-imperative/254099 "2020-11-03T04:23:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![salma\_widiarti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/salma_widiarti/32/78306_2.png) [@salma\_widiarti](https://discuss.elastic.co/u/salma_widiarti)\
**Post date:** [November 3, 2020, 4:23am UTC](https://discuss.elastic.co/t/error-while-running-file-configuration-in-logstash-error-at-line-4-column-19-byte-62-after-input-r-nhttp-poller-r-n-urls-r-n-users-backtrace-c-elk-logstash-7-9-2-logstash-core-lib-logstash-compiler-rbin-compile-imperative/254099/1 "2020-11-03T04:23:41Z")

</div>

Hi all,  
Can any guide me to create file configuration logstash with API? I've been using this syntax but i found error.

input {  
http\_poller {  
urls =\> {  
users = {  
method =\> get  
url =\> "[https://api.id/api/categories](https://api.id/api/categories)"  
headers =\> {  
"Content-Type" =\> "application/json"  
Authorization =\> "bearer token"  
}  
}  
}  
request\_timeout =\> 60  
schedule =\> { "every" =\> "20s"}  
codec =\> "json"  
type =\> "Http\_poller"  
}  
}

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "users"  
}  
stdout { codec =\> rubydebug }  
}

This the error

C:\ELK\>logstash -f users.conf  
Sending Logstash logs to C:/ELK/logstash-7.9.2/logs which is now configured via log4j2.properties  
[2020-11-03T10:22:31,929][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.9.2", "jruby.version"=\>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 25.261-b12 on 1.8.0\_261-b12 +indy +jit [mswin32-x86\_64]"}  
[2020-11-03T10:22:33,013][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2020-11-03T10:22:35,892][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", "=\>" at line 4, column 19 (byte 62) after input {\r\nhttp\_poller {\r\n urls =\> {\r\n users ", :backtrace=\>["C:/ELK/logstash-7.9.2/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:183:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:69:in `initialize'", "C:/ELK/logstash-7.9.2/logstash-core/lib/logstash/java_pipeline.rb:44:in `initialize'", "C:/ELK/logstash-7.9.2/logstash-core/lib/logstash/pipeline\_action/create.rb:52:in `execute'", "C:/ELK/logstash-7.9.2/logstash-core/lib/logstash/agent.rb:357:in `block in converge\_state'"]}  
[2020-11-03T10:22:37,508][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2020-11-03T10:22:41,175][INFO][logstash.runner] Logstash shut down.  
[2020-11-03T10:22:41,217][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Thanks

---

<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:** [November 3, 2020, 3:45pm UTC](https://discuss.elastic.co/t/error-while-running-file-configuration-in-logstash-error-at-line-4-column-19-byte-62-after-input-r-nhttp-poller-r-n-urls-r-n-users-backtrace-c-elk-logstash-7-9-2-logstash-core-lib-logstash-compiler-rbin-compile-imperative/254099/2 "2020-11-03T15:45:37Z")

</div>

> [@salma\_widiarti](#):
>
> users = {

That should be

```
users => {

```

---

<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:** [December 1, 2020, 3:45pm UTC](https://discuss.elastic.co/t/error-while-running-file-configuration-in-logstash-error-at-line-4-column-19-byte-62-after-input-r-nhttp-poller-r-n-urls-r-n-users-backtrace-c-elk-logstash-7-9-2-logstash-core-lib-logstash-compiler-rbin-compile-imperative/254099/3 "2020-12-01T15:45:40Z")

</div>

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