Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (Com patibilityError) incompatible character encodings: GBK and UTF-8

Description

I was using logstash in Windows2008 with this logstash config:

input { file{ type => "syslog" path => "C:/temp/error.log" charset => "GBK" debug => "true" } } output { syslog{ host => "10.88.2.113" port => "514" facility => "local0" severity => "error" } }

And this command to launch logstash:

java -jar logstash-1.3.2-flatjar.jar agent -f logstashtest.conf

I get this error:

[33mYou are using a deprecated config setting "charset" set in file. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. If you have any questions about this, please visit the #logstash ch annel on freenode irc. {:name=>"charset", :plugin=><LogStash::Inputs::File --->, :level=>:warn}[0m [33mUsing milestone 2 input plugin 'file'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin mi lestones, see http://logstash.net/docs/1.3.2/plugin-milestones {:level=>:warn}[ 0m [33mUsing milestone 1 output plugin 'syslog'. This plugin should work, but woul d benefit from use by folks like you. Please let us know if you find bugs or hav e suggestions on how to improve this plugin. For more information on plugin mil estones, see http://logstash.net/docs/1.3.2/plugin-milestones {:level=>:warn}[0 m [33mReceived an event that has a different character encoding than you configur ed. {:text=>"[2013-12-29 17:42:15] ERROR FENCE 围\\xC0\\xB8\\xBC\\xE0\\xBF\\x D8.\\xB1\\xA3\\xB4娣\xC9\\xFA\\xB4\\xED\\xCE\\xF3\\xA3\\xA1{\\\"Fixed\\\":fals e,\\\"Record\\\":{\\\"FenceId\\\":\\\"9Q7YQS\\\",\\\"State\\\":2,\\\"Recid\\\":\ \\"0WJSE730004D\\\",\\\"Vid\\\":\\\"0WEFF36008NK\\\",\\\"Plateno\\\":\\\"\\xD4\\ xC1AK7M34\\\",\\\"Platecolor\\\":\\\"\\xC0\\xB6\\\",\\\"HangyeId\\\":null,\\\"Xi aquId\\\":\\\"0W7NYBF002F7\\\",\\\"YehuId\\\":\\\"0WDNV3K007F0\\\",\\\"Begin_Tim e\\\":\\\"2013-12-27T14:38:21\\\",\\\"End_Time\\\":\\\"2013-12-29T17:42:23\\\",\ \\"Diff_Time\\\":183842,\\\"Diff_Mile\\\":342500,\\\"Gps_Qty\\\":1163,\\\"Begin_ Gpskey\\\":\\\"ws0ebgq86gxj\\\",\\\"End_Gpskey\\\":\\\"ws0e7deqqte5\\\",\\\"Spee d_Max\\\":79.0,\\\"Speed_Min\\\":0.0,\\\"IsEff\\\":1,\\\"IsStat\\\":1,\\\"RecvTi me\\\":\\\"2013-12-29T17:42:15.3634629+08:00\\\",\\\"Begin_Mile\\\":4258700,\\\" BLat\\\":23.177095,\\\"BLon\\\":113.245138,\\\"ELat\\\":23.086125,\\\"ELon\\\":1 13.36168,\\\"End_Mile\\\":4601200,\\\"Tag\\\":{}},\\\"SavedTime\\\":\\\"2013-12- 29T17:24:15.903967+08:00\\\",\\\"UpdateTime\\\":\\\"2013-12-29T17:42:15.3634629+ 08:00\\\"}\\r", :expected_charset=>"UTF-8", :level=>:warn}[0m [33mReceived an event that has a different character encoding than you configur ed. {:text=>"[2013-12-29 18:42:32] ERROR GPSRT 实时\\xBC\\xE0\\xBF\\xD8.\\xB1 \\xA3\\xB4娣\xC9\\xFA\\xB4\\xED\\xCE\\xF3\\xA3\\xA1\\r", :expected_charset=>"U TF-8", :level=>:warn}[0m [33mReceived an event that has a different character encoding than you configur ed. {:text=>"[2013-12-29 18:42:32] ERROR FENCE 围\\xC0\\xB8\\xBC\\xE0\\xBF\\x D8.\\xB1\\xA3\\xB4娣\xC9\\xFA\\xB4\\xED\\xCE\\xF3\\xA3\\xA1\\r", :expected_cha rset=>"UTF-8", :level=>:warn}[0m Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (Com patibilityError) incompatible character encodings: GBK and UTF-8 at org.jruby.RubyString.+(org/jruby/RubyString.java:1127) at RUBY.receive(file:/E:/logstash/logstash-1.3.2-flatjar.jar!/logstash/o utputs/syslog.rb:127) at RUBY.handle(file:/E:/logstash/logstash-1.3.2-flatjar.jar!/logstash/ou tputs/base.rb:86) at RUBY.initialize((eval):17) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:271) at RUBY.output(file:/E:/logstash/logstash-1.3.2-flatjar.jar!/logstash/pi peline.rb:259) at RUBY.outputworker(file:/E:/logstash/logstash-1.3.2-flatjar.jar!/logst ash/pipeline.rb:218) at RUBY.start_outputs(file:/E:/logstash/logstash-1.3.2-flatjar.jar!/logs tash/pipeline.rb:145)

Please help!

Gliffy Diagrams

Activity

Show:

Details

Assignee

Reporter

Affects versions

Created December 31, 2013 at 9:46 AM
Updated February 14, 2015 at 7:36 AM