Hi,

The Karaf main loads the config.properties (as a org.apache.felix.utils.properties.Properties) and load some additional properties in it (like System env/properties).

Especially, it writes one thing (and the only thing ;)): the shutdown command.

It's the:

karaf.shutdown.command

property, containing an unique/random UUID to "secure" the Karaf shutdown.

If the property is not in etc/config.properties, Karaf will try to create one and write in etc/config.properties.
If the property is already there, it just uses it.

So, as a workaround, you can modify etc/config.properties to add:

karaf.shutdown.command=321DE18U23187

(or whatever you want).

Anyway, you are right, you should not prevent Karaf to start if the config.properties can't be updated (just warn that the shutdown command is "unsecure").

I create a Jira for that.

Regards
JB

On 01/24/2015 02:08 AM, thully wrote:
Since we've upgrade our project (Cytoscape) to Karaf 3.0.2, we've discovered
that Karaf is apparently writing to its own etc/config.properties the first
time a new installation starts up. If the user happens to not have write
permission to this file, Karaf will terminate with an error like the
following:

C:\Program Files\Cytoscape_v3.3.0-SNAPSHOT\framework\etc\config.properties
(Access is denied)

This presents a problem on many end-user systems - if a user doesn't have
write permission to the install directory, it is impossible to run after the
initial install. We have noticed that it does seem to work after running it
as administrator once - apparently it only needs to write the file on the
first startup. Though that may be a workaround, this still creates a very
undesirable situation for the end user.

Is there a way to disable writing to the config.properties, or at least
allow it to fail quietly rather than terminating? It is a bit odd to see
Karaf rewriting its own config files - not sure why this is being done in
Karaf 3....



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-3-0-2-tries-to-write-to-etc-config-properties-terminates-on-failure-tp4037973.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to