Fix Imunify FAV defence360agent Error and 404 Issue
If you are using Imunify FAV with OLSPanel and getting:
ModuleNotFoundError: No module named 'defence360agent'
or the Imunify page is returning a 404 Not Found error, the installation may be incomplete or some required Imunify components may be missing.
Solution
First, remove the existing Imunify installation:
dnf remove 'imunify*' -y
Verify that the old packages have been removed:
rpm -qa | grep -Ei 'imunify|defence360'
After removing the old installation, reinstall Imunify FAV using the OLSPanel installer:
curl -sSL https://olspanel.com/extra/imunifyfav.sh | sed 's/\r$//' | bash
The installer will install the required Imunify components, including the missing defence360agent module, and configure the Imunify FAV integration.
Verify the installation
Check that the defence360agent module is available:
/opt/imunify360/venv/bin/python3 -c "import defence360agent; print(defence360agent.__file__)"
You should get a path similar to:
/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/__init__.py
Then access Imunify FAV from OLSPanel again.
If you were previously getting a 404 Not Found page, the 404 should also be resolved after the clean reinstall and OLSPanel integration.
Quick Fix
For a clean reinstall:
dnf remove 'imunify*' -y
curl -sSL https://olspanel.com/extra/imunifyfav.sh | sed 's/\r$//' | bash
After installation, reload OLSPanel and check the Imunify FAV page.
Note: Do not install defence360agent using pip. It is an Imunify component and should be installed through the Imunify package/installer.