0.90.1 spaces in elasticsearch.yml, lines get ignored

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

0.90.1 spaces in elasticsearch.yml, lines get ignored

q42jaap
I just had a weird thing, might be a bug or a feature, I'm not sure.

My elasticsearch.yml was like this:
 cluster.name: blah
transport.tcp.port: 9308
http.port: 9208

The leading space on the line with cluster.name caused the transport.tcp and http.port to be ignored. I guess it has to do with yml nesting.
In the logs nothing showed up about the ignored lines, I don't know exactly how this works, but I feel this should be at least a warning.

Of course we removed the leading space which made it work again.

Jaap

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: 0.90.1 spaces in elasticsearch.yml, lines get ignored

Radu Gheorghe-2
Hi Jaap,

You got it right, it's because of the role of indentation in YAML, which is similar to the way you'd indent code in Python (an indented property "belongs" to the previous one). You can play with an online parser like this one:
http://yaml-online-parser.appspot.com/

And see how it would output your config in JSON.

Best regards,
Radu


On Mon, Jul 8, 2013 at 2:20 PM, Jaap Taal <[hidden email]> wrote:
I just had a weird thing, might be a bug or a feature, I'm not sure.

My elasticsearch.yml was like this:
 cluster.name: blah
transport.tcp.port: 9308
http.port: 9208

The leading space on the line with cluster.name caused the transport.tcp and http.port to be ignored. I guess it has to do with yml nesting.
In the logs nothing showed up about the ignored lines, I don't know exactly how this works, but I feel this should be at least a warning.

Of course we removed the leading space which made it work again.

Jaap

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: 0.90.1 spaces in elasticsearch.yml, lines get ignored

q42jaap

Hi Radu,

Just like I said, I already figured that out, the point was that this could be a mistake more people may make. Because the file already has a space after every hash, deleting only the hash and not the space leads to this unexpected result.

Suggestion:
All describing comments should have the space, all examples just waiting to be uncommented => no spacing after the hash.

Jaap

On Jul 8, 2013 2:50 PM, "Radu Gheorghe" <[hidden email]> wrote:
Hi Jaap,

You got it right, it's because of the role of indentation in YAML, which is similar to the way you'd indent code in Python (an indented property "belongs" to the previous one). You can play with an online parser like this one:
http://yaml-online-parser.appspot.com/

And see how it would output your config in JSON.

Best regards,
Radu


On Mon, Jul 8, 2013 at 2:20 PM, Jaap Taal <[hidden email]> wrote:
I just had a weird thing, might be a bug or a feature, I'm not sure.

My elasticsearch.yml was like this:
 cluster.name: blah
transport.tcp.port: 9308
http.port: 9208

The leading space on the line with cluster.name caused the transport.tcp and http.port to be ignored. I guess it has to do with yml nesting.
In the logs nothing showed up about the ignored lines, I don't know exactly how this works, but I feel this should be at least a warning.

Of course we removed the leading space which made it work again.

Jaap

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

--
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/6DGDSXHE1nU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.