# Logstash not working fine

**URL:** https://discuss.elastic.co/t/logstash-not-working-fine/318284
**Category:** Logstash
**Created:** [November 7, 2022, 2:27am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284 "2022-11-07T02:27:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![greeklegend](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@greeklegend](https://discuss.elastic.co/u/greeklegend)
#### Post date: [November 7, 2022, 2:27am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/1 "2022-11-07T02:27:40Z")

</div>

When I am trying to run as I am transferring data from csv file to Elasticsearch using logstash.  
My logstash.conf as follows

```auto
input {      
	file {
		path => "C:/Users/user/Downloads/abc/abc.csv"
		start_position => "beginning"
		sincedb_path => "NULL"
	}
}
filter{
	csv{
		separator => ","
		columns => ["a","b","c","d"]
	}
}

output {
	elasticsearch{
		hosts=> "http://localhost:9200"
		index=> "logstash-%{+YYYY.MM.dd}"
	}
	stdout {}
}

```

The following error is occurred. Please let me know.

 ![sns](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d16df5abaa67e71fb9d5be4a9d03c552c2ce64fe.png)

```auto

```

---

<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: [November 7, 2022, 3:43am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/2 "2022-11-07T03:43:59Z")

</div>

Welcome to our community! 😃  
Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<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 7, 2022, 3:56am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/3 "2022-11-07T03:56:12Z")

</div>

> [@greeklegend](#):
>
> My logstash.conf as follows

No it is not. The error message includes parts of the configuration and they do not match that. Please post the entire error message (and as Mark said, post it as text, not an image).

`sincedb_path => "NULL"` will persist the in-memory sincedb across restarts in a file called NULL in the working directory of logstash. If you do not want it persisted then use `sincedb_path => "NUL"`. Microsoft made NUL a special file name...

---

<div class="post-metadata">

### Author: ![greeklegend](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@greeklegend](https://discuss.elastic.co/u/greeklegend)
#### Post date: [November 7, 2022, 4:15am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/4 "2022-11-07T04:15:41Z")

</div>

Please find the full error. Thanks

```auto
[2022-11-06T23:12:29,594][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [\\t\\r\\n], \"#\", [A-Za-z0-9_-], '\"', \"'\", [A-Za-z_], \"-\", [0-9], \"[\", \"{\", \"]\" at line 8, column 12 (byte 71) after output{\n elasticsearch{\n hosts => [", :backtrace=>["C:/Users/user/Downloads/logstash-8.5.0/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:182:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "C:/Users/user/Downloads/logstash-8.5.0/logstash-core/lib/logstash/java_pipeline.rb:48:in `initialize'", "org/jruby/RubyClass.java:911:in `new'", "C:/Users/user/Downloads/logstash-8.5.0/logstash-core/lib/logstash/pipeline_action/create.rb:50:in `execute'", "C:/Users/user/Downloads/logstash-8.5.0/logstash-core/lib/logstash/agent.rb:386:in `block in converge_state'"]}
[2022-11-06T23:12:29,729][INFO][logstash.runner] Logstash shut down.
[2022-11-06T23:12:29,749][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit

```

---

<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 7, 2022, 4:48am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/5 "2022-11-07T04:48:03Z")

</div>

> [@greeklegend](#):
>
> "Expected one of ... line 8, column 12 (byte 71) after output{\n elasticsearch{\n hosts =\> [",

So whatever comes after that [is the problem. The `hosts` option of an elasticsearch output has to be a [uri](https://www.elastic.co/guide/en/logstash/current/configuration-file-structure.html#uri). But I think a uri can be an array of strings, each of which is a URI.

Do you have `hosts => [ http://...` instead of `hosts => [ "https://...`

Thankyou for posting the text of the error message.

---

<div class="post-metadata">

### Author: ![greeklegend](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@greeklegend](https://discuss.elastic.co/u/greeklegend)
#### Post date: [November 7, 2022, 5:27am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/6 "2022-11-07T05:27:48Z")

</div>

It worked. Thanks. I added array instead of string and also replaced inverted commas as I copied from the web and it might be something else instead of inverted commas. You are my idol.

---

<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 5, 2022, 5:28am UTC](https://discuss.elastic.co/t/logstash-not-working-fine/318284/7 "2022-12-05T05:28:39Z")

</div>

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