{"action":"created","issue":{"url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/6","labels_url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/6/comments","events_url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/6/events","html_url":"https://github.com/jurmous/logstash-log4j2/issues/6","id":54306797,"number":6,"title":"Logstash doesn't start: port is not opened with log4j2 plugin","user":{"login":"rescolar","id":10529626,"avatar_url":"https://avatars.githubusercontent.com/u/10529626?v=3","gravatar_id":"","url":"https://api.github.com/users/rescolar","html_url":"https://github.com/rescolar","followers_url":"https://api.github.com/users/rescolar/followers","following_url":"https://api.github.com/users/rescolar/following{/other_user}","gists_url":"https://api.github.com/users/rescolar/gists{/gist_id}","starred_url":"https://api.github.com/users/rescolar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rescolar/subscriptions","organizations_url":"https://api.github.com/users/rescolar/orgs","repos_url":"https://api.github.com/users/rescolar/repos","events_url":"https://api.github.com/users/rescolar/events{/privacy}","received_events_url":"https://api.github.com/users/rescolar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T10:34:16Z","updated_at":"2015-01-14T11:53:34Z","closed_at":null,"body":"Hi!\r\nThanks for the plugin!\r\nI'm trying to get it work but no luck for the moment.\r\nLogstash-1.4.2 with this is the configuration:\r\n\r\nThis is my config file:\r\ninput {\r\n  log4j2 {\r\n      mode => \"server\"\r\n      port => 7000\r\n  }\r\n}\r\noutput {\r\n  stdout { codec => rubydebug\r\n }\r\n  elasticsearch { host => localhost }\r\n}\r\n\r\nAnd this is what happens: Logstash doesn't complete the load and doesn't open the port:\r\n\r\nHere is how I start it:\r\n/usr/bin/java -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar /opt/logstash/vendor/jar/jruby-complete-1.7.11.jar -I/opt/logstash/lib /opt/logstash/lib/logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log --debug --pluginpath /etc/logstash/logstash-log4j2-release-4.0/lib/\r\n\r\nThe port is not opened:\r\nlsof -nPi:7000\r\n\r\nAnd these are the logstash debug logs:\r\n\r\n{:timestamp=>\"2015-01-14T10:24:26.386000+0000\", :message=>\"Adding plugin path\", :path=>\"/etc/logstash/logstash-log4j2-release-4.0/lib/\", :level=>:debug, :file=>\"logstash/agent.rb\", :line=>\"282\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.403000+0000\", :message=>\"Reading config file\", :file=>\"logstash/agent.rb\", :level=>:debug, :line=>\"301\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.732000+0000\", :message=>\"Compiled pipeline code:\\n@inputs = []\\n@filters = []\\n@outputs = []\\n@input_log4j2_1 = plugin(\\\"input\\\", \\\"log4j2\\\", LogStash::Util.hash_merge_many({ \\\"mode\\\" => (\\\"server\\\".force_encoding(\\\"UTF-8\\\")) }, { \\\"port\\\" => 7000 }))\\n\\n@inputs << @input_log4j2_1\\n@output_stdout_2 = plugin(\\\"output\\\", \\\"stdout\\\", LogStash::Util.hash_merge_many({ \\\"codec\\\" => (\\\"rubydebug\\\".force_encoding(\\\"UTF-8\\\")) }))\\n\\n@outputs << @output_stdout_2\\n@output_elasticsearch_3 = plugin(\\\"output\\\", \\\"elasticsearch\\\", LogStash::Util.hash_merge_many({ \\\"host\\\" => (\\\"localhost\\\".force_encoding(\\\"UTF-8\\\")) }))\\n\\n@outputs << @output_elasticsearch_3\\n  @filter_func = lambda do |event, &block|\\n    extra_events = []\\n    @logger.debug? && @logger.debug(\\\"filter received\\\", :event => event.to_hash)\\n    extra_events.each(&block)\\n  end\\n  @output_func = lambda do |event, &block|\\n    @logger.debug? && @logger.debug(\\\"output received\\\", :event => event.to_hash)\\n    @output_stdout_2.handle(event)\\n    @output_elasticsearch_3.handle(event)\\n    \\n  end\", :level=>:debug, :file=>\"logstash/pipeline.rb\", :line=>\"26\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.963000+0000\", :message=>\"Using milestone 1 input plugin 'log4j2'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin.  For more information on plugin milestones, see http://logstash.net/docs/1.4.2-modified/plugin-milestones\", :level=>:warn, :file=>\"logstash/config/mixin.rb\", :line=>\"209\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.991000+0000\", :message=>\"config LogStash::Codecs::Plain/@charset = \\\"UTF-8\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.997000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@mode = \\\"server\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:26.998000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@port = 7000\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.012000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@debug = false\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.031000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@codec = <LogStash::Codecs::Plain charset=>\\\"UTF-8\\\">\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.032000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@add_field = {}\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.033000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@host = \\\"0.0.0.0\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.037000+0000\", :message=>\"config LogStash::Inputs::Log4j2/@data_timeout = 5\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.132000+0000\", :message=>\"config LogStash::Outputs::Stdout/@codec = <LogStash::Codecs::RubyDebug >\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.134000+0000\", :message=>\"config LogStash::Outputs::Stdout/@type = \\\"\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.136000+0000\", :message=>\"config LogStash::Outputs::Stdout/@tags = []\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.138000+0000\", :message=>\"config LogStash::Outputs::Stdout/@exclude_tags = []\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.151000+0000\", :message=>\"config LogStash::Outputs::Stdout/@workers = 1\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.223000+0000\", :message=>\"config LogStash::Codecs::Plain/@charset = \\\"UTF-8\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.231000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@host = \\\"localhost\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.233000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@type = \\\"\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.247000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@tags = []\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.249000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@exclude_tags = []\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.250000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@codec = <LogStash::Codecs::Plain charset=>\\\"UTF-8\\\">\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.256000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@workers = 1\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.257000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@index = \\\"logstash-%{+YYYY.MM.dd}\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.259000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@manage_template = true\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.260000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@template_name = \\\"logstash\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.262000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@template_overwrite = false\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.264000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@document_id = nil\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.265000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@embedded = false\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.267000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@embedded_http_port = \\\"9200-9300\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.272000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@max_inflight_requests = 50\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.274000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@flush_size = 5000\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.283000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@idle_flush_time = 1\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n{:timestamp=>\"2015-01-14T10:24:27.285000+0000\", :message=>\"config LogStash::Outputs::ElasticSearch/@action = \\\"index\\\"\", :level=>:debug, :file=>\"logstash/config/mixin.rb\", :line=>\"105\"}\r\n\r\nThanks a lot for your help!\r\nRafa"},"comment":{"url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/comments/69905909","html_url":"https://github.com/jurmous/logstash-log4j2/issues/6#issuecomment-69905909","issue_url":"https://api.github.com/repos/jurmous/logstash-log4j2/issues/6","id":69905909,"user":{"login":"rescolar","id":10529626,"avatar_url":"https://avatars.githubusercontent.com/u/10529626?v=3","gravatar_id":"","url":"https://api.github.com/users/rescolar","html_url":"https://github.com/rescolar","followers_url":"https://api.github.com/users/rescolar/followers","following_url":"https://api.github.com/users/rescolar/following{/other_user}","gists_url":"https://api.github.com/users/rescolar/gists{/gist_id}","starred_url":"https://api.github.com/users/rescolar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rescolar/subscriptions","organizations_url":"https://api.github.com/users/rescolar/orgs","repos_url":"https://api.github.com/users/rescolar/repos","events_url":"https://api.github.com/users/rescolar/events{/privacy}","received_events_url":"https://api.github.com/users/rescolar/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T11:53:34Z","updated_at":"2015-01-14T11:53:34Z","body":"Thanks for the quick answer!\r\nNow I'm pretty sure the problem comes from the plugin installation, since it works for logstash 1.5 with the  automatic installation.\r\nIn logstash 1.4 I just unzipped the plugin and then I added --pluginpath /etc/logstash/logstash-log4j2-release-4.0/lib/\r\nto the launch script.  I didn't run any script to build it or to get libraries.\r\nWhat is the right way to install it on 1.4.2? \r\nThanks!"}}