NetXMS Support Forum

English Support => General Support => Topic started by: lindeamon on February 20, 2014, 03:08:08 PM

Title: Agent Deployment
Post by: lindeamon on February 20, 2014, 03:08:08 PM
Hi,

i am trying to upgrade agents with the package deployment to the latest 1.2.12 and the process fails.
i see that the agent service was stopped but nothing else happened.

10x,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on February 20, 2014, 07:54:06 PM
Hi!

On what OS? If this is Windows, can you try to run installer on one node manually and check it it will report any errors?

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on February 20, 2014, 08:30:05 PM
Hi Victor,

i try to deploy to windows 2008 r2 sp1.
manual installation works fine. from the looks of it, the server stops the service of the agent on destination computer and thus disable the ability to install the new agent.
i remember that once you told me that the remote installation depends on the existence of the agent.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on February 20, 2014, 08:39:12 PM
Yes, remote installation actually contacts running agent and instructs it to upgrade itself (by running installer in unattended mode). Remote upgrade without running agent is not possible.

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on February 20, 2014, 10:19:43 PM
Hi Victor,

So what is the problem ?
if i wasn't making my self clear, i had an older agent running and it failed to upgrade itself.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: lindeamon on March 23, 2014, 12:36:57 PM
hi victor,

just upgraded to 1.2.13 and there is still a problem. maybe the method of the deployment must be changed.
if to upgrade i need to contact the agent and the upgrade process shuts it down then some thing is suppose to continue the process and there isn't any.
as for now, i have installed only 3 agents but i believe there are users that have more then 3.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on March 24, 2014, 09:45:54 AM
Hi!

Can you do the following on node with failed upgrade:

1. check agent version by running

nxagentd.exe -v

2. If version was changed, check for errors in agent's log (or Windows event log) - maybe something prevents it from starting. Then try to start agent manually.

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on March 24, 2014, 02:02:47 PM
Hi Victor,

i have already installed those agents manually, will check this on next release.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Peter Sentveld on March 28, 2014, 11:12:40 AM
Hello,

I have 350+ windows installation with agent. Normally the upgrade goes smooth, only a few (explainable) misses.

More than 100 are already upgraded to 1.2.13 without problems.
Today 3 upgrades in a row failed.

Looks like if the agent is running an (long) ExternalParameter job the upgrade failes. On 1 server the agent is down, process is not in memory but the externalparameter job is still running and "netstat -an" still gives that something is listening on port 4700.

Cannot start the (new?) agent, I will have to boot this system.

So to me it looks like that there's "a wrong moment" in the agent to do the upgrade.

Regards,
   Peter.
Title: Re: Agent Deployment
Post by: lindeamon on March 29, 2014, 09:47:43 PM
Hi Victor,

how come PeterSentveld has managed to successfully upgrade more then a 100 nodes and i can not upgrade only 3 and i haven't being able to do that from the beginning ?
can you explain to me what happens when i deploy the package ? let's focus on windows agents.
i download a msi package with a npi file. i import it and instruct the server to install the file with working agent. no external parameter or things like that.
what happens next ? do you create a process which runs the agent through a unc path ? do you copy the agent to a temp folder and then run it with a specific switch ?

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: lindeamon on March 30, 2014, 11:53:10 AM
hi victor,

i have done the test and it seems that the upgrade process didn't take place at all.
the deployment process timed out and the agent hasn't changed it's version.
again, if you could explain to me the process of the deployment maybe i will be able to find the cause for the problem.
let me try and save you the hussle of writing it down: the server connects to the agent and instruct it to do an upgrade. the agent shuts itself down and here there is a problem. do you create some kind of WMI process that goes to a unc path and execute msiexec.exe command ? do you copy the file to the destination, create a process for installing the agent and start it up ?

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on March 31, 2014, 01:43:21 PM
Hi!

Upgrade goes as following:

1. server transfers installer file to the remote machine (file is placed into directory specified in FileStore parameter in nxagentd.conf). For file transfer server uses same agent connection.
2. Agent launch downloaded installer.
3. Installer issues stop command to agent service.
4. Installer copies new files.
5. Installer issues start command to agent service.

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on April 06, 2014, 02:35:57 PM
Hi Victor,

i followed the steps you wrote and it got to step 3 and stopped. i know this cause i saw the agent file and saw that the service has been stopped but that's it.
i have checked the eventlog i did not see something useful.
hope this helps you solve the problem.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on April 09, 2014, 09:48:34 AM
What directory pointed by FileStore parameter in nxagentd.conf? Can agent create files in this directory?

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on April 09, 2014, 10:21:44 AM
Hi victor,

Yes, the file is created and the location is the default location.

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on April 09, 2014, 10:54:30 AM
That could mean that installer cannot overwrite one of the files. It could happen if event viewer is open for example - it opens nxagentd.exe to read messages. If you manually start installer uploaded by server to file store directory it runs without problem?

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on April 09, 2014, 05:18:45 PM
Hi Victor,

i have installed it manually but not from the file copied but from the file i have downloaded and imported into the server.
the installation went fine as always.
if i have installed the agent with checkboxes checked and netxms server configured for the 1st time, does it influence the silent install ?

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: Victor Kirhenshtein on April 09, 2014, 07:19:00 PM
It should not - installer takes settings from previous install from registry. Try to run file uploaded by server and with /SILENT option - it will simulate unattended install but still show error messages if there will be any.

Best regards,
Victor
Title: Re: Agent Deployment
Post by: lindeamon on April 13, 2014, 01:41:25 PM
Hi Victor,

running the file with /silent produced no errors. did i have to run the agent under a privileged account ?

Best Regards,
Lindeamon
Title: Re: Agent Deployment
Post by: lindeamon on May 25, 2014, 03:35:24 PM
hi victor,

just upgraded to v1.2.14 and agent deployment didn't finished correctly. after manual install i got the "finished" message.

Best Regards,
Lindeamon