You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ace.apache.org by Daan Veldhof <da...@gmail.com> on 2015/10/20 10:11:30 UTC

autoregister and -approve targets

Hi all,

I want to autoregister and autoapprove my targets when they send their
first auditlog to the ace server. I don't know the exact name of the
targets so I can't preregister them. Is there any configuration that can
handle this?

Regards
Daan

Re: autoregister and -approve targets

Posted by Daan Veldhof <da...@gmail.com>.
2015-10-21 14:09 GMT+02:00 Jan Willem Janssen <ja...@luminis.eu>
:

>
> > On 21 Oct 2015, at 14:04, Daan Veldhof <da...@gmail.com> wrote:
> >
> >
> > Approach:
> > I added the org.apache.ace.client.automation bundle to the Run Bundles in
> > server-allinone.bndrun. When I add a target it's not registered or
> approved
> > when I look at the WebUI.
> > When I set a breakpoint at AutoTargetOperator:start() it's only reached
> > when I get a workspace through the REST API (POST /client/work) , GoGo
> > shell (' cw ') or if I log in at the Web UI.
> > Also when I try to get a workspace through the REST API or GoGo shell I
> get
> > an ' IllegalStateException: Another user is logged in '. I have to do it
> a
> > second time before I get a workspace.
> > When I set a breakpoint at AuditLogProcessTask:process() it's never
> reached
> >
> > Is there anything I'm missing?
>
> My previous answer was incomplete, I forgot to mention that you need to
> add the
> following line to the `org.apache.ace.scheduler.cfg` file (found in your
> ACE
> server's `conf/` directory):
>
> org.apache.ace.client.processauditlog = 2000
>
> That should cause the AuditLogProcessTask to be scheduled and run
> periodically
> (once every 2000 milliseconds, change this value if needed).
>

That worked!
Thanks for your help

Regards
Daan

Re: autoregister and -approve targets

Posted by Jan Willem Janssen <ja...@luminis.eu>.
> On 21 Oct 2015, at 14:04, Daan Veldhof <da...@gmail.com> wrote:
> 
> 
> Approach:
> I added the org.apache.ace.client.automation bundle to the Run Bundles in
> server-allinone.bndrun. When I add a target it's not registered or approved
> when I look at the WebUI.
> When I set a breakpoint at AutoTargetOperator:start() it's only reached
> when I get a workspace through the REST API (POST /client/work) , GoGo
> shell (' cw ') or if I log in at the Web UI.
> Also when I try to get a workspace through the REST API or GoGo shell I get
> an ' IllegalStateException: Another user is logged in '. I have to do it a
> second time before I get a workspace.
> When I set a breakpoint at AuditLogProcessTask:process() it's never reached
> 
> Is there anything I'm missing?

My previous answer was incomplete, I forgot to mention that you need to add the
following line to the `org.apache.ace.scheduler.cfg` file (found in your ACE
server's `conf/` directory):

org.apache.ace.client.processauditlog = 2000

That should cause the AuditLogProcessTask to be scheduled and run periodically
(once every 2000 milliseconds, change this value if needed).

HtH,

--
Met vriendelijke groeten | Kind regards

Jan Willem Janssen | Software Architect
+31 631 765 814

My world is revolving around INAETICS and Amdatu

Luminis Technologies B.V.
Churchillplein 1
7314 BZ   Apeldoorn
+31 88 586 46 00

http://www.luminis-technologies.com
http://www.luminis.eu

KvK (CoC) 09 16 28 93
BTW (VAT) NL8169.78.566.B.01


Re: autoregister and -approve targets

Posted by Daan Veldhof <da...@gmail.com>.
Hi,

2015-10-21 13:05 GMT+02:00 Jan Willem Janssen <ja...@luminis.eu>
:

> Hi,
>
> > On 20 Oct 2015, at 10:11, Daan Veldhof <da...@gmail.com> wrote:
> >
> > I want to autoregister and autoapprove my targets when they send their
> > first auditlog to the ace server. I don't know the exact name of the
> > targets so I can't preregister them. Is there any configuration that can
> > handle this?
>
> There is a way to automatically approve any target that registers to the
> server for the first time. All you need to do is deploy the bundle
> `org.apache.ace.client.automation` at your ACE server, and update the
> corresponding configuration file `org.apache.ace.client.automation.cfg`
> in your ACE server’s “conf/“ directory (the default configuration will
> simply approve all updates to any target it sees).
>
>
I've already tried this with the default configuration, but no target is
registered or approved.

Approach:
I added the org.apache.ace.client.automation bundle to the Run Bundles in
server-allinone.bndrun. When I add a target it's not registered or approved
when I look at the WebUI.
When I set a breakpoint at AutoTargetOperator:start() it's only reached
when I get a workspace through the REST API (POST /client/work) , GoGo
shell (' cw ') or if I log in at the Web UI.
Also when I try to get a workspace through the REST API or GoGo shell I get
an ' IllegalStateException: Another user is logged in '. I have to do it a
second time before I get a workspace.
When I set a breakpoint at AuditLogProcessTask:process() it's never reached

Is there anything I'm missing?

I'm using the https://svn.apache.org/repos/asf/ace/trunk

Regards
Daan Veldhof

Re: autoregister and -approve targets

Posted by Jan Willem Janssen <ja...@luminis.eu>.
Hi,

> On 20 Oct 2015, at 10:11, Daan Veldhof <da...@gmail.com> wrote:
> 
> I want to autoregister and autoapprove my targets when they send their
> first auditlog to the ace server. I don't know the exact name of the
> targets so I can't preregister them. Is there any configuration that can
> handle this?

There is a way to automatically approve any target that registers to the
server for the first time. All you need to do is deploy the bundle
`org.apache.ace.client.automation` at your ACE server, and update the
corresponding configuration file `org.apache.ace.client.automation.cfg`
in your ACE server’s “conf/“ directory (the default configuration will
simply approve all updates to any target it sees).

--
Met vriendelijke groeten | Kind regards

Jan Willem Janssen | Software Architect
+31 631 765 814

My world is revolving around INAETICS and Amdatu

Luminis Technologies B.V.
Churchillplein 1
7314 BZ   Apeldoorn
+31 88 586 46 00

http://www.luminis-technologies.com
http://www.luminis.eu

KvK (CoC) 09 16 28 93
BTW (VAT) NL8169.78.566.B.01