karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Bouron (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-5352) KARAF_ETC envvar ignored
Date Thu, 07 Sep 2017 15:58:00 GMT
Thomas Bouron created KARAF-5352:
------------------------------------

             Summary: KARAF_ETC envvar ignored
                 Key: KARAF-5352
                 URL: https://issues.apache.org/jira/browse/KARAF-5352
             Project: Karaf
          Issue Type: Bug
    Affects Versions: 4.1.2
         Environment: Tested on CentOS 7.x
            Reporter: Thomas Bouron


I'm currently working on upgrading the RPM and DEB packaging for Apache Brooklyn. The project
uses Karaf and has the following folder structure for the RPM package:
{code}
/-
 +- etc
 |+- brooklyn
 +- opt
 |+- brooklyn-0.12.0-SNAPSHOT
 ||+- bin
 ||+- data
 ||+- deploy
 ||+- lib
 ||+- system
{code}

The {{etc}} folder is not part of {{KARAF_HOME}} but in {{/etc/brooklyn}}. I setup my {{KARAF_ETC}}
to point to this folder, however when I start Karaf, I get the followoing

{code}
Sep 07 15:27:14 br-ovx1by-amp-appl-om8x-empty-t0ww-280 systemd[1]: Started Apache Brooklyn
Service.
Sep 07 15:27:14 br-ovx1by-amp-appl-om8x-empty-t0ww-280 systemd[1]: Starting Apache Brooklyn
Service...
Sep 07 15:27:14 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: JAVA_HOME not set; results
may vary
Sep 07 15:27:14 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: karaf: Ignoring predefined
value for KARAF_HOME
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: 15:27:17.085 [pool-1-thread-2]
ERROR org.apache.karaf.features.inte
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: java.io.IOException: /opt/brooklyn-0.12.0-SNAPSHOT/etc/0d218152-8d8
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.RepositoryImpl.load(R
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.FeaturesServiceImpl.l
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.FeaturesServiceImpl.a
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.FeaturesServiceImpl.a
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.BootFeaturesInstaller
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.BootFeaturesInstaller
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.osgi.Activator.doStart(Activa
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.ja
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.ja
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.lang.Thread.run(Thread.java:748)
[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: Caused by: java.io.FileNotFoundException:
/opt/brooklyn-0.12.0-SNAP
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.io.FileInputStream.open0(Native
Method) ~[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.io.FileInputStream.open(FileInputStream.java:195)
~[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.io.FileInputStream.<init>(FileInputStream.java:138)
~[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.io.FileInputStream.<init>(FileInputStream.java:93)
~[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConne
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileU
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at java.net.URL.openStream(URL.java:1045)
~[?:?]
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: at org.apache.karaf.features.internal.service.RepositoryImpl.load(R
Sep 07 15:27:17 br-ovx1by-amp-appl-om8x-empty-t0ww-280 karaf[1919]: ... 12 more
{code}

As you can see, karaf expect the {{etc}} folder to be inside {{KARAF_HOME}} even though I
specified my {{KARAF_ETC}} envvar.

If I softlink {{/etc/brooklyn}} to {{/opt/brooklyn-0.12.0-SNAPSHOT}}, it works. 

It's also worth mentioning that I don't have this issue with Karaf 4.0.8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message