[SOLVED] Error creating new package

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
infomix
Messages: 8
Registered: July 20, 2018 - 1:54 PM

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
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?
WAPT 1.8.2.7265
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 9, 2019 - 3:45 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
infomix
Messages: 8
Registered: July 20, 2018 - 1:54 PM

July 9, 2019 - 6:01 PM

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
WAPT 1.8.2.7265
infomix
Messages: 8
Registered: July 20, 2018 - 1:54 PM

July 10, 2019 - 2:17 PM

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.
WAPT 1.8.2.7265
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

July 10, 2019 - 9:44 PM

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
Vincent CARDON
Tranquil IT
infomix
Messages: 8
Registered: July 20, 2018 - 1:54 PM

July 11, 2019 - 12:30

Hello,

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

I will look into all of this on my end.
WAPT 1.8.2.7265
Locked