Logstash.conf Not Working (Cannot Create Pipeline)

Logstash.conf

         input {
            	jdbc {
            	jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb"
            	jdbc_user => "root"
            	jdbc_password ="explorer"
            	jdbc_driver_library => "C:/Users/ANSHUMAN/Desktop/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.jar"
            	jdbc_driver_class => "com.mysql.jdbc.Driver"
            	#our Query
            	statement => "Select * from testtable"

            	}
            }

            output{
            	stdout { codec => json_lines }
            	elasticsearch{
            	"hosts" => ["localhost:9200"]
            	protocol => "http"
            	"index" => "test-migrate"
            	"document_type" => "data"
            	}
            }

Error:
Preformatted textSending Logstash's logs to E:/elasticsearch-5.6.3/logstash-5.6.3/logs which is now configured via log4j2.properties
[2017-10-24T19:39:36,006][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"E:/elasticsearch-5.6.3/logstash-5.6.3/modules/fb_apache/configuration"}
[2017-10-24T19:39:36,011][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"E:/elasticsearch-5.6.3/logstash-5.6.3/modules/netflow/configuration"}
[2017-10-24T19:39:36,154][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Expected one of #, => at line 5, column 16 (byte 117) after input {\n\tjdbc {\n\tjdbc_connection_string => "jdbc:mysql://localhost:3306/testdb"\n\tjdbc_user => "root"\n\tjdbc_password "}

        	jdbc_user => "root"
       	jdbc_password ="explorer"

There's a > missing from the second line. The error messages points to the exact location.

1 Like

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