0

I am using Apache Karaf 2.3.0, and deploying my bundles as Activator bundles. At some place ver rarely I face a problem where my karaf does not start up the bundles. But I see that when i start the container on such boxes with the network(on my Linux box) brought down, it starts up. I am just a bit confused as to what is the dependency that Karaf is having on the network, that is stopping it from resoving all the bundles. From my application specific bundle code, I am not specifically using the network.

What is the dependency of Karaf on the network?

Akhil A
  • 1
  • 1

2 Answers2

0

Karaf deploys bundles as maven artifacts, sometimes it will try to figure out to use the latest from the repository. I think there has been a fix for this behavior already. You should use the latest 2.3.9 instead of 2.3.0. There has been a lot of improvements regarding this topic.

EDIT - Question Answers:

1) Karaf sometimes tries to load the artifacts from the local maven repository and after that from the system folder. This is a regression that has been fixed.
2) Yes this issue has been fixed on all current versions.
3) I would always go for version 3.0.2 since this is in line with future enhancements. 2.4. was introduced to have OSGi 5 capabilities with supporting the "Older" feature set, especially the command syntax which has been changed with 3.0
4) yes and has been made default with 3.0.x and 2.3.x

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • 1. If Karaf is trying to look out for the latest from the repository, how is it that it works when the network is down? When the network is down, the repository itself will not be accessible right? 2. As this issue is said to be fixed in 2.3.9, assuming it should be fixed even in 2.4.0 and 3.0.1 3. If I have to choose between 2.4.0 and 3.0.1, which one would be best recommended. Do not want any feature set included in these versions, but am only looking out for the max stability . 4. Is there an option to restrict Karaf from looking over the network to fetch the latest internal artifacts. – Akhil A Nov 11 '14 at 09:26
  • Is there a ticket or bug number that I can look into for this issue in the Karaf bug repo? And resticting the maven option, what i understand from the comment is that in 2.3.0 version there is no option available to restrict this. The option is available only in the 3.0.x and 2.3.x versions!! – Akhil A Nov 12 '14 at 12:05
  • https://issues.apache.org/jira/browse/KARAF just look through the released versions. I suspect 2.3.4 - 2.3.6 is where the fix has been introduced – Achim Nierbeck Nov 12 '14 at 13:05
  • Really thankful for the info, but unfortunately I was not able to locate the issue in the releases mentioned. Any more help to identify the issue link... – Akhil A Nov 17 '14 at 03:26
  • Strange things heppening.I started the bundles by stopping the network on the box.My bundles started and then i started the network and things worked fine.After 4 days Karaf stopped responding though the process was still there.When i tried to log into the karaf ssh console, that did not work. I tried to restart it does not until i bring the network down.I have set the default log level of Karaf to DEBUG, but I am not able to find any informative logs which could help.Is there any way(other log/log configuration) where i can get some more info about the problem as to why it is not starting? – Akhil A Nov 17 '14 at 04:14
0

Got it running. It was indeed maven i believe. resolv.conf file on my linux box had ip entries in it which probably made maven to look outside, but was not getting a proper response. Removed the mvn urls from the /etc/ file and restarted the karaf and it started.

But i am yet confused as to how this works on the other boxes... thanks Achim

Akhil A
  • 1
  • 1