# Elasticsearch 1.3.2 process logging.yml as a json foramt when logging.yml is deployed from subversion repo

**URL:** <https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307>\
**Category:** Elasticsearch\
**Created:** [August 15, 2014, 10:41pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307 "2014-08-15T22:41:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinyuan\_Zhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinyuan_zhou/32/90185_2.png) [@Jinyuan\_Zhou](https://discuss.elastic.co/u/Jinyuan_Zhou)\
**Post date:** [August 15, 2014, 10:41pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/1 "2014-08-15T22:41:30Z")

</div>

I deploy these files from svn repository. since logging.yml is under  
subversion there is a .svn/text-base/logging.yml.text-base file. ES load  
this file ends with text-base and assumes its a json format. a

org.elasticsearch.common.jackson.core.JsonParseException is raised. Is  
there a way to tell es that my file is yml not jason?

This problem does not happen with 1.1.0.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4510928c-b0e9-47ad-8645-f01c23700d37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4510928c-b0e9-47ad-8645-f01c23700d37%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Daniel\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_p/32/1213_2.png) [@Daniel\_P](https://discuss.elastic.co/u/Daniel_P)\
**Post date:** [October 9, 2014, 9:28am UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/2 "2014-10-09T09:28:33Z")

</div>

We have the same problem is reading .svn/text-base/logging.yml.text-base  
and fails to setup logging.  
I think the loading logic should be a little more restrictive. Loading  
everything that starts with "logging." including files in "hidden"  
directories, is a little bit too much.

I fixed it with mounting an empty directory over the .svn directory. It's  
no problem for us since we mount it over NFS and manage it on another host  
(without the .svn empty directory). You could add that to the initscript  
(mount before starting and umount after the start), if you need to use svn  
on the host itself.  
But imo that's a dirty hack and should be dealt with in elasticsearch (at  
least ignoring "." directories).

Regards  
Daniel

PS: See

