Error while starting Log Stash Expected one of [ \\t\\r\\n]

Connecting LogStash to SQL Server. Could help me with following error while starting logstash?

I executed this command:

logstash.bat -f c:\DevSoft\logstash-8.3.3\bin\logstash-sample.conf

I get following error: I tried removing all whitespaces from .conf file but with no luck.

[ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, > :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \t\r\n], "#", "if", [A-Za-z0-9_-], '"', "'", "}" at line 1, column 8 (byte 8) after input {",

Here is logstash-sample.conf located in bin folder itself where logstash.bat is:

enter image description here

input {​​​​​​​
  jdbc {​​​​​​​
    # jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/mssql-jdbc-7.3.1.jre8-preview.jar"
    jdbc_driver_library => "C:\DevSoft\sqljdbc_11.2\enu\mssql-jdbc-11.2.0.jre11.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://elastic-dev-01.database.windows.net:1433;database=logstashsample;user=**;password=**;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;"
    jdbc_user => "sa"
    jdbc_password => "***"
    schedule => "* " #--works every one minute. This works like crontab.
    statement => "select * from Products"
    clean_run=>true
    }​​​​​​​
  }
  ​​​​​​​
output {​​​​​​​
  elasticsearch {​​​​​​​
      hosts => "localhost:9200"
      index => "products_index"
    }​​​​​​​
    stdout {
      codec => rubydebug​​​​​​​
    }​​​​​​​
  }​​


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation