# Logstash mssql config

**URL:** <https://discuss.elastic.co/t/logstash-mssql-config/90892>\
**Category:** Logstash\
**Created:** [June 27, 2017, 12:37am UTC](https://discuss.elastic.co/t/logstash-mssql-config/90892 "2017-06-27T00:37:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanithapg](https://avatars.discourse-cdn.com/v4/letter/v/b38774/32.png) [@vanithapg](https://discuss.elastic.co/u/vanithapg)\
**Post date:** [June 27, 2017, 12:37am UTC](https://discuss.elastic.co/t/logstash-mssql-config/90892/1 "2017-06-27T00:37:49Z")

</div>

This is the error im getting when i run this code

```
C:\elk\logstash\bin>logstash -f ..\conf\mmsdb.conf
Sending Logstash's logs to C:/elk/logstash/logs which is now configured via log4
j2.properties
[2017-06-26T19:21:42,653][ERROR][logstash.agent] Cannot create pipeli
ne {:reason=>"Expected one of #, {, \", ', } at line 6, column 1 (byte 268) after input {\n jdbc_driver_library => \"c:\\elk\\logstash\\lib\\sqljdb

```

Code

```
input {
    jdbc {
    jdbc_driver_library => "c:\elk\logstash\lib\sqljdbc42.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://heheheh:6613;integratedSecurity=false;domain=dummy;user=user;password=passwd;databaseName=lol"
    statement => "SELECT top 1000 * FROM table with (nolock) WHERE CREATE_DATE >= '2017-06-26 20:31:30.050'"
    schedule => "*/1 * * * * "
    last_run_metadata_path => "c:\elk.logstash_jdbc_last_run"
    }
    }

    filter {
    }

    output {
    elasticsearch {
    host => "localhost"
    index => "mms"
    document_id => "%{id}"
    }
    stdout { codec => rubydebug }
    }
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 27, 2017, 5:41am UTC](https://discuss.elastic.co/t/logstash-mssql-config/90892/2 "2017-06-27T05:41:09Z")

</div>

Hmm. Your configuration looks okay. Maybe you have a non-printable garbage character somewhere? Try deleting or commenting out lines to see if you can narrow things down. You can also look at the file in a hex editor so you can see exactly what the file contains.

---

<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:** [July 25, 2017, 5:41am UTC](https://discuss.elastic.co/t/logstash-mssql-config/90892/3 "2017-07-25T05:41:12Z")

</div>

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