> <https://github.com/elastic/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java>

  
(was not present in 1.2)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jinyuan\_Zhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinyuan_zhou/32/90185_2.png) [@Jinyuan\_Zhou](https://discuss.elastic.co/u/Jinyuan_Zhou)\
**Post date:** [October 9, 2014, 3:08pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/3 "2014-10-09T15:08:09Z")

</div>

What i did is renamimg logging.yml to something else and then at startup  
time I "copy" the contents to logging.yml  
Thanks,  
Jack

Jinyuan (Jack) Zhou

On Thu, Oct 9, 2014 at 2:28 AM, Daniel P. [thetuxkeeper@gmail.com](mailto:thetuxkeeper@gmail.com) wrote:

> We have the same problem is reading .svn/text-base/logging.yml.text-base  
> and fails to setup logging.  
> I think the loading logic should be a little more restrictive. Loading  
> everything that starts with "logging." including files in "hidden"  
> directories, is a little bit too much.
> 
> I fixed it with mounting an empty directory over the .svn directory. It's  
> no problem for us since we mount it over NFS and manage it on another host  
> (without the .svn empty directory). You could add that to the initscript  
> (mount before starting and umount after the start), if you need to use svn  
> on the host itself.  
> But imo that's a dirty hack and should be dealt with in elasticsearch (at  
> least ignoring "." directories).
> 
> Regards  
> Daniel
> 
> PS: See  
> [https://github.com/elasticsearch/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L107](https://github.com/elasticsearch/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L107)  
> (was not present in 1.2)
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANBTPCG56Q3kgzGD-1jrQqrX\_FeQdgB6vj--v-Kh7ANzQ83SGw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANBTPCG56Q3kgzGD-1jrQqrX_FeQdgB6vj--v-Kh7ANzQ83SGw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Daniel\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_p/32/1213_2.png) [@Daniel\_P](https://discuss.elastic.co/u/Daniel_P)\
**Post date:** [October 9, 2014, 7:19pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/4 "2014-10-09T19:19:59Z")

</div>

Ok, moving/copying is also a way to solve it. But in my case it wouldn't  
work since we have a readonly nfs mount.

I opened an issue:

> <https://github.com/elastic/elasticsearch/issues/8040>
>
> elasticsearch 1.3 will try to import .svn/text-base/logging.yml.text-base as jso…n and fail to set up logging as a whole.
> I think it's not reproducible with subversion 1.7+ since a new .svn-format with hash-based filenames is used. But Debian wheezy/stable is still using subversion 1.6 and is what we use.
> I found https://github.com/elasticsearch/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L107 which is the problematic part.
> imo it should at least skip "hidden" directories, if not be limited to some more strict rules (file extension whitelist without the "catch-all" default, ...).
> 
> I thought of only ignoring the failed file, but that could lead to strange errors too. 
> What if you have a logging.json. Then you would have a .svn/text-base/logging.json.text-base, which could import and override the original logging.json (local modified logging.json). =\> quite troublesome to find out why the changes don't work until you commit them :)
> \##### Known workarounds (also see https://groups.google.com/forum/#!topic/elasticsearch/8zlwEj12DjI):
> 1. Add "copy/move to logging.yml" command before startup (so that the file in .svn doesn't start with "logging.")
> 2. mount an empty directory over .svn (tmpfs, ...). Umount/mount if needed to work with svn \<= that's the solution we use, since we mount it readonly over nfs and cp/mv doesn't work
> 
> I think both workarounds are quite dirty hacks and you shouldn't be forced to use those, just because you use a vcs.

Let's see what happens. 🙂

On Thursday, October 9, 2014 5:08:19 PM UTC+2, Jinyuan Zhou wrote:

> What i did is renamimg logging.yml to something else and then at startup  
> time I "copy" the contents to logging.yml  
> Thanks,  
> Jack
> 
> Jinyuan (Jack) Zhou
> 
> On Thu, Oct 9, 2014 at 2:28 AM, Daniel P. \<[thetux...@gmail.com](mailto:thetux...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > We have the same problem is reading .svn/text-base/logging.yml.text-base  
> > and fails to setup logging.  
> > I think the loading logic should be a little more restrictive. Loading  
> > everything that starts with "logging." including files in "hidden"  
> > directories, is a little bit too much.
> > 
> > I fixed it with mounting an empty directory over the .svn directory. It's  
> > no problem for us since we mount it over NFS and manage it on another host  
> > (without the .svn empty directory). You could add that to the initscript  
> > (mount before starting and umount after the start), if you need to use svn  
> > on the host itself.  
> > But imo that's a dirty hack and should be dealt with in elasticsearch (at  
> > least ignoring "." directories).
> > 
> > Regards  
> > Daniel
> > 
> > PS: See  
> > [https://github.com/elasticsearch/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L107](https://github.com/elasticsearch/elasticsearch/blob/1.3/src/main/java/org/elasticsearch/common/logging/log4j/LogConfigurator.java#L107)  
> > (was not present in 1.2)
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jinyuan\_Zhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinyuan_zhou/32/90185_2.png) [@Jinyuan\_Zhou](https://discuss.elastic.co/u/Jinyuan_Zhou)\
**Post date:** [October 9, 2014, 7:22pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/5 "2014-10-09T19:22:30Z")

</div>

Thanks for open an issue.

Jinyuan (Jack) Zhou

On Thu, Oct 9, 2014 at 12:19 PM, Daniel P. [thetuxkeeper@gmail.com](mailto:thetuxkeeper@gmail.com) wrote:

> Ok, moving/copying is also a way to solve it. But in my case it wouldn't  
> work since we have a readonly nfs mount.
> 
> I opened an issue:  
> [logging config in a svn working copy fails to load with elasticsearch 1.3 · Issue #8040 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/8040)
> 
> Let's see what happens. 🙂
> 
> On Thursday, October 9, 2014 5:08:19 PM UTC+2, Jinyuan Zhou wrote:
> 
> > What i did is renamimg logging.yml to something else and then at startup  
> > time I "copy" the contents to logging.yml  
> > Thanks,  
> > Jack
> > 
> > Jinyuan (Jack) Zhou
> > 
> > On Thu, Oct 9, 2014 at 2:28 AM, Daniel P. [thetux...@gmail.com](mailto:thetux...@gmail.com) wrote:
> > 
> > > We have the same problem is reading .svn/text-base/logging.yml.text-base  
> > > and fails to setup logging.  
> > > I think the loading logic should be a little more restrictive. Loading  
> > > everything that starts with "logging." including files in "hidden"  
> > > directories, is a little bit too much.
> > > 
> > > I fixed it with mounting an empty directory over the .svn directory.  
> > > It's no problem for us since we mount it over NFS and manage it on another  
> > > host (without the .svn empty directory). You could add that to the  
> > > initscript (mount before starting and umount after the start), if you need  
> > > to use svn on the host itself.  
> > > But imo that's a dirty hack and should be dealt with in elasticsearch  
> > > (at least ignoring "." directories).
> > > 
> > > Regards  
> > > Daniel
> > > 
> > > PS: See [GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch/)  
> > > blob/1.3/src/main/java/org/elasticsearch/common/logging/  
> > > log4j/LogConfigurator.java#L107 (was not present in 1.2)
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > topic/elasticsearch/8zlwEj12DjI/unsubscribe.  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6679e635-5f23-4831-98d6-a34cb5997e66%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/8zlwEj12DjI/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43972cc8-2510-49f8-b85f-7189e501919a%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANBTPCGh%2BZdnBhZAmXvKb\_gEZ5XjRBVFgYX9BV6FZXZbSmeNPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANBTPCGh%2BZdnBhZAmXvKb_gEZ5XjRBVFgYX9BV6FZXZbSmeNPA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:57am UTC](https://discuss.elastic.co/t/elasticsearch-1-3-2-process-logging-yml-as-a-json-foramt-when-logging-yml-is-deployed-from-subversion-repo/19307/6 "2017-07-06T00:57:13Z")

</div>


