karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3471) Karaf can't start if etc/config.properties is not writable
Date Thu, 09 Apr 2015 09:12:12 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487018#comment-14487018
] 

Jean-Baptiste Onofré commented on KARAF-3471:
---------------------------------------------

If the etc/config.properties is not "write-able", you have:

{code}
/home/jbonofre/Workspace/karaf/assemblies/apache-karaf/target/apache-karaf-4.0.0-SNAPSHOT/etc/config.properties
(Permission denied)
Error occurred shutting down framework: java.io.FileNotFoundException: /home/jbonofre/Workspace/karaf/assemblies/apache-karaf/target/apache-karaf-4.0.0-SNAPSHOT/etc/config.properties
(Permission denied)
java.io.FileNotFoundException: /home/jbonofre/Workspace/karaf/assemblies/apache-karaf/target/apache-karaf-4.0.0-SNAPSHOT/etc/config.properties
(Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at org.apache.felix.utils.properties.Properties.save(Properties.java:152)
        at org.apache.felix.utils.properties.Properties.save(Properties.java:148)
        at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:247)
        at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:221)
        at org.apache.karaf.main.Main.main(Main.java:188)
{code}

I'm modifying the ConfigProperties.java (in Main) to just log a warning but not block the
startup.

> Karaf can't start if etc/config.properties is not writable
> ----------------------------------------------------------
>
>                 Key: KARAF-3471
>                 URL: https://issues.apache.org/jira/browse/KARAF-3471
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 4.0.0, 2.4.2, 3.0.4
>
>
> 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:
> {code}
> karaf.shutdown.command
> {code}
> 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:
> {code}
> karaf.shutdown.command=321DE18U23187
> {code}
> (or whatever you want).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message