ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Offermans <marcel.offerm...@luminis.nl>
Subject Re: Can't connect from Agent on Karaf client
Date Sun, 15 Feb 2015 10:23:46 GMT
Hello Robert,
On 15 Feb 2015 at 03:21:01, Robert M. Mather (robert.mather.rmm@gmail.com) wrote:

Thanks for your guidance Marcel. 

On Sat, Feb 14, 2015 at 3:43 PM, Marcel Offermans <marcel.offermans@luminis.nl> wrote:
Hello Robert,

On 14 Feb 2015 at 20:26:01 , Robert M. Mather (robert.mather.rmm@gmail.com) wrote:
I'm new to Ace and considering it for a production deployment with a couple 
hundred targets that might scale to thousands in the next few months. I'm 
assuming it's production ready for that sort of scenario? 
Yes.

At the moment, I'm having trouble connecting from the Agent bundle running 
on Karaf (installed via feature.xml generated by the maven-karaf-plugin, 
see below).
It seems that plugin fetches artifacts from Maven Central, and our current releases are not
published there anymore. That is why you end up with 0.8.1-incubator releases which are really
old and should not be used. Instead, please use the artifacts from the latest binary release.
I assume that a lot of the other problems you have come from the fact that you are working
with these old versions.

The agent is now a single bundle, so there is no need to make a feature out of it (org.apache.ace.agent.jar).

I've tried loading that jar from the Karaf deploy folder, and the Agent bundle becomes active,
but I can't figure out how to configure the discovery/identification properties so it will
connect to my Ace server. Does the Agent bundle have a PID I can use with the Config Admin?
We deliberately wanted to make the agent as self-contained as we could, so we decided against
using ConfigurationAdmin for the agent. You can use system properties instead: http://ace.apache.org/docs/user-guide.html#target-configuration

I would actually recommend you start with the launcher (org.apache.ace.launcher.felix.jar),
which bootstraps the Felix framework and this agent and then install all of your other bundles
via ACE.

I'd definitely prefer starting this way, but I've been using Karaf due to the service wrapper
 to bind startup to the client OS (critical for our deployment)
If you’re using some Linux based OS, we recently added a script to start and stop a launcher
as a service. It’s not in the release yet, but in trunk, here:

https://svn.apache.org/repos/asf/ace/trunk/run-target/scripts/ace-agent.sh

and features, which are the easiest way I've found to include non-OSGi-bundle dependencies
in the container. Just starting from Ace and Felix is there a straightforward way of resolving
the dependency trees of 3rd party libraries and "wrapping" them into bundles? This is extremely
easy with features and the karaf-maven-plugin, which searches the transitive dependencies
of a library, includes what's needed in the feature descriptor xml, and handles "wrapping"
any non-osgi dependencies it finds.
We usually do that with Bndtools and wrap such code as part of our build (so not run-time
but build-time). In the end, you have a bundle that contains the code you need so if you can
get at that, you can upload it to ACE and deploy it. That also goes for Karaf itself of course.

I'd appreciate any guidance on how to debug this! Using Ace would be so 
much nicer than rolling my own to do the same thing! 
The (new) agent has an option (-v) to start in verbose mode. That means it will output all
internal logging to the console, which is usually a good starting point for diagnosis.

Greetings, Marcel



Thanks for helping along an OSGi/Ace/Karaf newbie!
You’re welcome, feel free to keep asking questions. :)

Greetings, Marcel



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message