I try to adjust a Java properties file with augeas and can't really get it to work even though my usecase seems very straight forward.

I do have a Neo4j server (on Ubuntu 14.04 - installed from the official packages) with the default neo4j-server.properties file and I want to adjust one property. But even before that I can't even manage to let augtool read anything from that file.

This is what I'm trying to achieve:

 sudo augtool --noautoload
 augtool> set /augeas/load/Properties/lens Properties.lns
 augtool> set /augeas/load/Properties/incl "/etc/neo4j/neo4j-server.properties"
 augtool> load

Checking if that worked, with:

 augtool> print /files/etc/neo4j/neo4j-server.properties

Doesn't return anything.

My next step would be:

 augtool> set /files/etc/neo4j/neo4j-server.properties/org.neo4j.server.webserver.port 8074
 augtool> save

But of course this doesn't make sense atm.

As said before - I use the official package. The properties file can be found in the Github-Repo of Neo4j

I would be really great if someone could help me to automate that adjustment.



First, don't bother with setting up the lens manually when you're using Augeas 1.2, just do:

$ augtool -At "Properties.lns incl /etc/neo4j/neo4j-server.properties"

and you're set.

Now, if the file doesn't appear in /files, you need to check for parsing errors. Type the following in the augtool session:

augtool> print /augeas/files/etc/neo4j/neo4j-server.properties//error

and see if it returns anything about failing to parse.

Note: On Augeas 1.4, you could just type errors in the session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.