Configuring agent all the time server reboot (160 Views)
Reply
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 1 of 10 (160 Views)

Configuring agent all the time server reboot

Hello Support,

 

I have few servers which will be booted from an image all the time. so in that image i have installed the agent in deactivated mode and now agent will be configured all the time it comes online after reboot.

 

on the other hand i have configured these nodes with automatic certificate grant option so i expect once agent is configured and certificate should be granted by server automatically.

 

But it will not. however if i sent another request manually it will be granted.

 

from oainstall.log i can see that during the activation agent will be restarted and i thought might be this is the cause as server can not communicate back to agent if it is being restarted.

 

so i configured the server to grant the certificate after 240 seconds from the time request came. however server does not grant this request.

 

but again if i sent manually, it will be granted automatically.

 

Can someone assist me with this?

 

-KAKA-

Please use plain text.
Honored Contributor
Goran Koruga
Posts: 1,190
Registered: ‎12-05-2002
Message 2 of 10 (136 Views)

Re: Configuring agent all the time server reboot

Hello.

 

Which product are we talking about here?

 

If it's OMU/OML I can help.

 

Regards,

    Goran

Please use plain text.
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 3 of 10 (133 Views)

Re: Configuring agent all the time server reboot

Hello Goran,

It is OMW. However if you are doing it for omu or oml please share. May be it give me some hints.

-KAKA-
Please use plain text.
Honored Contributor
Goran Koruga
Posts: 1,190
Registered: ‎12-05-2002
Message 4 of 10 (131 Views)

Re: Configuring agent all the time server reboot

For OMU there are two options:

 

1. For nodes installed from the server, automatic granting is enabled by default (can be disabled via the OPC_CSA_USE_AUTOGRANT config variable).

 

2. For manually installed nodes one can write rules what to do (various combinations of these are possible - just one, all ...):

 

     - add node from the request

     - grant/deny/delete the request

     - call custom scripts (before action listed above takes place - "pre" and/or after action - "post")

 

    The rules can be specific for one node or match many nodes (same syntax as for proxy configuration) and of course there can be many rules in place.

 

    Goran

Please use plain text.
HP Expert
Harmeet_Singh
Posts: 4
Registered: ‎09-11-2013
Message 5 of 10 (104 Views)

Re: Configuring agent all the time server reboot

Hello Kaka,

 

Would like to know which commands have you used for:

1) "installed the agent in deactivated mode"

2) and now "agent will be configured" all the time it comes online after reboot.

 

Regards, Harmeet

Please use plain text.
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 6 of 10 (99 Views)

Re: Configuring agent all the time server reboot

[ Edited ]

Hello Harmeet,

Thank you for your response.

1) "installed the agent in deactivated mode"
>>>> cscript oainstall.vbs -i -a -includeupdates -defer_activate

with -defer_activate (agent is preconfigured, only activation is pending)

2) and now "agent will be configured" all the time it comes online after reboot.

>>>> ovcoreid -create -force (it will set a new coreid all the time)

and next it executes cscript -c -a -activateonly -srv OMSERVER -cert_srv OMWSERVER

 

PS: -defer_activate is not released officially, i have it from testbits as a result of my case with support.

Thank You.
-KAKA-

Please use plain text.
HP Expert
Harmeet_Singh
Posts: 4
Registered: ‎09-11-2013
Message 7 of 10 (92 Views)

Re: Configuring agent all the time server reboot

This should have worked, however can you try standard cmdlines which are more tested ones:

oainstall  -i  -a -defer_configure

and

ovcoreid -create -force

oainstall -c -a  -s OMSERVER -cs OMCERTSERVER

 

Regards, Harmeet

Please use plain text.
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 8 of 10 (87 Views)

Re: Configuring agent all the time server reboot

Hello Harmeet,

Thanks again. i have tried with -defer_configure too. problem with the -defer_configure is that it configure the agent which is more time conusming. (almost 45 minute to configure) so i used -defer_activate which is also tested by lab and me and it works in normal case.

Problem here is grant of certificates and not with -defer_configure or defer_activate i believe.

Now i have submitted a case to Support and waiting someone to reply.

Hope to find out the problem soon.

-KAKA-

Please use plain text.
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 9 of 10 (80 Views)

Re: Configuring agent all the time server reboot

Hello Harmeet,

ovcoreid -create -force, is it not enough to remove all the instance of coreid?

What i see is that the request after activation comes with coreid already set in image and not the one which is see as output of ovcoreid?

any other location where i should clear the coreid?

-KAKA-
Please use plain text.
Honored Contributor
KAKA_2
Posts: 1,277
Registered: ‎05-26-2007
Message 10 of 10 (75 Views)

Re: Configuring agent all the time server reboot

Hello Harmeet,

I think i am able to fix this problem. by updating image. removed coreid from image, cleared the %temp%, also %ovdatadir%\tmp\OpC\*.

booted again from new image and this time certificate was granted automatically. I am performing further tests with few more machines.

So this solves the problem with the agent now i have problem how to push the policies all the time after the certificate is installed??

Any suggestions?

-KAKA-
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation