Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package installation fails if broken install preceeded #35

Closed
alphaDev23 opened this issue Aug 26, 2018 · 7 comments
Closed

Package installation fails if broken install preceeded #35

alphaDev23 opened this issue Aug 26, 2018 · 7 comments
Labels

Comments

@alphaDev23
Copy link

Received the following during install (after apt-get install failed):

$dpkg -i wazuh-agent_3.5.0-1_amd64.deb

Preparing to unpack wazuh-agent_3.5.0-1_amd64.deb ...
mkdir: cannot create directory ‘/tmp/wazuh-agent/group’: File exists
dpkg: error processing archive wazuh-agent_3.5.0-1_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Removing any system startup links for /etc/init.d/wazuh-agent ...
Errors were encountered while processing:
wazuh-agent_3.5.0-1_amd64.deb

@alphaDev23
Copy link
Author

The documentation should be updated to reflect the fact that Debian packages are untested. There is no mention that apt-get packages are not tested or that it is broken at: https://documentation.wazuh.com/current/installation-guide/installing-wazuh-agent/wazuh_agent_deb.html

Hopefully, this comment will save others from wasting time trying to install untested packages using apt-get until #32 and this defect are resolved.

@snaow
Copy link
Contributor

snaow commented Aug 27, 2018

Hi @alphaDev23,

Thanks for the feedback, it's really welcome.
We are working on fixing the package for the scenario you reported.

Clean and upgrade installations work properly, I and the team just test the documentation guide and works fine.

I can confirm as well the package installation is not working in the scenario you describe, if apt/package manager fails in the middle of the installation, the package can't be installed right away again, you need to purge/remove previous files manually and perform a clean installation to make it work.

We are working on fixing this as I write this issue, my colleague @BraulioV will attach here a 3.5 package version so you can use it in your environment.
The fix will be included in the next Wazuh release.

In the meantime, if you want to perform a clean installation, you can run (be aware, the command below will erase client.keys and ossec.conf files):

rm -rf /var/ossec && dpkg --purge wazuh-agent && dpkg -i wazuh-agent_3.5.0-1_amd64.deb

I hope it helps, best regards,
Pedro.

@alphaDev23
Copy link
Author

There may be several other apt-get commands that need to be tested which are commonly expected to work without issue, e.g. apt-get install -f (which did not fix the wazuh-agent broken install).

When functionality, especially common functionality, goes untested it not only wastes my time but also potentially many others. Within half a day of using Wazuh, I entered 4 unique issues (this count does not include #33 which was closed). Each of these issues takes time to determine if the issue is with Wazuh, with dependencies, missed instruction detail, setting, etc. and then to actually write up the issue and communicate back and forth regarding it.

As a note, I was able to install via a package download directly although MD5 checksums are provided to verify packages which are susceptible to hashing collisions (see #34).

@BraulioV
Copy link
Contributor

Hi @alphaDev23,

see attached the wazuh-agent .deb package with this issue solved. This issue has been solved in this commit: 27ee216, please feel free to send us more feedback.

Regards,
Braulio.
wazuh-agent_3.5.0-2_amd64.deb.zip

PS: you will need to extract the .deb from the .zip file. GitHub doesn't allow to attach .deb files.

@alphaDev23
Copy link
Author

I appreciate the quick turnaround for responses; however, the issue was not the deb package itself. That installed without issue even with the broken install. The issue was the package in Ubuntu's 14.04 and 16.04 (possibly 18.04 but I did not attempt) repositories (accessible via apt-get).

@BraulioV
Copy link
Contributor

Hi @alphaDev23 ,

the packages of the repository will fail only if the /tmp/wazuh-***** exists but in normal cases, they will work. By the way, we will release a new version of Wazuh very soon so this problem will be fixed with the new packages.

Regards,
Braulio.

@alphaDev23
Copy link
Author

Thank you for fixing the issue. Ensuring that the package management installs work as expected, and to recover from issues using the standard tools, is important especially given that the Wazuh agent is installed on numerous machines.

@vikman90 vikman90 added the type/bug Bug issue label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants