# Failed to use SQLite input. \[SQLITE\_ERROR\] SQL error or missing database (no such table: since\_table)

**URL:** <https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039>\
**Category:** Logstash\
**Created:** [September 19, 2018, 2:16am UTC](https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039 "2018-09-19T02:16:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahmat\_Agung\_W](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rahmat\_Agung\_W](https://discuss.elastic.co/u/Rahmat_Agung_W)\
**Post date:** [September 19, 2018, 2:16am UTC](https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039/1 "2018-09-19T02:16:33Z")

</div>

So I used SQLite input to read my sqlite db. This is my configuration:

```
input {
  sqlite {
    path => "/home/elk/data/dionaea.sqlite"
    type => dionaea-sqlite
  }
}
output {
   elasticsearch {   
    hosts => ["10.33.109.76:9200"]
	index => "%{[@metadata][dionaea}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
	}
	file {
            path => "/home/elk/log/dionaea-sqlite.json"
            codec => json
        }
        stdout {
            codec => rubydebug
        }
	}

```

And this is the error from logstash:  
`Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::Inputs::Sqlite type=>\"dionaea-sqlite\", path=>\"/home/elk/data/dionaea.sqlite\", id=>\"f36b83df68bc2115012f2a0d11e51ec7ea84c4bb3a9196f997f9d522d3836bb7\", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>\"plain_5860c879-1d16-40eb-a3d4-72f76c86d3cb\", enable_metric=>true, charset=>\"UTF-8\">, batch=>5>", :error=>"Java::OrgSqlite::SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: since_table)", :thread=>"#<Thread:0x49cf04b run>"}`

it is said that there is no since\_table, how to fix it?

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [September 19, 2018, 2:16pm UTC](https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039/2 "2018-09-19T14:16:16Z")

</div>

I haven't worked with sqllite plugin before but my guess is that Logstash has to have permissions to write to the sqllite database in order to create the since\_table.  
The source for this is here:

> [https://github.com/elastic/logstash-contrib/blob/master/lib/logstash/inputs/sqlite.rb](https://github.com/elastic/logstash-contrib/blob/master/lib/logstash/inputs/sqlite.rb)

Check your file permissions and maybe allow the logstash user to update the sqllite db file.

---

<div class="post-metadata">

**Author:** ![Rahmat\_Agung\_W](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rahmat\_Agung\_W](https://discuss.elastic.co/u/Rahmat_Agung_W)\
**Post date:** [September 19, 2018, 2:54pm UTC](https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039/3 "2018-09-19T14:54:45Z")

</div>

Ok. I will try it.

---

<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:** [October 17, 2018, 2:54pm UTC](https://discuss.elastic.co/t/failed-to-use-sqlite-input-sqlite-error-sql-error-or-missing-database-no-such-table-since-table/149039/4 "2018-10-17T14:54:52Z")

</div>

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