You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by asookazian2 <as...@gmail.com> on 2014/07/02 20:41:40 UTC

bundle in lifecycle infinite loop

starting/stopping/active (repeat) for a datasource.xml bundle in deploy dir. 
I'm running karaf 3.0.1 in a clustered (2 node) Win7 VM envmt.  First time
I've seen this and was able to reproduce after restarting both Karaf
instances.

also, I'd like to get this xml file into a mvn: repo (is it possible to just
copy it with the right path in ~/.m2/repository?)  The reason is that sounds
like files in deploy dir don't sync to other nodes in same group/cluster.

log:

20140702 11:36:34.523 [INFO ] pool-14-thread-6 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.555 [INFO ] pool-14-thread-6 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.586 [INFO ] pool-14-thread-22 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContaine for bundle datasource-person-ws.xml
20140702 11:36:34.633 [INFO ] pool-14-thread-18 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContaine for bundle datasource-person-ws.xml
20140702 11:36:34.664 [INFO ] pool-14-thread-6 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.695 [INFO ] pool-14-thread-6 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.742 [INFO ] pool-14-thread-6 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.789 [INFO ] pool-14-thread-4 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.820 [INFO ] pool-14-thread-7 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml
20140702 11:36:34.867 [INFO ] pool-14-thread-7 |
19:org.apache.aries.blueprint.core |
org.apache.aries.blueprint.container.BlueprintExtender | Destroying
BlueprintContainerfor bundle datasource-person-ws.xml




--
View this message in context: http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: bundle in lifecycle infinite loop

Posted by Ryan Moquin <fr...@gmail.com>.
Ok, so it is working?  One of your other emails made me unsure since on a
different thread you said it was working.

I'm surprised it works the way you wrote it.. if it works that way, you
should be able to shorten it as a wildcard with a regular expression rather
than a hardcoded path.

Ryan
On Jul 11, 2014 12:32 PM, "asookazian2" <as...@gmail.com> wrote:

> We are trying to achieve active/active for a web service (for example) as
> well as failover...
>
> I have tested this and it seems to work so far with cellar 3.0.0 and karaf
> 3.0.1
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4034175.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: bundle in lifecycle infinite loop

Posted by asookazian2 <as...@gmail.com>.
We are trying to achieve active/active for a web service (for example) as
well as failover...

I have tested this and it seems to work so far with cellar 3.0.0 and karaf
3.0.1



--
View this message in context: http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4034175.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: bundle in lifecycle infinite loop

Posted by asookazian2 <as...@gmail.com>.
The blacklisting is for the following datasource.xml:

blueprint:file:/C:/sw/ngs/deploy/datasource-person-ws.xml

I'm blacklisting on both nodes (etc/org.apache.karaf.cellar.groups.cfg):

default.bundle.whitelist.inbound = *
default.bundle.whitelist.outbound = *
default.bundle.blacklist.inbound =
blueprint:file:/C:/sw/ngs/deploy/datasource-person-ws.xml
default.bundle.blacklist.outbound =
blueprint:file:/C:/sw/ngs/deploy/datasource-person-ws.xml
default.bundle.sync = true



--
View this message in context: http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4034174.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: bundle in lifecycle infinite loop

Posted by Ryan Moquin <fr...@gmail.com>.
What are you putting in to be blacklisted?  The reason you see it after a
restart is because you initially didn't install it with cellar's bundle
install command, so it only started on that node.  When you shutdown and
bring the nodes back up, that bundle ends up being synced because the
blacklist/whitelist rules don't prevent it.

If yoh put bundle.jar in as the filter, it won't work.  You need to see
what the symbolic name is that it's being deployed as.  You should see it
tell you in the logs.

What do you want to achieve with Cellar on those two nodes?  And why is the
bundle failing?  There has to be something missing.  Are you sure it
started up when you only have one Karaf running?  I don't see much to go
off of.  What is in the datasource.xml?  I don't see this as a bug because
if the bundle can't install correctly then the cluster will keep trying to
sync it.  It would help to know why it can't startup.  Cellar isn't able to
fix a bundle that won't start, the developer needs to fix the bundle.
Otherwise do some research on deploying xml files on karaf so you
understand how they work and then read the docs on how to blacklist the
bundle.  You have to understand how to reference a bundle before you can
know what to blacklist.

Ryan
On Jul 10, 2014 6:22 PM, "asookazian2" <as...@gmail.com> wrote:

> this seems to be a bug but the workaround JB suggested to blacklist the
> bundle for the datasource xml (use la -l to find the location and then
> update bundle blacklist inbound/outbound in
> etc/org.apache.karaf.cellar.groups.cfg)
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4034146.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: bundle in lifecycle infinite loop

Posted by asookazian2 <as...@gmail.com>.
this seems to be a bug but the workaround JB suggested to blacklist the
bundle for the datasource xml (use la -l to find the location and then
update bundle blacklist inbound/outbound in
etc/org.apache.karaf.cellar.groups.cfg)



--
View this message in context: http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4034146.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: bundle in lifecycle infinite loop

Posted by asookazian2 <as...@gmail.com>.
as an alternative I am trying to install via file: or mvn: but neither seem
to be working.

is it possible to install a datasource xml file if it's copied to the
karaf/system dir?

what exactly happens when karaf scans the deploy dir and installs and starts
the datasource xml file?



--
View this message in context: http://karaf.922171.n3.nabble.com/bundle-in-lifecycle-infinite-loop-tp4033960p4033984.html
Sent from the Karaf - User mailing list archive at Nabble.com.