Bug 193467 - [patch] textproc/elasticsearch prints exceptions if you edit the default logging.yml file
Summary: [patch] textproc/elasticsearch prints exceptions if you edit the default logg...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tom Judge
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 19:49 UTC by Ryan Steinmetz
Modified: 2014-11-13 16:55 UTC (History)
0 users

See Also:


Attachments
Patch to resolve issue (3.91 KB, text/plain)
2014-09-08 19:49 UTC, Ryan Steinmetz
no flags Details
Corrected diff (3.91 KB, patch)
2014-09-08 20:06 UTC, Ryan Steinmetz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Steinmetz freebsd_committer freebsd_triage 2014-09-08 19:49:54 UTC
Created attachment 147079 [details]
Patch to resolve issue

Elasticsearch appears to try to load logging.yml.sample as well as bad/logging.yml.sample at startup.

The attached patch moves the sample files to %%DATADIR%% and displays a message to the user that informs them that the sample files now live in %%DATADIR%%.

% sudo service elasticsearch console
Failed to configure logging...
org.elasticsearch.common.settings.SettingsException: Failed to load
settings from [file:/usr/local/etc/elasticsearch/logging.yml.sample]
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:947)
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:931)
        at org.elasticsearch.common.logging.log4j.LogConfigurator.loadConfig(LogConfigurator.java:123)
        at org.elasticsearch.common.logging.log4j.LogConfigurator$1.visitFile(LogConfigurator.java:111)
        at org.elasticsearch.common.logging.log4j.LogConfigurator$1.visitFile(LogConfigurator.java:107)
        at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:135)
        at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:199)
        at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
        at java.nio.file.Files.walkFileTree(Files.java:2600)
        at org.elasticsearch.common.logging.log4j.LogConfigurator.resolveConfig(LogConfigurator.java:107)
        at org.elasticsearch.common.logging.log4j.LogConfigurator.configure(LogConfigurator.java:81)
        at org.elasticsearch.bootstrap.Bootstrap.setupLogging(Bootstrap.java:94)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:178)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: org.elasticsearch.common.jackson.core.JsonParseException:
Unexpected character ('#' (code 35)): expected a valid value (number,
String, array, object, 'true', 'false' or 'null')
 at [Source: # you can override this using by setting a system
property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
Comment 1 Ryan Steinmetz freebsd_committer freebsd_triage 2014-09-08 19:50:15 UTC
Assign to maintainer.
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2014-09-08 20:06:13 UTC
Created attachment 147081 [details]
Corrected diff

This patch corrects a typo in the original patch.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-11-13 16:18:24 UTC
A commit references this bug:

Author: tj
Date: Thu Nov 13 16:17:23 UTC 2014
New revision: 372526
URL: https://svnweb.freebsd.org/changeset/ports/372526

Log:
  Upgrade to 1.4.0.

  Changes: http://www.elasticsearch.org/downloads/1-4-0/

  Fix logging configuration examples.

  PR:		193467
  Submitted by:	zi

Changes:
  head/textproc/elasticsearch/Makefile
  head/textproc/elasticsearch/distinfo
  head/textproc/elasticsearch/files/pkg-message.in
  head/textproc/elasticsearch/pkg-plist
Comment 4 Tom Judge freebsd_committer freebsd_triage 2014-11-13 16:55:31 UTC
Fixed with the update to 1.4.0.