Page 1 of 1

[SOLVED] Error creating new package

Published: July 8, 2019 - 7:38 PM
by infomix
Good morning,

I want to automate the installation of the Zabbix agent on my servers and I want to create a package using the msi available from them.

When I retrieve the MSI and launch it in a command prompt, the installation goes smoothly.

Code: Select all

zabbix_agent-4.0.9.msi /q /SERVER=X.X.X.X SERVERACTIVE=X.X.X.X
So I go through the package creator and launch Create and Uploader, entering my arguments.

I encountered errors during installation on the computer.

Code: Select all

Installation of new-zabbix-agent (task #90)
Installing new-zabbix-agent
Installing new-zabbix-agent(=4.0.9.2400-2)
installing new-zabbix-agent
Traceback (most recent call last):eendet
  File "C:\wapt\waptservice\service.py", line 1490, in run
    self.running_task.run()
  File "C:\wapt\waptservice\waptservice_common.py", line 550, in run
    self._run()
  File "C:\wapt\waptservice\waptservice_common.py", line 1005, in _run
    self.result.get('errors',[])))
Exception: Erreur lors de l'installation de [u'new-zabbix-agent']: erreurs dans les paquets [[PackageRequest(package=u'n
ew-zabbix-agent',architectures=[u'x64'],locales=['fr'],maturities=[u'PROD'],min_os_version=Version('6.3.9600'),max_os_ve
rsion=Version('6.3.9600')), PackageEntry(u'new-zabbix-agent',u'4.0.9.2400-2' architecture=u'x64',maturity=u'PROD'), u'Tr
aceback (most recent call last):\n  File "C:\\wapt\\common.py", line 4654, in install\n    force=force\n  File "C:\\wapt
\\common.py", line 3766, in install_wapt\n    raise e\nCalledProcessErrorOutput: Command \'msiexec /norestart /q /i "zab
bix_agent-4.0.9.msi" \' returned non-zero exit status 1603.\nOutput:\n']]

Exception: Erreur lors de l'installation de [u'new-zabbix-agent']: erreurs dans les paquets [[PackageRequest(package=u'n
ew-zabbix-agent',architectures=[u'x64'],locales=['fr'],maturities=[u'PROD'],min_os_version=Version('6.3.9600'),max_os_ve
rsion=Version('6.3.9600')), PackageEntry(u'new-zabbix-agent',u'4.0.9.2400-2' architecture=u'x64',maturity=u'PROD'), u'Tr
aceback (most recent call last):\n  File "C:\\wapt\\common.py", line 4654, in install\n    force=force\n  File "C:\\wapt
\\common.py", line 3766, in install_wapt\n    raise e\nCalledProcessErrorOutput: Command \'msiexec /norestart /q /i "zab
bix_agent-4.0.9.msi" \' returned non-zero exit status 1603.\nOutput:\n']]
Auditing new-zabbix-agent
Traceback (most recent call last):
  File "C:\wapt\waptservice\service.py", line 1490, in run
    self.running_task.run()
  File "C:\wapt\waptservice\waptservice_common.py", line 550, in run
    self._run()
  File "C:\wapt\waptservice\waptservice_common.py", line 1092, in _run
    self.result.append(u'%s: %s' % (package,self.wapt.audit(package,force = self.force)))
  File "C:\wapt\common.py", line 6001, in audit
    raise Exception('Package %s is not installed' % package)
Exception: Package new-zabbix-agent is not installed
I admit I don't know where to look, do you have any idea?

Re: Error creating new package

Published: July 9, 2019 - 3:45 PM
by dcardon
infomix wrote: July 8, 2019 - 7:38 PM Good morning,

I want to automate the installation of the Zabbix agent on my servers and I want to create a package using the msi available from them.

When I retrieve the MSI and launch it in a command prompt, the installation goes smoothly.

Code: Select all

zabbix_agent-4.0.9.msi /q /SERVER=X.X.X.X SERVERACTIVE=X.X.X.X
I admit I don't know where to look, do you have any idea?
The WAPT agent performs installations under the system account, not the user account. If you want to simulate launching the command line as WAPT will, you must use psexec (tis-psexec package) in the command line
psexec -i -s cmd.exe

The command above gives you a shell with the same execution context as the one used by the WAPT agent. If you manage to reproduce the problem in this privileged cmd.exe, then you need to have the parameters that can be changed to resolve the issue.

Sincerely,

Denis

Re: Error creating new package

Published: July 9, 2019 - 6:01 PM
by infomix
Good morning,

I can't find the psexec package. I'm using PyScripter to run the package installation test, and the error is:

Code: Select all

Command 'msiexec /norestart /q /i "zabbix_agent-4.0.9.msi" ' returned non-zero exit status 1603
What I find surprising is that at no point did I specify /norestart /i to it, and I think that's what's causing me problems because the arguments are not correct.
If I run this command in cmd, the software does not install

Re: Error creating new package

Published: July 10, 2019 - 2:17 PM
by infomix
I just tested with another .msi program and it works, so I conclude that it's my .msi file.

I've downloaded several versions but I still have the problem; some .msi files can't be created as a package?

Even when I use it without arguments, it doesn't work.

Re: Error creating new package

Published: July 10, 2019 - 9:44 PM
by vcardon
Welcome to the wonderful world of podoware (see https://podoware.fr/).

You'll need to repackage it yourself or contact Zabbix to have their installer fixed.

There has indeed been a trend over the last two or three years for software with aggressive marketing to install itself in the user directory to "avoid bothering system administrators."

However, ransomware is causing system administrators to increasingly prohibit executables in home directories, and that's a good thing. We're no longer in 1998 when you could confidently download something unknown from an unknown website and run it without fear of losing all your data.

So, during this transition period, when marketers will want to install their stuff in personal directories and system administrators will learn to fight against it, your choice will effectively be either to gently educate the Zabbix packagers (you're on the side of the product developers), or to create a clean installer with WAPT from the Zabbix MSI (you resign yourself to the marketers' choice).

Good luck.

If you need a hand, we're here; it's not free, but it's effective.

Vincent from Tranquil IT

Re: Error creating new package

Published: July 11, 2019 - 12:30 PM
by infomix
Hello,

thank you for the feedback, I understand the error better now. :lol:

I will look into all of this on my end.