Details
-
Bug
-
Resolution: Won't Do
-
Major
-
jboss-fuse-6.1
-
None
-
None
-
%
-
Description
Fuse 6.1 and JBoss A-MQ 6.1 (and perhaps earlier versions) do not fully respect the KARAF_ETC environment variable. This variable should allow it to be possible to put the Fuse configuration directory in some place other than ./etc. Fuse does correctly detect an attempt to set KARAF_ETC to a non-existent directory and, if it is set validly, Fuse does start up. However, it fails to read user credentials from KARAF_ETC/users.properties, and a message to that effect can be seen in the log.
9:22:25,205 | WARN | FelixStartLevel | BootstrapConfiguration | 53 - io.fabric8.fabric-zookeeper - 1.0.0.redhat-379 | Failed to load users from etc/users.properties. No users will be imported.
java.io.FileNotFoundException: /home/kevin/lib/jboss-fuse-6.1.0.redhat-379/etc/users.properties (No such file or directory)
at java.io.FileInputStream.open(Native Method)[:1.7.0_25]
at java.io.FileInputStream.<init>(FileInputStream.java:138)[:1.7.0_25]
at org.apache.felix.utils.properties.Properties.load(Properties.java:106)
at io.fabric8.zookeeper.bootstrap.BootstrapConfiguration.activate(BootstrapConfiguration.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
The problem appears to be in the class io.fabric8.zookeeper.bootstrap.BootstrapConfiguration.java, which is hard-coded to look for users.properties in ./etc.
@Activate
void activate(ComponentContext componentContext, Map<String, ?> configuration) throws Exception {
this.componentContext = componentContext;
configurer.configure(configuration, this);
org.apache.felix.utils.properties.Properties userProps = new org.apache.felix.utils.properties.Properties();
// [TODO] abstract access to karaf users.properties
try
catch (IOException e)
{ LOGGER.warn("Failed to load users from etc/users.properties. No users will be imported.", e); }