Skip to main content

Liongard Agent - Troubleshooting Large Log Files

•Issue: Liongard Agent log consuming excessive disk space due to MSI execution loop •Scenario: Agent log grows abnormally large (100+ GB), file locked, agent reinstall fails

Updated this week


1. Initial Validation

  1. Confirm reported disk usage on the affected server:

    • Verify C: drive free space (often near 0 GB).

    • Identify oversized files under:
      C:\ProgramData\Liongard\Cache\

  2. Confirm log file characteristics:

    • Log file is extremely large (100–200+ GB).

    • File cannot be opened due to size.

    • File cannot be deleted → error indicates file is in use.


2. Determine Log Ownership

  1. Validate the log is not generated by the PowerShell install script:

    • Review script contents → no references to ProgramData logging.

    • Script transcript logs are typically small (KB range).

  2. Conclude log is generated by the Liongard Agent / MSI install process, not the script itself.


3. Identify File Lock Source

  1. Attempt to delete the log file:

    • Observe error: “File is open in Windows Installer.”

  2. Attempt to stop Windows Installer service:

    • Service cannot be stopped (expected on servers).

  3. Use Sysinternals Handle.exe:

  • Execute:
    handle.exe "C:\ProgramData\Liongard\Cache\<logfile>.log"

  • Identify locking process:

    • MSEXC.exe (Windows Installer)

    • Capture PID for verification.

    • Example: tasklist /fi "PID eq 13720"

    • Example: handle.exe -c 318 -p 13720

    • Example: taskkill /PID 13720 /F

Agree to EULA–

May need to disable EDR if flags populate–


4. Release File Lock (No Reboot)

Reboot avoided due to file share server role.

  1. Attempt to close the file handle using Handle.exe:
    handle.exe -c <HandleID> -p <PID>

  2. Re-run handle command to confirm lock is cleared.

  3. Delete the oversized log file.

  4. Verify:

    • File is removed.

    • File is not in Recycle Bin.


5. Reinstall Liongard Agent (Clean)

  1. Open PowerShell as Administrator.

  2. Use official Liongard KB install script (not RMM-modified versions).

  3. Populate required variables:

    • Instance prefix (e.g., US2)

    • API Token (required)

    • Agent Install Token

    • Environment name (exact match recommended)

  4. Run script.


6. Handle MSI 1618 Error (If Encountered)

  1. If install fails with:
    MSI error 1618 – Another installation is in progress

  2. Confirm via:

    • agent-install.log

    • Event Viewer → Application → MSI Installer

  3. If Windows Installer is stuck:

    • Identify MSEXC.exe PID.

    • Terminate process (last resort, ensure no other installs are running).

  4. Re-run install script.


7. Token Validation (If Install Fails Again)

  1. If agent registers partially but fails:

    • Reconfirm API token and Agent token values.

  2. Generate new Agent Install Token.

  3. Update script with new token values.

  4. Re-run script → confirm success.


8. Post-Install Verification

  1. Confirm:

    • Liongard Agent service is running.

    • Agent appears in Liongard UI.

  2. Re-check:
    C:\ProgramData\Liongard\Cache\

    • Log files present but normal size (KB–MB range).

  3. Review Event Viewer:

    • MSI 1618 entries correlate to earlier failure window.

    • No new repeating disk-space or installer errors.


9. Agent Auto-Update Confirmation

  1. Verify scheduled task exists:

    • Liongard Agent Updater

    • Runs nightly (default behavior).

  2. Confirm auto-update setting in UI:

    • Admin → Agents → Agent → Auto Update = Enabled

  3. Inform partner:

    • Scheduled task alerts are expected.

    • Can be safely acknowledged or excluded in monitoring tools.


10. Root Cause (Operational Conclusion)

  • Windows Installer entered a stuck / locked state during agent install or update.

  • Liongard Agent logging entered a high-frequency retry loop.

  • Log file grew rapidly due to repeated MSI + disk-space errors.

  • File lock prevented cleanup until handle was forcibly released.


11. Follow-Up Actions

  • Monitor log size over next 24–72 hours.

  • Contact Liongard Support if log growth resumes.


Did this answer your question?