wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
99 stars 90 forks source link

MacOS agent installer hangs on Monterey during reinstall #2774

Closed Deblintrake09 closed 6 months ago

Deblintrake09 commented 6 months ago
Wazuh version Component Install type Install method Platform
4.8.0-alpha2 Wazuh component Agent Packages MacOS Monterey Intel

Description

During testing of 4.8.0 Alpha 2 https://github.com/wazuh/wazuh/issues/21390, it was detected on MacOS Monterey, with Intel architecture, that when trying to reinstall the agent, the installar process hangs.

Evidence

# /Library/Ossec/bin/wazuh-control stop
Killing wazuh-modulesd... 
Killing wazuh-logcollector... 
Killing wazuh-syscheckd... 
Killing wazuh-agentd... 
Killing wazuh-execd... 
Wazuh v4.8.0 Stopped
sh-3.2# /bin/rm -r /Library/Ossec
sh-3.2# /bin/launchctl unload /Library/LaunchDaemons/com.wazuh.agent.plist
sh-3.2# /bin/rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
sh-3.2# /bin/rm -rf /Library/StartupItems/WAZUH
sh-3.2# /usr/bin/dscl . -delete "/Users/wazuh"
sh-3.2# /usr/bin/dscl . -delete "/Groups/wazuh"
sh-3.2# /usr/sbin/pkgutil --forget com.wazuh.pkg.wazuh-agent
Forgot package 'com.wazuh.pkg.wazuh-agent' on '/'.

# echo "WAZUH_MANAGER='172.31.14.39'" > /tmp/wazuh_envs && installer -pkg wazuh-agent-4.8.0-1.intel64.pkg -target /
installer: Package name is Wazuh Agent
installer: Installing at base path /
vikman90 commented 6 months ago

@Deblintrake09 this issue brings me wazuh/wazuh#18598 to mind. Please ensure that the OS is fully updated as the bug was in the installer tool.

Version table: https://github.com/wazuh/wazuh/issues/18598#issuecomment-1800821687

Please let us know the OS version and build. If it's older than 12.7.1, we can close this issue.

We'll mark this issue as blocked so far.

Deblintrake09 commented 6 months ago

Update

Testing was done in an instance with a version lower than required, that was affected by the bug. After provisioning a patched endpoint, testing was able to complete without errors.

Evidence: https://github.com/wazuh/wazuh/issues/21390#issuecomment-1895520977