Hello,
This is my first time writing to this list and I'm not even sure that
this mail should go here. I have found what I think to be a bug and I
was not sure how to report it. Apologies if this is not the appropriate
place.
I am one of the developers of Opencast [1], which since several months
uses Karaf as the OSGI container. We are in the process of releasing a
new version and I have detected a small issue: Aries tries to write a
default configuration file ("org.apache.aries.transaction.cfg", most
often empty) when it does not find one in the configuration directory.
That causes an exception when Karaf starts if it does not have
permission to write in that directory, which is the case when the system
is deployed following the FHS guidelines --namely, the system-wide
configuration files should be stored under /etc, and such files should
not be modified by the applications (and therefore applications should
not have write permission on these files).
The good (and curious) part is that Aries does not even seem to need any
configuration file to work properly --the system works well despite the
big ugly exception on startup. Therefore I do not see the point to try
to create that file at all. The standard approach should be to either
completely fail on startup (thus requiring the user to provide a
configuration file on their own) or to use the default parameters (and
the file would only be present if the user wished to modify such defaults).
In the end, the issue is harmless but scary at the first sight, and
affects all our users who install the RPM-packaged version of Opencast.
In the meantime, we have got rid of the exception by including an empty
configuration file in the /etc directory, but because we consider this a
bug, I wanted to report it to the upstream project. Please find attached
a sample log file containing the exception.
Apologies if this is not the right list for posting bug reports.
Best regards
--
Rubén Pérez Vázquez
*Universität zu Köln*
/Regionales Rechenzentrum (RRZK)/
Weyertal 121, Raum 4.05
D-50931 Köln
✆: +49-221-470-89603
[1] http://www.opencast.org
Nov 15, 2016 4:10:50 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Nov 15, 2016 4:10:50 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Nov 15, 2016 4:10:50 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /var/lib/opencast/lock
Nov 15, 2016 4:10:50 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Nov 15, 2016 4:10:50 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100
2016-11-15 16:10:54,213 | WARN | (FeaturesServiceImpl:454) - Error when installing feature region: java.io.IOException: Error resolving artifact org.eclipse.equinox:region:jar:1.0.0.v20110506: Could not find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central (http://repo1.maven.org/maven2/)
2016-11-15 16:10:54,696 | WARN | (FeatureConfigInstaller:118) - Can't update cfg file
java.io.FileNotFoundException: /etc/opencast/org.apache.aries.transaction.cfg (Permission denied)
at java.io.FileOutputStream.open(Native Method)[:1.7.0_111]
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)[:1.7.0_111]
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)[:1.7.0_111]
at org.apache.felix.utils.properties.Properties.save(Properties.java:153)[karaf.jar:3.0.8]
at org.apache.felix.utils.properties.Properties.save(Properties.java:149)[karaf.jar:3.0.8]
at org.apache.karaf.features.internal.FeatureConfigInstaller.updateStorage(FeatureConfigInstaller.java:269)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:116)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:575)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatureDependency(FeaturesServiceImpl.java:650)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:572)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatureDependency(FeaturesServiceImpl.java:650)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:572)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatureDependency(FeaturesServiceImpl.java:650)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:572)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:434)[19:org.apache.karaf.features.core:3.0.8]
at org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:93)
at org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_111]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_111]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:299)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:980)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:736)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:848)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:811)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[15:org.apache.aries.blueprint.core:1.6.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_111]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:255)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:186)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:724)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:411)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[15:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[9:org.apache.aries.util:1.1.1]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[9:org.apache.aries.util:1.1.1]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[9:org.apache.aries.util:1.1.1]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[9:org.apache.aries.util:1.1.1]
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[9:org.apache.aries.util:1.1.1]
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.2.1.jar:]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_111]
2016-11-15 16:11:00,810 | WARN | (NSHandler:338) - Managed persistence context support is no longer available for use with the Aries Blueprint container.
2016-11-15 16:11:00,933 | WARN | (PersistenceBundleManager:596) - There are no providers available.
2016-11-15 16:11:00,938 | WARN | (PersistenceBundleManager:596) - There are no providers available.
2016-11-15 16:11:00,942 | WARN | (PersistenceBundleManager:596) - There are no providers available.