操作系统: Windows 2008 R2
Zabbix代理2-6.2.5
作为管理员,当安装带有PowerShell脚本的Zabbix 2 MSI包时,我得到的似乎是防火墙异常。这将导致MSI安装程序回滚。MSI安装日志显示与Windows防火墙相关的一些错误。
我的PS脚本使用以下参数:
$argList = @('/norestart',
'/qn',
'/passive',
'/l*v',
"$zabbixDir\zabbixInstall.log",
'/i',
"$dirTemp\$msiAgentZabbix",
"INSTALLFOLDER=$zabbixDir",
"LOGFILE=$zabbixDir\zabbixAgent.log",
"SERVER=$proxy",
"SERVERACTIVE=$proxy",
"HOSTNAME=$hostname",
"ENABLEPERSISTENTBUFFER=1",
"PERSISTENTBUFFERPERIOD=1d",
"PERSISTENTBUFFERFILE=$zabbixDir\zabbixAgent.db",
"ALLOWDENYKEY=AllowKey=system.run[*]",
"HOSTMETADATA=`"windows $proxyname $metadata`"")
Start-Process msiexec.exe -Wait -PassThru -ArgumentList "$argList"在Win 2008 VM上,我从来没有遇到过MSI安装程序的问题,但是现在,对于其他类似的VM,我得到了这些错误消息。
MSI安装日志:
MSI (s) (18:F8) [09:57:32:457]: Doing action: WixSchedFirewallExceptionsUninstall
Action ended 9:57:32: RemoveEnvironmentStrings. Return value 1.
MSI (s) (18:40) [09:57:32:457]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC223.tmp, Entrypoint: SchedFirewallExceptionsUninstall
MSI (s) (18:34) [09:57:32:457]: Generating random cookie.
MSI (s) (18:34) [09:57:32:517]: Created Custom Action Server with PID 8076 (0x1F8C).
MSI (s) (18:C8) [09:57:32:777]: Running as a service.
MSI (s) (18:C8) [09:57:32:777]: Hello, I'm your 32bit Impersonated custom action server.
Action start 9:57:32: WixSchedFirewallExceptionsUninstall.
SchedFirewallExceptions: Component 'CONFIGFWx64' action state (1) doesn't match request (2)
SchedFirewallExceptions: No firewall exceptions scheduled
MSI (s) (18:F8) [09:57:32:787]: Doing action: RemoveFiles
Action ended 9:57:32: WixSchedFirewallExceptionsUninstall. Return value 1.
(...)
ExecFirewallExceptions: Installing firewall exception2 Zabbix Agent 2 listen port on port , protocol 6
ExecFirewallExceptions: Error 0x800706d9: failed trying to find existing port rule
ExecFirewallExceptions: Error 0x800706d9: failed to add/update port exception for name 'Zabbix Agent 2 listen port' on port , protocol 6
CustomAction WixExecFirewallExceptionsInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (F4:54) [08:00:09:652]: User policy value 'DisableRollback' is 0
MSI (s) (F4:54) [08:00:09:652]: Machine policy value 'DisableRollback' is 0
Action ended 8:00:09: InstallFinalize. Return value 3.最奇怪的是,Windows防火墙在所有VM上都被禁用。所以,我不明白为什么这会成为MSI安装程序的一个问题。
如果我使用其GUI手动启动MSI安装程序,则安装工作正常。
我不确定问题是防火墙,但这是我所能找到的全部。
有什么想法吗?
发布于 2022-12-02 12:17:00
谢谢大家的考虑。
Windows防火墙服务在某些主机上被禁用。为了绕过这个问题,我在维护关闭防火墙的同时启用了服务。
这样做之后,安装就成功了。
仍然困扰我的是,如果用传统的GUI安装,就没有问题了。只有当安装PS脚本时,它才会失败。
现在,通过检查防火墙服务,我可以在脚本中使用MSI包。
https://stackoverflow.com/questions/74642785
复制相似问题