About cluster:node-ping command in Cellar

2012-02-09 Thread XiLai Dai
Hi, 

When I try to run cluster:node-ping command with Karaf + Cellar cluster env, it 
always give a reply with about 10 seconds delay time if the target node is on 
the other machine.

karaf@trun cluster:node-ping 192.168.2.104:5701
Pinging node 192.168.2.104:5701
PING 1 192.168.2.104:5701 10002ms
PING 2 192.168.2.104:5701 10001ms
PING 3 192.168.2.104:5701 10002ms
PING 4 192.168.2.104:5701 1ms

Is it Ok or any configuration need to be set? Or it's a known issue.  Thanks!

Regards.
Xilai


Re: About cluster:node-ping command in Cellar

2012-02-09 Thread Jean-Baptiste Onofré

Hi Xilai,

Some questions:

- Which Cellar version ?
- Which kind of discover used (static, unicast/multicast) ?

If you do a system ping, what kind of latency do you have ?

I tried on my VM without problem.

Regards
JB

On 02/09/2012 10:52 AM, XiLai Dai wrote:

Hi,

When I try to run cluster:node-ping command with Karaf + Cellar cluster env, it 
always give a reply with about 10 seconds delay time if the target node is on 
the other machine.

karaf@trun  cluster:node-ping 192.168.2.104:5701
Pinging node 192.168.2.104:5701
PING 1 192.168.2.104:5701 10002ms
PING 2 192.168.2.104:5701 10001ms
PING 3 192.168.2.104:5701 10002ms
PING 4 192.168.2.104:5701 1ms

Is it Ok or any configuration need to be set? Or it's a known issue.  Thanks!

Regards.
Xilai


--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: assembly : bundle + dependencies?

2012-02-09 Thread Jean-Baptiste Onofré

Hi Andrei,

I'm stuck with a customer this morning, I will get back to you asap.

Regards
JB

On 02/09/2012 04:50 AM, Andrei Pozolotin wrote:

Jean-Baptiste:

1) thank you for a great post:
http://blog.nanthrax.net/2011/12/do-you-know-the-apache-karaf-maven-plugins/

2) in your example, you use packagingpom/packaging
to use pom as descriptor document for other feature(s) assembly;

3) I am trying to follow your post and to create feature for
packagingbundle/packaging
so it will include in the final feature.xml and in the
target/assembly folder
both its own bundle jar and also this' bundle dependencies;

so in my case project pom is a self-descriptor document : self
bundle + dependencies;

I get both self bundle entry and dependency entires OK in the final
feature.xml

I also get all the dependencies jar OK in the target/assembly,
but the main self bundle jar is missing form target/assembly :-)

can you please let me know
which obvious setting do I miss for
karaf-maven-plugin / maven-bundle-plugin?

probably you cold link to a working example somewhere?

4) the intent of this exercise is to be able to produce
a) feature.xml
b) maven-standard-layout assembly of main bundle jar plus all
dependency bundle jars
for deployment to s3 via https://github.com/jcaddel/maven-s3-wagon

Thank you,

Andrei



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: pax exam karaf framework with remote test containers

2012-02-09 Thread Ioannis Canellos
On a single machine you can create multiple karaf instances using the karaf 
admin service in order to test multiple karafs in a single host.

If using the remote machines is a hard requirement, there are a few options for 
you out there, but they all require some additional effort.

The idea would be to ssh into those machines from inside your test install  
start karaf and use it in your test.
Some options on how to do it without having to code the world would be:

a) Use jclouds-karaf with the byon provider (bring your own nodes) in order to 
be able to manage the remote machines.
b) An other idea would be to use a project that I have been working on: Fuse 
Fabric http://fuse.fusesource.org/fabric/docs/getting-started.html. This will 
allow you among other to start Karaf instances on any host you have ssh access 
and easily manage it.
Such test example: 
https://github.com/fusesource/fuse/blob/master/fabric/fabric-itests/fabric-pax-exam/src/test/java/org/fusesource/fabric/itests/paxexam/CreateSshAgentTest.java.
 


Ioannis Canellos
FuseSource

Blog: http://iocanel.blogspot.com
Apache Karaf Committer  PMC
Apache Camel Committer
Apache ServiceMix  Committer
Apache Gora Committer
Apache DirectMemory Committer



Re: About cluster:node-ping command in Cellar

2012-02-09 Thread Ioannis Canellos
Hi Xilai,

The output is misleading, due to a bug. What actually happens is that all 
commands timeout after 10 seconds, but the ping command does not properly 
handle the timeout resulting in this false output.
I think that this issue happens when pinging nodes on separate groups. Could 
you please file a jira about it?

