{"action":"opened","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/6064","repository_url":"https://api.github.com/repos/elastic/logstash","labels_url":"https://api.github.com/repos/elastic/logstash/issues/6064/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/6064/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/6064/events","html_url":"https://github.com/elastic/logstash/issues/6064","id":183271083,"number":6064,"title":"bug on Logstash-5.0.0-rc1 : log4j2 config location is an invalid URL","user":{"login":"fbaligand","id":3750300,"avatar_url":"https://avatars.githubusercontent.com/u/3750300?v=3","gravatar_id":"","url":"https://api.github.com/users/fbaligand","html_url":"https://github.com/fbaligand","followers_url":"https://api.github.com/users/fbaligand/followers","following_url":"https://api.github.com/users/fbaligand/following{/other_user}","gists_url":"https://api.github.com/users/fbaligand/gists{/gist_id}","starred_url":"https://api.github.com/users/fbaligand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbaligand/subscriptions","organizations_url":"https://api.github.com/users/fbaligand/orgs","repos_url":"https://api.github.com/users/fbaligand/repos","events_url":"https://api.github.com/users/fbaligand/events{/privacy}","received_events_url":"https://api.github.com/users/fbaligand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-16T14:51:44Z","updated_at":"2016-10-16T14:51:44Z","closed_at":null,"body":"When starting Logstash-5.0.0-rc1, I got the following stack trace :\r\n```\r\nERROR StatusLogger Invalid URL C:/logstash-5.0.0-rc1/config/log4j2.properties\r\n java.net.MalformedURLException: unknown protocol: c\r\n        at java.net.URL.<init>(URL.java:593)\r\n        at java.net.URL.<init>(URL.java:483)\r\n        at java.net.URL.<init>(URL.java:432)\r\n        at java.net.URI.toURL(URI.java:1089)\r\n        at org.apache.logging.log4j.core.config.ConfigurationFactory.getInputFromUri(ConfigurationFactory.java:299)\r\n```\r\n\r\nIt is because the path `C:/logstash-5.0.0-rc1/config/log4j2.properties` is not considered as a URL. It must be prefixed by `file:`\r\n\r\n=> It's very easy to fix it here :\r\nhttps://github.com/elastic/logstash/blob/master/logstash-core/lib/logstash/runner.rb#L188\r\n\r\nFollowing line :\r\n`log4j_config_location = ::File.join(setting(\"path.settings\"), \"log4j2.properties\")`\r\nshould be replaced by this one :\r\n`log4j_config_location = \"file:\" + ::File.join(setting(\"path.settings\"), \"log4j2.properties\")`\r\n\r\nI tested on my computer, it fixes the issue.\r\nIf you want that I create a pull request, tell me.\r\n\r\nEnvironment :\r\n- logstash version : 5.0.0-rc1\r\n- OS : windows 10"}}
{"actor":{"display_login":"fbaligand"}}