# Logstash reads input files but does not write any output

**URL:** <https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575>\
**Category:** Logstash\
**Created:** [May 20, 2021, 6:38pm UTC](https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575 "2021-05-20T18:38:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmanfredi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmanfredi/32/89044_2.png) [@fmanfredi](https://discuss.elastic.co/u/fmanfredi)\
**Post date:** [May 20, 2021, 6:38pm UTC](https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575/1 "2021-05-20T18:38:22Z")

</div>

Hi, I'm having problems with logstash.  
Looks like it is capable of reaching and reading the files I want it to read but there is no sign of processing and output.  
I'm trying to write both to elasticsearch and stdout but nothing comes out.  
Even so, after the execution, I can find the sincedb file containing the file names I'm giving as input.

I'm just starting with the elastic stack so if someone could help me troubleshooting this I'd be very grateful.

Here is the pipeline configuration file content:

```auto
    input {

        file {
            path => "/opt/pulltweet/dumps/*.csv"
            type => "tweet"
        }

    }

    filter {
        csv {
            columns => ["tweet_id", "tweet_body", "published_time", "ref_tweets"]
            convert => {
                "published_time" => "date_time"
            }
        }

        json {
            source => "ref_tweets"
            target => "referenced_tweets"
        }

        mutate {
            remove_field => ["ref_tweets"]
        }

    }

    output {

        stdout {}

        elasticsearch {
            hosts => ["localhost:9200"]
            index => "%{type}_%{+YYYY.MM}"
        }

    }

```

Here is the output for the execution with --debug: [debug output](https://pastebin.com/sZzgaqEM)

Thank you in advance.

---

<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:** [May 20, 2021, 7:08pm UTC](https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575/2 "2021-05-20T19:08:10Z")

</div>

By default a file input will seek to the end of the file and then wait for new data to be written to it. If you want it to start at the beginning then set the [start\_position](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-start_position) option.

Since you have already run logstash it will have recorded the size of the files in the sincedb and will not start at the beginning even if you set that option. You can use `sincedb_path => "/dev/null"` to force it to re-read things.

---

<div class="post-metadata">

**Author:** ![fmanfredi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fmanfredi/32/89044_2.png) [@fmanfredi](https://discuss.elastic.co/u/fmanfredi)\
**Post date:** [May 20, 2021, 7:14pm UTC](https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575/3 "2021-05-20T19:14:20Z")

</div>

wait, before I run logstash I delete the sincedb file. Shouldn't logstash see those files for the first time and process anything that is already in the files before waiting for the new lines by default?

---

<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:** [June 17, 2021, 7:14pm UTC](https://discuss.elastic.co/t/logstash-reads-input-files-but-does-not-write-any-output/273575/4 "2021-06-17T19:14:54Z")

</div>

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