On 9 Φεβ 2012, at 12:25 μ.μ., Jean-Baptiste Onofré wrote:

 Hi Xilai,
 
 Some questions:
 
 - Which Cellar version ?
 - Which kind of discover used (static, unicast/multicast) ?
 
 If you do a system ping, what kind of latency do you have ?
 
 I tried on my VM without problem.
 
 Regards
 JB
 
 On 02/09/2012 10:52 AM, XiLai Dai wrote:
 Hi,
 
 When I try to run cluster:node-ping command with Karaf + Cellar cluster env, 
 it always give a reply with about 10 seconds delay time if the target node 
 is on the other machine.
 
 karaf@trun  cluster:node-ping 192.168.2.104:5701
 Pinging node 192.168.2.104:5701
 PING 1 192.168.2.104:5701 10002ms
 PING 2 192.168.2.104:5701 10001ms
 PING 3 192.168.2.104:5701 10002ms
 PING 4 192.168.2.104:5701 1ms
 
 Is it Ok or any configuration need to be set? Or it's a known issue.  Thanks!
 
 Regards.
 Xilai
 
 -- 
 Jean-Baptiste Onofré
 jbono...@apache.org
 http://blog.nanthrax.net
 Talend - http://www.talend.com

Ioannis Canellos
FuseSource

Blog: http://iocanel.blogspot.com
Apache Karaf Committer  PMC
Apache Camel Committer
Apache ServiceMix  Committer
Apache Gora Committer
Apache DirectMemory Committer



Re: karaf test framework: multiple test classes files in the same karaf instance

2012-02-09 Thread Ioannis Canellos
Hi Giacomo,

I am not sure if this is possible. 

On 8 Φεβ 2012, at 6:30 μ.μ., Giacomo Coletta wrote:

 Hi,
 
  
 It’s sometime I’m using the karaf integration test framework and it works 
 nicely.
 
 I usually run many tests in the same karaf instance. 
 
 Up to now i only was able to properly configure, start karaf and run the 
 tests in the same test class.
 
 
 
 Now the number of test is growing and i would like to put tests relating to 
 different aspects in different classes, just to find them more easily, but 
 anyway i would like not to have to configure and restart karaf several times, 
 to save time.
 
 
 
 Any of you know how this could be done ? 
 
 
 
 Thanks
 
 
 
 Giacomo
 

Ioannis Canellos
FuseSource

Blog: http://iocanel.blogspot.com
Apache Karaf Committer  PMC
Apache Camel Committer
Apache ServiceMix  Committer
Apache Gora Committer
Apache DirectMemory Committer



Re: Console of child instance didn't react same as root.

