# Custom .yml file path in embedded mode

**URL:** <https://discuss.elastic.co/t/custom-yml-file-path-in-embedded-mode/4484>\
**Category:** Elasticsearch\
**Created:** [May 26, 2011, 11:56pm UTC](https://discuss.elastic.co/t/custom-yml-file-path-in-embedded-mode/4484 "2011-05-26T23:56:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anurag\_Phadke](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Anurag\_Phadke](https://discuss.elastic.co/u/Anurag_Phadke)\
**Post date:** [May 26, 2011, 11:56pm UTC](https://discuss.elastic.co/t/custom-yml-file-path-in-embedded-mode/4484/1 "2011-05-26T23:56:46Z")

</div>

I am running ES in embedded mode and giving it a wrong config path  
while starting the node; shouldn't the line below fail:

nodeBuilder().loadConfigSettings(false).settings(ImmutableSettings.settingsBuilder().loadFromSource("conf/adasd")).node().start();

---

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [May 27, 2011, 1:42am UTC](https://discuss.elastic.co/t/custom-yml-file-path-in-embedded-mode/4484/2 "2011-05-27T01:42:31Z")

</div>

loadFromSource(String) expects the "contents" of the file and not a path to  
a file. Based on the "content", it tries to determine whether the source is  
YAML, JSON or name value pairs (property file content). Your example is  
determined to be a property file.

Apparently, your source of 'conf/adasd' is not malformed enough for the  
Properties class to load and trigger an exception. If it was malformed  
enough, you would see a SettingsException.

-- jim

On Thu, May 26, 2011 at 7:56 PM, Anurag [anurag.phadke@gmail.com](mailto:anurag.phadke@gmail.com) wrote:

> I am running ES in embedded mode and giving it a wrong config path  
> while starting the node; shouldn't the line below fail:
> 
> nodeBuilder().loadConfigSettings(false).settings(ImmutableSettings.settingsBuilder().loadFromSource("conf/adasd")).node().start();

---

<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, 4:05am UTC](https://discuss.elastic.co/t/custom-yml-file-path-in-embedded-mode/4484/3 "2017-07-06T04:05:12Z")

</div>