2012-02-09 Thread Jamie G.
I don't have a windows environment on hand to test the shell, however
looking deeper into the issue it appears some work was done for
3.0.0-snapshot to specifically handle windows terminals
(https://issues.apache.org/jira/browse/KARAF-1071 - part of
https://issues.apache.org/jira/browse/KARAF-610), perhaps a similar
fix is required on 2.2.x, need to see if other library versions come
into play here (don't want to break backward compatibility on a
branch).

Cheers,
Jamie

On Thu, Feb 9, 2012 at 4:10 AM, SvS dumpacco...@solcon.nl wrote:
 Hi Jamie,

 Thanks for you response!

 I use version 2.2.5 of karaf en run it on Windows XP. I see in it issue that
 this is solved in 3.0.0 of karaf. Is this correct? Is there a work around?

 Regards,
 SvS

 --
 View this message in context: 
 http://karaf.922171.n3.nabble.com/Console-of-child-instance-didn-t-react-same-as-root-tp3726327p3728689.html
 Sent from the Karaf - User mailing list archive at Nabble.com.


Re: karaf test framework: multiple test classes files in the same karaf instance

2012-02-09 Thread Andreas Pieber

Hey Giacomo,

Well, paxexam-karaf completely relays on pax exams features in this 
context. Since there is no such feature in pax exam right now (at least 
I don't know a workaround) it's also not possible in paxexam-karaf. BUT 
maybe Toni or Harald know some internal workaround/hack to make this 
possible. Best to ask on the ops4j general list [1] for this feature.


Kind regards,
Andreas

[1] http://lists.ops4j.org/mailman/listinfo/general

On 02/08/2012 05:30 PM, Giacomo Coletta wrote:


Hi,

It’s sometime I’m using the karaf integration test framework and it 
works nicely.


I usually run many tests in the same karaf instance.

Up to now i only was able to properly configure, start karaf and run 
the tests in the same test class.



Now the number of test is growing and i would like to put tests 
relating to different aspects in different classes, just to find them 
more easily, but anyway i would like not to have to configure and 
restart karaf several times, to save time.



Any of you know how this could be done ?


Thanks


Giacomo



RE: About cluster:node-ping command in Cellar

2012-02-09 Thread XiLai Dai
Hi, JB,

The Cellar version is 2.2.3. 
features:addurl 
mvn:org.apache.karaf.cellar/apache-karaf-cellar/2.2.3/xml/features
features:install cellar

I've made nothing change to the cellar configuration files in the etc/, keep 
the default value in the etc/ org.apache.karaf.cellar.instance.cfg :
multicastEnabled=true
multicastGroup=224.2.2.3
multicastPort=54327
multicastTimeoutSeconds=2

so the discovery type should be multicast.

I've tested with a system ping (Win 7), the replies is quickly at most about 
hundreds milliseconds. But the replies from Cellar ping are constantly about 10 
seconds.

Thanks
Xilai

-Original Message-
From: Jean-Baptiste Onofré [mailto:j...@nanthrax.net] 
Sent: Thursday, February 09, 2012 6:25 PM
To: user@karaf.apache.org
Subject: Re: About cluster:node-ping command in Cellar

Hi Xilai,

Some questions:

- Which Cellar version ?
- Which kind of discover used (static, unicast/multicast) ?

If you do a system ping, what kind of latency do you have ?

I tried on my VM without problem.

Regards
JB

On 02/09/2012 10:52 AM, XiLai Dai wrote:
 Hi,

 When I try to run cluster:node-ping command with Karaf + Cellar cluster env, 
 it always give a reply with about 10 seconds delay time if the target node is 
 on the other machine.

 karaf@trun  cluster:node-ping 192.168.2.104:5701
 Pinging node 192.168.2.104:5701
 PING 1 192.168.2.104:5701 10002ms
 PING 2 192.168.2.104:5701 10001ms
 PING 3 192.168.2.104:5701 10002ms
 PING 4 192.168.2.104:5701 1ms

 Is it Ok or any configuration need to be set? Or it's a known issue.  Thanks!

 Regards.
 Xilai

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: About cluster:node-ping command in Cellar

2012-02-09 Thread Jean-Baptiste Onofré

Hi Xilai,

after checking in the code, in 2.2.3, the timeout handling is not fully 
fixed.

So I think that you raise the timeout.

I advice you:
- to check if you don't have Windows firewall/firewall blocking the 
multicast/hazelcast messages
- to switch in static host definition in the 
etc/org.apache.karaf.cellar.instance.cfg and etc/hazelcast.xml


I raised:
https://issues.apache.org/jira/browse/KARAF-1194

I will fix this issue for Cellar 2.2.4.

Regards
JB

On 02/10/2012 03:14 AM, XiLai Dai wrote:

Hi, JB,

The Cellar version is 2.2.3.
features:addurl 
mvn:org.apache.karaf.cellar/apache-karaf-cellar/2.2.3/xml/features
features:install cellar

I've made nothing change to the cellar configuration files in the etc/, keep 
the default value in the etc/ org.apache.karaf.cellar.instance.cfg :
multicastEnabled=true
multicastGroup=224.2.2.3
multicastPort=54327
multicastTimeoutSeconds=2

so the discovery type should be multicast.

I've tested with a system ping (Win 7), the replies is quickly at most about 
hundreds milliseconds. But the replies from Cellar ping are constantly about 10 
seconds.

Thanks
Xilai

-Original Message-
From: Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Sent: Thursday, February 09, 2012 6:25 PM
To: user@karaf.apache.org
Subject: Re: About cluster:node-ping command in Cellar

Hi Xilai,

Some questions:

- Which Cellar version ?
- Which kind of discover used (static, unicast/multicast) ?

If you do a system ping, what kind of latency do you have ?

I tried on my VM without problem.

Regards
JB

On 02/09/2012 10:52 AM, XiLai Dai wrote:

Hi,

When I try to run cluster:node-ping command with Karaf + Cellar cluster env, it 
always give a reply with about 10 seconds delay time if the target node is on 
the other machine.

karaf@trun   cluster:node-ping 192.168.2.104:5701
Pinging node 192.168.2.104:5701
PING 1 192.168.2.104:5701 10002ms
PING 2 192.168.2.104:5701 10001ms
PING 3 192.168.2.104:5701 10002ms
PING 4 192.168.2.104:5701 1ms

Is it Ok or any configuration need to be set? Or it's a known issue.  Thanks!

Regards.
Xilai




--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com